IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

stacking files on a tape


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Wed Aug 17, 2016 11:11 pm
Reply with quote

I am not a user of tapes.

Someone asked me about how to 'stack files' on a tape, from my tool. I probably need to change the JCL that is created. I hope someone can correct me if I am wrong.

Is it a matter of simply using a series of DD statements like this?
Code:
//OUT1  DD DISP=(,CATLG),DSN=USERID.TEST.WORK1,LABEL=(1,SL), 
//   UNIT=3480,VOL=SER=FORUM                                 
//OUT2  DD DISP=(,CATLG),DSN=USERID.TEST.WORK2,LABEL=(2,SL), 
//   UNIT=3480,VOL=SER=FORUM 
//OUT3  DD DISP=(,CATLG),DSN=USERID.TEST.WORK3,LABEL=(3,SL), 
//   UNIT=3480,VOL=SER=FORUM 
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Wed Aug 17, 2016 11:42 pm
Reply with quote

That's pretty much it. I've seen referback used a number of times to ensure the same tape is used for each data set, especially when writing to a scratch tape where the volume serial isn't known until execution time.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Aug 18, 2016 1:03 am
Reply with quote

I've done it like that from multiple steps.

I've recently seen comment that it is a bit of an "old" way to do things, so what is the particular purpose of the stacking?
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Aug 18, 2016 5:15 am
Reply with quote

Someone gave me this example, as what I probably have to change to:
Code:
Step 1:
//OUTDD1    DD DSN=dsnA, 
//             UNIT=TAPE,LABEL=(1,SL),       
//             DISP=(NEW,CATLG),         
//             VOL=(,RETAIN,,99)

Step 2:                 
//OUTDD2    DD DSN=dsnB,   
//             UNIT=AFF=OUTDD1,LABEL=(2,SL),     
//             DISP=(NEW,CATLG),         
//             VOL=(,RETAIN,,99,REF=*.OUTDD1) 
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Aug 18, 2016 5:22 am
Reply with quote

Quote:
so what is the particular purpose of the stacking?


It is probably not a big deal for a few data sets, but if they have a few hundred data sets, the time to mount the tape and position to where it needs to be might add up. I do not have a good concept of the time... my guess is maybe the job running 20 minutes longer (elapsed time).

Likewise, if it is set of related data sets, eventually you may want to copy back from the tape and if they are all together, it would really simplify the task.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Aug 18, 2016 5:13 pm
Reply with quote

why not evaluate the use of ADRDSSU ?
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Aug 18, 2016 9:19 pm
Reply with quote

Quote:
why not evaluate the use of ADRDSSU ?

These are DB2 objects... best handled by DB2 utilities.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Thu Aug 18, 2016 11:15 pm
Reply with quote

Quote:
Likewise, if it is set of related data sets, eventually you may want to copy back from the tape and if they are all together, it would really simplify the task.

Some shops run batch jobs to redistribute tape data sets to free up unused tape, and as a result, your data sets may end up on different volumes anyway. You might want to check with the tape storage folks to see what they do.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top