How to code 'END of the file' in a CLIST



IBM's Command List programming language & Restructured Extended Executor

How to code 'END of the file' in a CLIST

Postby jkk2020 » Thu Jan 22, 2009 4:34 pm

Hi,

Question: How to code 'END of the file' in a CLIST.
I am coding a clist in which I need to read a old file and copy the contents to new file and at the end of the old file I need to set few paramenters.(Example given below)
How would I code 'end of file' in a CLIST. Could you please give the syntax for this.
Sorry I am new to CLIST coding.

My problem as an example:
---------------------------------
OPENFILE OLDFILE INPUT
GETFILE OLDFILE

PUTFILE NEWFILE
At end of the OLDFILE, I need to set some parametes. So how would I check 'end of file for OLDFILE here.

Thanks.
jkk2020
 
Posts: 5
Joined: Tue Jan 20, 2009 5:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to code 'END of the file' in a CLIST

 

Re: How to code 'END of the file' in a CLIST

Postby MrSpock » Thu Jan 22, 2009 5:09 pm

Just like a REXX exec, where you check for the last non-zero return-code value (RC). In CLIST that's stored in the &LASTCC variable.
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post