MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Reading PDS Members
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
Eric.C.Bakke
Beginner


Joined: 14 Jul 2008
Posts: 15
Topics: 0
Location: Plano, TX

PostPosted: Thu Jul 17, 2008 12:50 pm    Post subject: Reply with quote

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.
_________________
Eric C. Bakke
Senior DB2 DBA
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Thu Jul 17, 2008 4:38 pm    Post subject: Reply with quote

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.
_________________
New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html.
Back to top
View user's profile Send private message Visit poster's website
Sreejith
Intermediate


Joined: 02 Dec 2002
Posts: 155
Topics: 25
Location: N.Ireland

PostPosted: Tue Nov 04, 2008 2:13 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Tue Nov 04, 2008 2:38 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sreejith
Intermediate


Joined: 02 Dec 2002
Posts: 155
Topics: 25
Location: N.Ireland

PostPosted: Wed Nov 05, 2008 8:34 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
jim haire
Beginner


Joined: 30 Dec 2002
Posts: 140
Topics: 40

PostPosted: Tue Apr 17, 2018 10:40 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
jim haire
Beginner


Joined: 30 Dec 2002
Posts: 140
Topics: 40

PostPosted: Tue Apr 17, 2018 11:03 am    Post subject: Reply with quote

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).
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Tue Apr 17, 2018 11:30 am    Post subject: Reply with quote

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
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group