lookup problem

Richard Kreiss rkreiss at verizon.net
Thu Aug 5 11:54:12 PDT 2010


From: Faisal Karim [mailto:faisalk at furniture-pro.com] 
Sent: Thursday, August 05, 2010 12:09 PM
To: Richard Kreiss
Subject: RE: lookup problem

 

You may try changing the lookup name something like saljn = sales_journal

 

Tried you suggestion and that worked.   Thanks..

 

Now the real  question is why the same alias used for the browse lookup and the rn lookup,  need to be different in dclerk and not rclerk.  Is there something in the code which differs regarding the number of times the same handle can be used to open or read records from the same file?

 

Richard

 

 

 

From: Richard Kreiss [mailto:rkreiss at verizon.net] 
Sent: Thursday, August 05, 2010 11:04 AM
To: Faisal Karim
Subject: RE: lookup problem

 

The browse lookup works in both clerks but will put up a  lookup failure message if a not line is there.

 

The if @bk=”s” is executed which set rn=sales_no and then does a lookup the sales journal file record based on the record #, this fails.  As there are over 32,000 records in my test file and 0ver 300,000 records at my client’s site. 

 

Interesting thing, the record # is 32,575, the last record in the file.  Need to see if this happens with another set of values.

 

Richard

 

From: Faisal Karim [mailto:faisalk at furniture-pro.com] 
Sent: Thursday, August 05, 2010 11:33 AM
To: Richard Kreiss
Subject: RE: lookup problem

 

That is good.   Have you tried –ng instead of –nx since you have key match option enabled?

 

From: Richard Kreiss [mailto:rkreiss at verizon.net] 
Sent: Thursday, August 05, 2010 10:30 AM
To: Faisal Karim
Subject: RE: lookup problem

 

In answer to your suggestion: [1003-10005] as it should be.  No spaces.

 

Richard

 

 

From: Faisal Karim [mailto:faisalk at furniture-pro.com] 
Sent: Wednesday, August 04, 2010 6:50 PM
To: Richard Kreiss
Subject: RE: lookup problem

 

Richard,

 

Try this for your example:

 

Instead of msgbox "Field 16 is \b5"<16<"\a-\nVersion # \b2"<@vr<"\a-"        ◄

 

Do this: msgbox "Field 16 is ["&16&"] \a-\nVersion # \b2"<@vr<"\a-"

 

What is the exact value of 16 then in []?

 

Faisal

 

Again off the list for reply.

        

-----Original Message-----
From: filepro-list-bounces+faisalk=furniture-pro.com at lists.celestial.com [mailto:filepro-list-bounces+faisalk=furniture-pro.com at lists.celestial.com] On Behalf Of Richard Kreiss
Sent: Wednesday, August 04, 2010 5:25 PM
To: 'Kenneth Brody'
Cc: filepro-list at lists.celestial.com
Subject: RE: lookup problem

 

-----Original Message-----

From: Kenneth Brody [mailto:kenb at fptech.com] 

Sent: Wednesday, August 04, 2010 2:15 PM

To: Richard Kreiss

Cc: filepro-list at lists.celestial.com

Subject: Re: lookup problem

 

On 8/3/2010 6:16 PM, Richard Kreiss wrote:

[...]

>> *** A filePro Error Has Occurred ***

>> 

>> On File: C:\appl\ccp/filepro/transaction/index.A

>> 

>> Input Processing

>> 

>> Line Number: 450

>> 

>>           rn=sales(@rn);GOTO lok_sjn

>> ^

>> 

>>           @bk = "s"

>>           rn=sales(@rn);GOTO lok_sjn

[...]

> 445  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -

>         ◄ If:

>         Then: aa="(brw=10 xkey=xs show=keep pop=show fill=desc,top)"

> 446  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -

>         ◄ If:

>         Then: ab="[JOURNAL # START DATE  TYPE  PER    FEE       CC TYPE    LAST 4]"

> 447  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -

>         ◄ If:

>         Then: ac="*1        *6            *7    *8  $*9          *14      *32"

> 448  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -

> do_lk_r◄ If:

>         Then: lookup sales = sales_journal  k=16   i=C -NXm b=(aa&ab&ac)

> 449  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -

>         ◄ If:         @sk = "BRKY" or @bk = "X"

>         Then:         CLEARB;SHOW "";pw="";END

> 450  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -

>         ◄ If:         @bk = "s"

>         Then:         rn=sales(@rn);GOTO lok_sjn

> 451  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -

>         ◄ If:

>         Then: CLEARB;END

 

First, as others have pointed out, you have no "if not sales" after the lookup.

 

Since you say this is failing in dclerk, I would add:

 

do_lk_r

     then: debug on

     then: lookup sales = sales_journal ...

       if: not sales

     then: ... do something ...

 

When you hit the lookup statement, check the value of field 16, including 

any leading, trailing, and embedded spaces.  What is the exact value of 

field 16, including all spaces?

 

Step through the lookup.  Did it display the browse window, and wait for you 

to press "S"?

 

What does the debugger show as the value of "not sales"?

 

-- 

Kenneth Brody

 

Still at Denver Airport - flight delays for planes coming East.

 

Added the following:

445  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -

       ◄ If:                                                                   ◄

       Then: msgbox "Field 16 is \b5"<16<"\a-\nVersion # \b2"<@vr<"\a-"        ◄

 

And

 

do_lk_r◄ If:                                                                   ◄

       Then: lookup sales = sales_journal  k=16   i=C -NXm b=(aa&ab&ac)        ◄

450  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -

       ◄ If:         NOT sales                                                 ◄

       Then:         BEEP;ERRORBOX "No Sales Journal Record found for \r"<maste_code;CLEARB;END

 

And

456  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -

       ◄ If:                                                                   ◄

       Then: lookup sales = sales_journal  r=rn   -n                           ◄

457  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -

       ◄ If:         NOT sales                                                 ◄

       Then:         ERRORBOX "Sales journal Record # \r"<rn<"\r Not Found";CLEARB;END

458  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -

       ◄ If:

       Then: popup sales,"renew"

459  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -

       ◄ If:

       Then: input popup("20","-1") y "is this the correct record?\n(Y)es or (N

460  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -

       ◄ If:         y = "" or @sk = "BRKY"

       Then:         pw = "";CLEARP;ENDResult of 445:

 

 

───────────────────────────────────────

    Wo┌──────────────────────────┐ Sale

      │ Field 16 is  1003-10005  │   ◄

──────│ Version #  5.6.10R9      │─────

      └────────── Press  Enter   ┘ DO N

                ◄                ◄

 

Result of 450

──────────────────────────────────────────────

Sales Journal:   30190  Code : 1003-10005   Renewal: 01    Status: C      │

                                                                          │

  Sales Date: 11/19/2005◄      Start Date: 08/01/2011◄     │                  │

    Pay Type: CC◄               

 Period Type: S◄  

  Annual fee:  1,500.00◄      │ 

                                             └──────────────────────────────────────────┘│

                                                                          │

Credit Card: VM◄   Reference #:                    ◄                      │─

                   Exp Date:  7◄ 2011◄         ◄                          │

                                                                          │

     ┌──────────────────────┤ Comment ├───────────────────┐      Date     │─

     │                                                    │            ◄  │

──────────────────────────────────────────────────────────────────────────┘

──────────────────────────────────┤

                  ema┌─────────────────────────────┐                       ◄

─────────────────────│ is this the correct record?      │────────────────────────

  Screen 1           │ (Y)es or (N)o ->  ◄                                         │     Record:     6648

                           └─────────────────────────────┘

 

The above was run using rclerk and the not sales and msgbox were just added.

 

 

Dclerk:

 

─────────────────────────────────

Wo┌──────────────────────────┐ Sa

  │ Field 16 is  1003-10005  │

──│ Version #  5.6.10D9      │───

  └────────── Press  Enter   ┘ DO

            ◄                ◄

─────────────────────────────────

 

────┌───────────────────────────────────────────────────────────────┐──

 Add│ JOURNAL # START DATE  TYPE  PER    FEE       CC TYPE    LAST 4│

    ├───────────────────────────────────────────────────────────────┤

 Cit│   30190   08/01/2011    CC    S   $ 1,500.00   VM       8304  │

   ─│   30189   08/01/2010    CC    S   $ 1,500.00   VM       8304  │──

  Ho│       ┌───────────────────────────────────────────────┐       │rs

(714│      │ No Sales Journal Record found for  1003-10005 │       │

────│   └─────────────────────────────── Press  Enter   ┘       │──

Date│                                                               │

03/0└─End of File───────────────────────────────────────────────────┘

───────────────────────────────────────────────────────────────────────

 

As shown, the program functions properly when using rclerk but not dclerk.

 

It appears that the 2 sales journal records are found as the browse appears.  The  if: not sales at line 450 executes even though records were found.  It doesn't execute, line 450, when rclerk is used.

 

Richard 

 

 

_______________________________________________

Filepro-list mailing list

Filepro-list at lists.celestial.com

http://mailman.celestial.com/mailman/listinfo/filepro-list

 

-- 

This message has been scanned for viruses and

dangerous content by MailScanner, and is

believed to be clean.

 


-- 
This message has been scanned for viruses and 
dangerous content by  <http://www.mailscanner.info/> MailScanner, and is 
believed to be clean. 


-- 
This message has been scanned for viruses and 
dangerous content by  <http://www.mailscanner.info/> MailScanner, and is 
believed to be clean. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20100805/bb0a693e/attachment.html 


More information about the Filepro-list mailing list