Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to access multi volume using setenv option

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
SayantaniKundu

New User


Joined: 24 Nov 2008
Posts: 6
Location: Kolkata

PostPosted: Tue May 04, 2010 11:13 am    Post subject: How to access multi volume using setenv option
Reply with quote

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
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Tue May 04, 2010 3:29 pm    Post subject: Reply to: How to access multi volume using setenv option
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8281
Location: Dubuque, Iowa, USA

PostPosted: Tue May 04, 2010 5:03 pm    Post subject:
Reply with quote

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
View user's profile Send private message
SayantaniKundu

New User


Joined: 24 Nov 2008
Posts: 6
Location: Kolkata

PostPosted: Tue May 04, 2010 6:09 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8281
Location: Dubuque, Iowa, USA

PostPosted: Tue May 04, 2010 6:31 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. How to acheive Multi thread parallel ... pkmurali Compuware & Other Tools 1 Sun Mar 25, 2018 10:46 am
No new posts RMM Cannot move a volume from SHELF l... tspr52 IBM Tools 0 Thu Mar 01, 2018 3:48 pm
No new posts VALIDATE option in BIND jcl Poha Eater DB2 2 Mon Feb 26, 2018 7:08 pm
No new posts Receommendations required for adding ... Alan Playford JCL & VSAM 4 Wed Feb 14, 2018 4:01 pm
No new posts ISMF Difference between volume count ... upendrasri IBM Tools 2 Tue Dec 05, 2017 12:40 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us