× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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 thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.