View Full Version : %Found help !!!!!!
nycsusan@hotmail.com
10-28-2002, 08:49 AM
My RPG book says to use %found alone or %found(filename). If a file name is not specified, %found applies to the most recent file, string, or lookup operation. I suggest putting the file name inside the () or get rid of the () altogether.
louisbassett@hotmail.com
10-28-2002, 08:49 AM
I used the %found() ( the BIF: %found with open and close parenthesis with no argument) along with a %found (no parenthesis) in the same program and got an unexpected error. Fact 1: The chain directly preceded the %found and the %found evaluated to '0' when it should have evaluated to '1'. Fact 2: When I removed the parenthesis from the other statement containing the %found(), the %found worked correctly. Fact 3: The %found() was in a subroutine and hadn’t been executed yet. Fact 4: I also included an indicator on the Chain so I could check it and it was *off after the chain- chain ok. I pulled out the code and tested it using the exact same argument and file shown below: /FREE CHAIN ‘xxx’ myfile If %found Foundit = ‘yes’ Else Foundit = ‘no’ Endif CHAIN ‘xxx’ myfile If %found() Foundit = ‘yes’ Else Foundit = ‘no’ Endif /END-FREE If you try it, the first %found will fail and Foundit will equal ‘no’. If you remove the parenthesis from the %found() statement on the second chain, the first %found will work correctly. Why is this?
B.Morris
10-28-2002, 10:03 AM
lbassett wrote: > > I used the %found() ( the BIF: %found with open and close parenthesis with no argument) along with a %found (no parenthesis) in the same program and got an unexpected error. > ... Try PTF SI06392.
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.