View previous topic :: View next topic
|
Author |
Message |
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
why not evaluate the use of ADRDSSU ? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Quote: |
why not evaluate the use of ADRDSSU ? |
These are DB2 objects... best handled by DB2 utilities. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
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 |
|
|
|