Menu

Return code 47 from ISAM read

2021-08-03
2021-08-03
  • Alan Darlington

    Alan Darlington - 2021-08-03

    I have the following lines in my program:

               open i-o birthisam.
               DISPLAY 'file opened -- status ' ws-bday-status.
               move all "0" to bday-record.
               display 'record to read ' bday-record.
               read birthisam.
               DISPLAY 'record read ?? -- status ' ws-bday-status.
               if ws-bday-status > 0
                   display 'control recd not found--status ' ws-bday-status.
    

    When run I get:

    file opened -- status 00
    record to read    00000000000000000000000000000000000000000000000000000000000000000000
    record read ?? -- status 47
    control recd not found--status 47       
    

    The ISAM file does exist, access is Dynamic and the record is on the file.

    Why am I getting the status 47 -- file not open?

     

    Last edit: Simon Sobisch 2021-08-25
  • Alan Darlington

    Alan Darlington - 2021-08-03

    Found the answer. 47 is misleading, the problem was caused by having 2 records defined in the FD creating differeent attributes for the file??

     

Anonymous
Anonymous

Add attachments
Cancel