lookup -nl problem

Richard Kreiss rkreiss at verizon.net
Fri Jun 5 14:01:30 PDT 2009


Fp 5.6.06 Windows

I have an application process transactions.  When run, it first checks to see if the credit card being processed is the latest one on file.

Card file lookup sequence is "CC"&master_code*&"9".  Nine is the highest sequence #.

Master code is nnnn-nnnnn

27  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If: 'lookup on r_type = CC 7 master_code & sequence # of 9
       Then: lv="CC"&master_code&"9"
29  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: lookup card = l_card  k=lv   i=F -nl

The problem is that the code does not get the highest sequence # record put the prior on.  i.e. 3 cards on file, finds card #2.

I test this programming in clerk using a message box to display the card found.  My test in clerk was hardcoded with the master_code.  However this code found the proper record.

76  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:                                                                   ◄
       Then: lv="CC"&master_code&"9"    ◄
 77  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:                                                                   ◄
       Then: lookup card = l_card  k=lv   i=F -nL                              ◄
 78  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:         NOT card                                                  ◄
       Then:         BEEP;ERRORBOX "Credit Card Not Found";END                 ◄
 79  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:                                                                   ◄
       Then:         msgbox card(3){"\nCard # is \r"<card(4)<"\nSeq is \b2"<card(16)<"\a-"
80  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
      ◄ If:
      Then: END

Same code one in report and other in clerk.  Anyone know a reason why the report version fails and the clerk works?


Richard Kreiss 





More information about the Filepro-list mailing list