IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

create member in pds


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
JOYEETA PAUL
Currently Banned

New User


Joined: 18 Sep 2008
Posts: 17
Location: bangalore

PostPosted: Wed Nov 12, 2008 11:28 am
Reply with quote

i want to write a rexx prog which will contain code to
1) search in all the members in a specific pds and
2) create a new memeber each time with the searched result

Can anybody help me with giving codes for that.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Nov 12, 2008 11:37 am
Reply with quote

There are plenty of code examples here:

www.ibmmainframes.com/viewtopic.php?t=16980&highlight=isrsupc
www.ibmmainframes.com/viewtopic.php?t=20602&highlight=isrsupc
www.ibmmainframes.com/viewtopic.php?t=32122&highlight=isrsupc
www.ibmmainframes.com/viewtopic.php?t=32262&highlight=lmmadd
www.ibmmainframes.com/viewtopic.php?t=21453&highlight=lmmadd
Back to top
View user's profile Send private message
JOYEETA PAUL
Currently Banned

New User


Joined: 18 Sep 2008
Posts: 17
Location: bangalore

PostPosted: Thu Nov 13, 2008 7:20 pm
Reply with quote

I need rexx code to create a new member in a existing PDS.
Back to top
View user's profile Send private message
JOYEETA PAUL
Currently Banned

New User


Joined: 18 Sep 2008
Posts: 17
Location: bangalore

PostPosted: Thu Nov 13, 2008 7:26 pm
Reply with quote

superk,
I saw ur reply. I tried with the code whatever is there in last link. But that code is not working. actually i use that code to create a new member in my existing PDS.but is saying 'no routine found'.
My code is :
Code:

/*REXX*/                                                           
/*CREATES PDS*/                                                   
/*ASSINGN THE DD NAME TO MEMBER*/                                 
/*"ALLOC DA('"JOP3I0.TEST.JCLPDS(NEW_MEM)"') DD(MYDD) OLD REUSE" */
"ALLOC FI(MYDD) DA('"JOP3I0.TEST.JCLPDS(NEW_MEM)"') SHR REUSE"     
/*WRITE A LINE INTO NEW MEMBER*/                                   
QUEUE "NEW_MEM"                                                   
"EXECIO * DISKW  MYDD (FINIS "                                     
"FREE F(OUTFILE)"         


here NEW_MEM is my new member and JOP3I0.TEST.JCLPDS is my existing PDS

Can anybody tell me what is the wrong in that code?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Nov 13, 2008 7:35 pm
Reply with quote

"NEW_MEM" is not a valid PDS member name.

This would work, though:

"ALLOC FI(MYDD) DA('"JOP3I0.TEST.JCLPDS(NEWMEM)"') SHR REUSE"
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Fri Nov 14, 2008 3:12 am
Reply with quote

Code:
"ALLOC FI(MYDD) DA('"JOP3I0.TEST.JCLPDS(NEW_MEM)"') SHR REUSE"     

I think your quotes are mis-placed. Rexx will try to resolve this: JOP3I0.TEST.JCLPDS(NEW_MEM), before actually performing the ALLOC. Because of the parenthesis, it looks like a function call to the rexx processor.
Back to top
View user's profile Send private message
JOYEETA PAUL
Currently Banned

New User


Joined: 18 Sep 2008
Posts: 17
Location: bangalore

PostPosted: Sat Nov 15, 2008 3:29 pm
Reply with quote

thank you to both of you.now that code is working. But 1 confusion i have.what is the use of outfile here.i mean what is the meaning of the code :"FREE F(OUTFILE)" .Can you tell me?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Sat Nov 15, 2008 8:37 pm
Reply with quote

1.17 FREE Command.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Sun Nov 16, 2008 8:03 am
Reply with quote

It should be consistent with the rest of the program and refer to MYDD

Code:
"FREE F(MYDD)"
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Mon Nov 17, 2008 4:34 pm
Reply with quote

same functionality.


Code:
PULL PROGRAM                                                           
PROG="XK89.SYSIN.PDS("PROGRAM")"                                       
PROG1 = PROG                                                           
"ALLOC F(OUTDD) DS('"PROG1"') OLD REUSE"    /*DD NAME ALLOCATION*/     
OUT.0=1                                                                 
OUT.1="somecrazystuff"PROGRAM                                                       
"EXECIO * DISKW OUTDD (FINIS STEM OUT."    /*WRITE IN MEMBER*/         
"FREE FILE(OUTDD)"                                                     
EXIT   
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
No new posts Searching for a member but don't know... TSO/ISPF 6
No new posts Looking For a PDS Member Without Open... PL/I & Assembler 10
No new posts create rexx edit Macro that edits the... CLIST & REXX 3
Search our Forums:

Back to Top