Hi again Bill...

 Yeah - that's a good idea...  But - I don't think I'm communicating
 something right...

 But - in this case, the user specified a file name.  OPEN filled in the
 DCBRECFM, etc... and the program went merrily on its way trying to
 do what the DCB said would work...

 This would normally be just fine, if the USER had specified a
 DSN(MEMBER), but instead, the user only specified the DSN.
 In this case, after the OPEN, the DCB is filled with the attributes
 of the PDS members, not the PDS directory.

 So - the filled-in DCB says RECFM=VB.  Which doesn't work
 well for 'reading' the PDS (works correctly for reading a member,
 not the PDS itself.)  Since we're not pointing at a member,
 but pointing at the PDS 'file' - we wind up reading directory
 bytes, which confuses the VB unblocking routines - and we
 wind up with erroneous data, and general "badness."

 Note that sometimes, a "plain" DSN is the right thing, since it could
 be a 'plain' flat/sequential file.  No reason to disallow those.
 So - the program can't apriori simply disallow names without
 members.

 I'd like things to be abstract enough that the program could
 say "hey - you gave me something invalid - wanna try again?"
 instead of S0C4.

 So - in this case, the values found in the DCB can't be used.
 In fact, in this particular situation, the GET and subsequent
 unblocking can't be used either, and I'd like the program
 to fail gracefully.  A check either at read-time or open-time
 would be fine.

 So far, it seems the only way to do that is to get the JFCB, etc...
 But - Gil seemed to think that wasn't the best approach.
 DYNALLOC looks like another possible answer, but how expensive
 is that?


         - Thanks -
        - Dave Rivers -


, IBM Mainframe Discussion List wrote:
In a message dated 4/24/2006 3:12:40 P.M. Central Daylight Time, [EMAIL PROTECTED] writes:


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


Make sure the DCB in the program does not specify the file organization. Then that field in the your DCB will be filled in with information from the file's external label. Then test it as Ed Jaffe showed.

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