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
 

 

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: 4649
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: 8121
Location: East Dubuque, Illinois, 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: 8121
Location: East Dubuque, Illinois, 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
No new posts RMM: scratching a volume that RMM thi... Hervey Martinez IBM Tools 0 Mon May 15, 2017 8:51 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts IMS DC screen Access sivasaras IMS DB/DC 3 Fri Nov 18, 2016 6:38 pm


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