+ Reply to Thread
Results 1 to 3 of 3

Thread: %Found help !!!!!!

  1. Default %Found help !!!!!!

    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?

  2. #2

    Default %Found help !!!!!!

    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.

  3. #3

    Default %Found help !!!!!!

    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.

+ Reply to Thread

Similar Threads

  1. %Found and %EOF
    By Guest.Visitor in forum RPG
    Replies: 3
    Last Post: 06-05-2003, 10:17 AM
  2. SQL error Lib not found
    By Guest.Visitor in forum Programming
    Replies: 0
    Last Post: 12-12-2001, 09:08 AM
  3. SQL- Whenever Not Found
    By Guest.Visitor in forum Programming
    Replies: 7
    Last Post: 12-11-2001, 05:08 AM
  4. Class not found
    By Guest.Visitor in forum Programming
    Replies: 3
    Last Post: 03-21-1999, 05:27 PM
  5. Ordinal Not Found
    By Guest.Visitor in forum Programming
    Replies: 0
    Last Post: 01-01-1995, 02:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts