View previous topic :: View next topic
|
Author |
Message |
JOYEETA PAUL Currently Banned New User
Joined: 18 Sep 2008 Posts: 17 Location: bangalore
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
JOYEETA PAUL Currently Banned New User
Joined: 18 Sep 2008 Posts: 17 Location: bangalore
|
|
|
|
I need rexx code to create a new member in a existing PDS. |
|
Back to top |
|
|
JOYEETA PAUL Currently Banned New User
Joined: 18 Sep 2008 Posts: 17 Location: bangalore
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
"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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
JOYEETA PAUL Currently Banned New User
Joined: 18 Sep 2008 Posts: 17 Location: bangalore
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
It should be consistent with the rest of the program and refer to MYDD
|
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
|