Hi Bill...

 Well - yes - you've hit the nail on the head - the routines are very
 confused because they are expecting to see VB-type records (with a BDW
 and RDW) and they are not.

 The program uses BSAM I/O.

 The issue here is that the program expects to not be directed to a PDS,
 and when that accidently happens - things go, as you mention,
 alarmingly wrong.

 What I'm looking for is some way for the program to say "Hey!  This
 isn't a sequentional VB file at all."   Instead of miserably blowing
 up.

 As I mentioned before, I tried looking the DSORG in the DCB, but that
 indicates PS (because the PDS was opened with a PS DCB.)

 So - is there another way to tell if the file I'm trying to read
 with BSAM I/O (doing my own unblocking of the VB records) is at all
 reasonable?

 Someone else suggested using DYNALLOC to query the organization
 of the file before the OPEN... is there a way to accomplish
 this after the OPEN?

 Then - when the user points the program to a PDS instead of a nice
 sequential file (or PDS member), things don't just "blow up", but
 can simply inform the user that is an invalid file.

        - Thanks -
        - Dave Rivers -


[EMAIL PROTECTED] wrote:

Your program can know that this bunch of bytes is a PDS directory because it is the first block in the input data of a PDS. The end of the directory is marked by an end of file record. That will probably confuse your program, too. Then the first block of the first member begins after the end of file record, unless the first member has been deleted after the second member was added, in which case what you will read next is what used to be the first member, which also ends with another end of file record. More confusion. I would suggest a complete redesign of your program beginning with a thorough understand of what your program is supposed to accomplish, followed by research into the internals of a PDS.



Bill  Fairchild




--
[EMAIL PROTECTED]                        Work: (919) 676-0847
Get your mainframe programming tools at http://www.dignus.com

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

Reply via email to