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

Creating Member using REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bhavya_sha

New User


Joined: 16 Apr 2005
Posts: 33

PostPosted: Thu Apr 01, 2010 12:06 pm
Reply with quote

Hi,

i've to allocate a PDS which i did successfully , while creating a member i should pass the name dynamically where in before executing below step variable TRANSF = APG023T

i have to create member with name APG023T how can i pass this while creating a member but below code is creating a member as TRANSF

"ALLOCATE DATASET('"V0C2663.xxxx" F(OUTFIL) MOD ",
"SPACE(10,20) DIR(10) DSORG(PO) RECF
"FREE F(OUTFIL)"

TRANSF1 = 'V0C2663.JAP2ENG(TRANSF)'

could any1 help me on this..
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Apr 01, 2010 12:22 pm
Reply with quote

Where do you set the value for TRANSF

Also, do not allocate a PDS with DISP=MOD
Where are the RECFM & LRECL parameters for the PDS
Directory blocks should be ( N * 45 ) - 1, where N is a whole number of tracks.
Back to top
View user's profile Send private message
Ranjithkumar

New User


Joined: 10 Sep 2008
Posts: 93
Location: India

PostPosted: Thu Apr 01, 2010 12:28 pm
Reply with quote

@bhavya_sha

Try this :

Code:
TRANSF = 'XXXXXXXX'
TRANSF1 = 'V0C2663.JAP2ENG('||TRANSF||')'
Back to top
View user's profile Send private message
bhavya_sha

New User


Joined: 16 Apr 2005
Posts: 33

PostPosted: Thu Apr 01, 2010 12:35 pm
Reply with quote

Value of TRANSF is set just before calling Allocate para as below and i'am giving mod because i am running the code many times , if 'MOD' is not used i may have to delete the PDS everytime before running .

ALLOC_FILE_PARA:

"ALLOCATE DATASET('"V0C2663.JAP2ENG"') F(OUTFIL) MOD ",
"SPACE(10,20) DIR(449) DSORG(PO) RECFM(F,B) LRECL(80) BLKSIZE(8000)"
"FREE F(OUTFIL)"

TRANSF = 'V0C2663.JAP2ENG(TRANSF)'
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Apr 01, 2010 12:45 pm
Reply with quote

bhavya_sha wrote:
if 'MOD' is not used i may have to delete the PDS everytime before running .
Where on earth did you get that idea from. Once the PDS has been created you can still add / delete / update members using DISP=OLD or DISP=SHR. It is the PDS name that you allocate, not the member name.

Code:
MEM = "Member name"
"ALLOC FI(PDSOUT) DA('Dataset name("MEM")') SHR"
"EXECIO "QUEUED()" DISKW PDSOUT ( FINIS"
The above code allocates a new member in an existing PDS and then writes to it.
Back to top
View user's profile Send private message
bhavya_sha

New User


Joined: 16 Apr 2005
Posts: 33

PostPosted: Thu Apr 01, 2010 12:53 pm
Reply with quote

thank you Ranjith it's working.

Expat my requirement was that the member had to get created only if certain conditions were met and had to delete members manually to verify..what are all results/files created each time before runnning my code otherwise old reports were still existing.

thank you very much for your inputs.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top