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 

allocating the PDS memeber through REXX

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
ranjit5311
Beginner


Joined: 27 Nov 2005
Posts: 27
Topics: 14

PostPosted: Mon Jan 23, 2006 11:17 pm    Post subject: allocating the PDS memeber through REXX Reply with quote

I have allocated a PDS through the REXX. Could you please tell me
1. How to allocate a new members for the PDS.
2. if the member already exist, I want to over write the contents in that member.
thanks,
Ranjit
Back to top
View user's profile Send private message
imdaboss
Beginner


Joined: 10 Jan 2006
Posts: 3
Topics: 1

PostPosted: Tue Jan 24, 2006 5:52 am    Post subject: Reply with quote

Supposing the PDS's name is 'THISIS.ANAME', doing:

Code:

address TSO
"ALLOC DD(TEST) DSN('THISIS.ANAME(NEWMEMBR)') SHR"


This will allocate a new member in the PDS, or overwrite an existing one.
If you prefer to append to the member instead of overwriting it, use MOD disposition instead of SHR.
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Tue Jan 24, 2006 7:03 am    Post subject: Reply with quote

imdaboss wrote:
If you prefer to append to the member instead of overwriting it, use MOD disposition instead of SHR.

Nope, you can't ever MOD to a member of a PDS. It's either SHR or OLD.
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Tue Jan 24, 2006 8:04 am    Post subject: Reply with quote

And here is the quote from the fine manual:
Quote:
Do not use the MOD attribute when allocating a member of a PDS to which you want to append information. You can use MOD only when appending information to a sequential data set. To append information to a member of a PDS, rewrite the member with the additional records added.


O.
________
trichomes pictures


Last edited by ofer71 on Sat Feb 05, 2011 11:29 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Tue Jan 24, 2006 10:57 pm    Post subject: Reply with quote

you can use sysdsn to check if member exists or not.
Back to top
View user's profile Send private message Send e-mail
ranjit5311
Beginner


Joined: 27 Nov 2005
Posts: 27
Topics: 14

PostPosted: Fri Jan 27, 2006 6:57 am    Post subject: Reply with quote

address TSO
"ALLOC DD(TEST) DSN('THISIS.ANAME(NEWMEMBR)') SHR"

If i am replacing the member name by a temp variables(i.e. putting any variables let say VAR1 in place of the 'THISIS.ANAME(NEWMEMBR)), then i am getting RC = 12 . why i am geting RC=12 ,Can we use variable which have the member name for allocating?
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Fri Jan 27, 2006 7:03 am    Post subject: Reply with quote

Could you post the results of your TRACE of the ALLOC step? Something to check for - make sure there are no imbedded blanks in either the dataset or member name.

If VAR1 is 'NEWMEMBR', then you can allocate the DD as:

Code:

"ALLOC DD(TEST) DSN('THISIS.ANAME("VAR1")') SHR"
Back to top
View user's profile Send private message
ranjit5311
Beginner


Joined: 27 Nov 2005
Posts: 27
Topics: 14

PostPosted: Fri Jan 27, 2006 7:23 am    Post subject: Reply with quote

Thanks every body for pouring valuble information, now I can allocate the the member for the PDS.
_________________
One should move lightly through the life, carrying no excess baggage.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
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