View previous topic :: View next topic
|
Author |
Message |
bhavya_sha
New User
Joined: 16 Apr 2005 Posts: 33
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Ranjithkumar
New User
Joined: 10 Sep 2008 Posts: 93 Location: India
|
|
|
|
@bhavya_sha
Try this :
Code: |
TRANSF = 'XXXXXXXX'
TRANSF1 = 'V0C2663.JAP2ENG('||TRANSF||')' |
|
|
Back to top |
|
|
bhavya_sha
New User
Joined: 16 Apr 2005 Posts: 33
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
bhavya_sha
New User
Joined: 16 Apr 2005 Posts: 33
|
|
|
|
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 |
|
|
|