Actually, thanks. I have simply been using a sledge hammer to get my
data read. You are correct that there are times that it doesn't work.
My fallback has always been to drop into ALC and code the file read
there. I will try using the RECORD VARYING IN SIZE and see how it works
out for me. It goes to show that this forum isn't just good for the
original posters, but for the responders, as well.
Bill Klein wrote:
In COBOL terms there is a WORLD of difference between the 2 types of files,
but some comments (in general).
1) You really should start using the RECORD VARYING IN SIZE rather than the
RECORD CONTAINS n TO m - phrase in your FD. The former is guaranteed to be
a variable format file (all compilers, all settings) - while the latter is
NOT.
2) If you use the RECORD VARYING IN SIZE phrase, you can simply DROP the
RECORD FORMAT IS V phrase which is an IBM extension and not portable to
other compilers.
3) Once you DO use the RECORD VARYING IN SIZE phrase, you can make the ODO
(Occurs Depending On" phrase set to a the field specified in it. This
allows you to properly handle variable format files that do NOT contain
their length field within each record.
***
I am NOT trying to say that your code doesn't work as you say it does, there
simply ARE better ways to code it.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html