Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Creating Member using REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Creating Member using REXX
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: 8593
Location: Back in jolly old England

PostPosted: Thu Apr 01, 2010 12:22 pm    Post subject:
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: 94
Location: India

PostPosted: Thu Apr 01, 2010 12:28 pm    Post subject: Reply to: CREATING MEMBER USING REXX
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Apr 01, 2010 12:45 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us