DISKR -- Infinite loop



IBM's Command List programming language & Restructured Extended Executor

DISKR -- Infinite loop

Postby abirami_yn » Thu Dec 13, 2007 11:22 am

I want to read a file, line by line and to display the same. But its going in the infinite loop.
Could you please tell me what is wrong in this code?

/*REXX*/
EOF=0
"ALLOC DD(TEMP1) DS('A730AYN.REXX.OUTPUT') SHR"
TRACE I
DO WHILE EOF=0
'EXECIO * DISKR TEMP1 (FINIS'
IF RC<>0 THEN EOF=1 ELSE NOP
PULL LINE
SAY LINE
END

Thanks In advance
abirami_yn
 
Posts: 2
Joined: Wed Dec 12, 2007 9:55 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DISKR -- Infinite loop

Postby MrSpock » Fri Dec 21, 2007 5:58 pm

/*REXX*/
EOF=0
DO WHILE EOF=0
'EXECIO 1 DISKR TEMP1' /* READ ONLY 1 RECORD INTO THE STACK */
IF RC<>0 THEN EOF=1 ELSE
DO
PULL LINE
SAY LINE
END
END
'EXECIO 0 DISKR TEMP1 (FINIS'
User avatar
MrSpock
Global moderator
 
Posts: 807
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