On 9/29/2010 20:23, Robert A. Rosenberg wrote:
At 19:39 +0200 on 09/29/2010, John Blythe Reid wrote about Sample
code to read a PDS member using BPAM:
I'm writing some code to check VSAM CLUSTER defintions in a standard
RECFM=FB,LRECL=80 PDS. It's to cross check IMS DBD defintions against
their associated CLUSTER definitions. I've never used BPAM before but
at first glance it seems to be OPEN/FIND/READ/CHECK/deblock to get
logical records/CLOSE.
Does anyone have a sample piece of code to read PDS members with BPAM
that I could have a look at ?
Thanks,
John.
Not to rain on your parade but if you know the member names (as
opposed to wanting to read the PDS directory to find them), why
bother with BPAM when QSAM and an open of DSN(MEMBER) will work just
as well? All you need to do is use SVC99 to allocate the member and
then do an open to the allocated DDN. Or you can use a RDJFCB and
OPENJ.
I don't think all that dynamic allocation would be simpler than using
BPAM. It would certainly be a lot more overhead.
btw, there's been a few allusions to reading the directory. BPAM
doesn't provide that facility (nor does dynamic allocation)... you would
have to use BSAM or QSAM and parse the directory entries.
sas