Link to home
Start Free TrialLog in
Avatar of Leogal
LeogalFlag for United States of America

asked on

RPG Free Parital key and move replacement

I am writing a program where the boss wants the calc specs in RPG Free.  I am struggling with what used to be a simple thing but its not so simple for me in Free format .  The input file has a single field defined as zoned 10, 0.  The 10 digit field includes the check digit in the last postion 0123456789.  The file that I need to chain to has two keys, Key a is zoned 9,0 and Key b is zoned 1,0. so it would be 012345678 for keya and 9 for keyb .  Key b is the check digit.  Here is the problem when I the following and run Debug the I do not get a hit.

Chain (single field) File1;
If %found (File1);

do something....

EndIf;

When the program is running in debug it goes straight to EndIf. It does not process a single calc statement.
The input file record that does exist in the file that I am chaining to.  I am not sure what I am doing wrong. Anyone have any thoughts?
Avatar of Leogal
Leogal
Flag of United States of America image

ASKER

I must have been asleep at the wheel earlier. I figured it out I needed to SETLL on the file and then chain.
ASKER CERTIFIED SOLUTION
Avatar of Gary Patterson, CISSP
Gary Patterson, CISSP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Leogal

ASKER

sorry I did not get back to you earlier. it has been hairy at work. Thank you for your great answer!