how come to know the file is at end in REXX



IBM's Command List programming language & Restructured Extended Executor

how come to know the file is at end in REXX

Postby Chaitnya » Tue May 20, 2008 9:19 am

Hi,

Please can anyone let me know in REXX while reading a file into stack how can I come to know that the file is at end.

Thanks!!!
Chaitnya
 
Posts: 18
Joined: Wed Mar 26, 2008 1:04 pm
Has thanked: 0 time
Been thanked: 0 time

Re: how come to know the file is at end in REXX

Postby MrSpock » Tue May 20, 2008 1:00 pm

When you receive a non-zero return-code on the EXECIO instruction.

         done = 'no'
         DO WHILE done = 'no'
           "EXECIO 1 DISKR INDD"
            IF RC = 0 THEN          /*  Record was read */
              DO
                PULL record               
              END
            ELSE done = 'yes'
         END
         "EXECIO 0 DISKR INDD (FINIS"
         EXIT 0
User avatar
MrSpock
Global moderator
 
Posts: 809
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post