|
Hello:
I have the code to read from IFS which works now. The code below is the read
part. Again this works. But the problem is it reads the length I specify
(BUFLEN of 80 in this sample below). I don't know the length of each record
when I am reading production files. Some records are 80 some are 110 and so
on. How do I read a variable record length from the IFS?
Any help would be appreciated.
Thanks in advance
GG
C**====================================================================
C** READ_IFS (convert this to buflen = %size(%trim(outrec))
C**====================================================================
C READ_IFS BEGSR
C Eval RC = 0
C EVAL BUFLEN = 80
C DOU RC <> 0
C EVAL RC = READ (ERR_FLAG: %ADDR(OUTREC):
BUFLEN)
C IF RC > 0
C EXSR WRITEFILE
C ENDIF
C END
C*
C ENDSR
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.