View previous topic :: View next topic
|
Author |
Message |
SayantaniKundu
New User
Joined: 24 Nov 2008 Posts: 6 Location: Kolkata
|
|
|
|
Currently in my code I am dynamically allocating file within the program using SETENV
Code: |
STRING 'DSN(' DSN-NAME(1:DSN-LENGTH)'),'
'NEW,CYL,SPACE(100,100),UNIT(SYSDA)'
Z',CATALOG' DELIMITED BY SIZE
INTO ENV-VALUE.
MOVE 1 TO ENV-OVERWRITE.
CALL "SETENV" USING BY CONTENT ENV-NAME,
BY CONTENT ENV-VALUE,
BY CONTENT ENV-OVERWRITE. |
If I specify the dataset in a JCL I can access multi volume by specifying UNIT=(SYSDA,10)
Code: |
ASBO03FL DD DSN=AAA.TEST.DATASET,
DISP=(NEW,CATLG,DELETE),
SPACE=(CYL,(100,100),RLSE),
DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),
UNIT=(SYSDA,10) |
I am not able to give UNIT(SYSDA,10) in 'SETENV' to access multi volumes.
Can anyone please provide a solution? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
The TSO ALLOCATE command has both the UNIT and count (UCOUNT) parameters. Maybe you could use the TSO ALLOCATE routines instead (see examples in this forum). |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
SETENV is not as flexible as BPXWDYN. BPXWDYN allows the allocate statement to include MAXVOL(??) which is the count of volumes for a multi-volume data set. |
|
Back to top |
|
|
SayantaniKundu
New User
Joined: 24 Nov 2008 Posts: 6 Location: Kolkata
|
|
|
|
I need to use SETENV only as per the coding standard.Please suggest the way to access multi volume using setenv option. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
As far as I am aware, you cannot accomplish your goal. SETENV was designed to set environmental variables for use by Unix System Services programs, not for general allocation of MVS files.
You can pre-allocate the file on multiple volumes and use SETENV with disposition of OLD, or you can use BPXWDYN, or you can go back to whoever gave you the assignment and tell them it cannot be accomplished as specified. |
|
Back to top |
|
|
|