Reading PDS Members
Select messages from
# through # FAQ
[/[Print]\]
Goto page Previous  1, 2, 3  :| |:
MVSFORUMS.com -> Application Programming

#31:  Author: Eric.C.BakkeLocation: Plano, TX PostPosted: Thu Jul 17, 2008 12:50 pm
    —
kolusu,

Thanks for edit capability.

I tested the program on both PDS and PDSE using Z/OS v1.9. I'm working on a new directory module that will provide in linkage the member name and additional attributes. I'll post that if anyone's interested in this.

#32:  Author: semigeezerLocation: Atlantis PostPosted: Thu Jul 17, 2008 4:38 pm
    —
If you need info for ISPF stats, you can see my exec at http://sillysot.com/ftp/mlrexx.txt

Kolusu. This should work fine for PDSE because an attempt to read a PDSE directory directly causes MVS to simulate a PDS directory and return records as if they were part of a real PDS directory. Good for compatibility, but for obvious reasons, it is much slower than reading the real thing, and you can't write a PDSE directory directly.

#33:  Author: SreejithLocation: N.Ireland PostPosted: Tue Nov 04, 2008 2:13 pm
    —
Hi,
Did anyone successfully managed to use BPXWDYN to read PDS member ? I use the same code given above by Kolusu. It work for a dataset, but if I use a PDS it abends with 4072 and the return code from BPXWDYN is 0002M. The dataset I am using is PDS not a PDSE.

Any idea why I am getting this error.

Thanks
Sreejith

#34:  Author: kolusuLocation: San Jose PostPosted: Tue Nov 04, 2008 2:38 pm
    —
Sreejith wrote:
Hi,
Did anyone successfully managed to use BPXWDYN to read PDS member ? I use the same code given above by Kolusu. It work for a dataset, but if I use a PDS it abends with 4072 and the return code from BPXWDYN is 0002M. The dataset I am using is PDS not a PDSE.

Any idea why I am getting this error.



Sreejith


Code:


01 PDS-STRING.                                               
   05 PDS-LENGTH               PIC S9(4) COMP VALUE 100.     
   05 PDS-TEXT                 PIC X(100) VALUE             
   'ALLOC DD(INFILE) DSN(''YOUR.PDS.FILE(MEMBER)'') SHR'.


You probbaly had a file name longer than 100 bytes. Make sure that you have coded enough length. Put a display of the PDS-text and PDS-length and see if there is an overflow.

#35:  Author: SreejithLocation: N.Ireland PostPosted: Wed Nov 05, 2008 8:34 am
    —
Thanks Kolusu. Problem solved.
Displayed PDS-lenght (after moving to 9(4)) and it was zeroes
I initialized PDS-String in the program and resulted in error. Supposed to initialize PDS-TEXT. The program is building PDS-TEXT from SYSIN.

#36:  Author: jim haire PostPosted: Tue Apr 17, 2018 10:40 am
    —
Kolusu,
You provided the example above which is greatly appreciated. I am doing something similar, although I am allocating new datasets (multiple datasets within the same run).

I am building the allocate statements via a COBOL STRING statement, taking the dataset names from an input file I am reading. My allocate statement looks like this:

Code:

ALLOC DD(CCCTRIGF) DSN([i]'dataset.name.here[/i].TRIGGER') NEW CATALOG RECFM(F) LRECL(80) SPACE(1,1) TRACKS DSORG(PS)


I string this into a variable called WS-ALLOCATION-STRING.
My WS-ALLOCATION-STRING is fixed length for 132. I then call BPXWDYN statically using the WS-ALLOCATION-STRING.

Code:

CALL 'BPXWDYN' USING WS-ALLOCATION-STRING.


I am getting a return code of -00332. I am not sure how to interpret this.

I noticed your example is using a length when defining the allocation string. Is that necessary? Is there a maximum length this allocation string can be? The length of my allocation string could be different based on the length of the dataset name I read from the input file.

#37:  Author: jim haire PostPosted: Tue Apr 17, 2018 11:03 am
    —
Never mind. I figured out what it was. I took one of your earlier posts and read the dataset being enclosed by two single quotes, when really it was a double quote.

To answer my own questions:
1. Yes, you should use a 01 level with a length when defining your application string for BPXWDYN.

2. The length of the string being passed to BPXWDYN can be longer than 100.
I'm not sure what the maximum length it can be. (Mine is 132).

#38:  Author: kolusuLocation: San Jose PostPosted: Tue Apr 17, 2018 11:30 am
    —
jim haire wrote:
Never mind. I figured out what it was.

2. The length of the string being passed to BPXWDYN can be longer than 100.
I'm not sure what the maximum length it can be. (Mine is 132).


Jim,

Glad you are able to figure it out. As for the length field it is 2 byte binary and hence it can have a max length of 32767. However since we are calling BPXWDYN using a parameter list, most times it is limited to 4096, which is more than enough as you do not have parms that exceed 4096



MVSFORUMS.com -> Application Programming


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Goto page Previous  1, 2, 3  :| |:
Page 3 of 3

Powered by phpBB © 2001, 2005 phpBB Group