Page 1 of 1

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

PostPosted: Thu Jan 22, 2009 4:34 pm
by jkk2020
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.

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

PostPosted: Thu Jan 22, 2009 5:09 pm
by MrSpock
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.