Page 1 of 2

How to take backup of huge number of datasets

PostPosted: Fri Jan 06, 2012 10:17 am
by skankatala
I have PS file containing list of disk datasets. I need to copy the list of JCLs on to tape.

Now, I am doing this manually...

How to automate this process?


Thank you....

Re: How to take backup of huge number of datasets

PostPosted: Fri Jan 06, 2012 10:26 am
by dick scherrer
Hello,

JCL cannot do this.

Depending on how you want to implement a process, various utilities, rexx, cobol, or something else could be used to implement such a process.

i have PS file containing list of disk datasets. I need to copy the list of JCLs on to tape.
What do you want to do really. . . Copy the datasets in the list or some set of "JCLs" to tape?

You need to provide a clearer description of that you have (some sample data from the PS file) and what you want as output. Should each "thing" be copied to a separate tape or should a multi-file volume be created or something else.

Re: How to take backup of huge number of datasets

PostPosted: Fri Jan 06, 2012 11:06 am
by skankatala
MTPLV01.MAJORDS.ASDFATTB.D5010.G1293V00
MTPLV01.MAJORDS.ASDFATTB.D5010.G1294V00
MTPLV01.MAJORDS.ASDFATTB.D5010.G1295V00
MTPLV01.MAJORDS.ASDFATTB.D5010.G1296V00
MTPLV01.MAJORDS.ASDFATTB.D5010.G1297V00
MTPLV01.MAJORDS.ASDFATTB.D5010.G1298V00
MTPLV01.MAJORDS.ASDFATTB.D5010.G1299V00
MTPLV01.MAJORDS.ASDFATTB.D5010.G1300V00
MTPLV01.MAJORDS.ASDFATTB.D5010.G1301V00


This is the sample file. It has list of data sets. All of those are in Disk.
I need to copy them on to Tape individually .
Tape data set should start with different Qualifier,
for ex The output dataset should be like MTPLVTD.MAJORDS.ASDFATTB.D5010.G1293V00

Please let me know any automation process for this....

Re: How to take backup of huge number of datasets

PostPosted: Fri Jan 06, 2012 11:34 am
by NicC
You should look at ADRDSSU to see if that will do what you need as it IS the approved IBM backup software. If you want what you describe then you will need to write a program to read your dataset with its list of datasets and for each dataset generate a the copy JCL for whichever utility you want to use - IEBGENER probably. You can then have your program submit the job or save it for manual submission afterwards. Your best bet would be to use Rexx and ISPF File Tailoring. Samples are on the forum (as is this question in various guises so I assume you disobeyed the forum rules and did not search before posting)

Re: How to take backup of huge number of datasets

PostPosted: Fri Jan 06, 2012 8:46 pm
by Peter_Mann
skankatala wrote:I have PS file containing list of disk datasets. I need to copy the list of JCLs on to tape.

Now, I am doing this manually...

How to automate this process?


Thank you....

ADRDSSU is great if you want to copy all datasets to a single backup tape, maybe another solution is to create a simple inline proc using IEBGENER , IDCAMS or whatever utility suites you best.
I have used inline procs to copy PDS's using IEBCOPY and copy sequential files using IEBGENER, here's a sample
 //COPY     PROC                                       
//COPY     EXEC  PGM=IEBGENER,REGION=0M                                 
//SYSPRINT DD  SYSOUT=*                                       
//SYSUT1        DD  DSN=&IDSN,                                     
//              DISP=SHR 
//SYSUT2        DD  DSN=&ODSN,                                     
//              DISP=SHR
//SYSIN     DD DUMMY                                                   
//            PEND                                               
//A  EXEC COPY,IDSN=MTPLV01.MAJORDS.ASDFATTB.D5010.G1293V00,
//            ODSN=MTPLVTD.MAJORDS.ASDFATTB.D5010.G1293V00
//B  EXEC COPY,IDSN=.....,ODSN=.....
etc
                 

SYSUT2 will need to be modified, DISP, UNIT,.....etc according to your site standards.
just repeat the EXEC COPY proc statement for how many datasets you need to copy or backup.

Re: How to take backup of huge number of datasets

PostPosted: Sat Jan 07, 2012 12:01 am
by dick scherrer
Hello,

Yup, the inline proc will give you what you want and does have a bit of flexability.

If you create an individual output file for each input, suggest you use the sort product in use on your system - the sort is extremely faster than the original IEBGENER. If your system automatically executes the sort product (under the covers) for simple IEBGENER executions, this will not improve the performance.

Re: How to take backup of huge number of datasets

PostPosted: Sat Jan 07, 2012 12:28 am
by Peter_Mann
dick scherrer wrote:Hello,

Yup, the inline proc will give you what you want and does have a bit of flexability.

If you create an individual output file for each input, suggest you use the sort product in use on your system - the sort is extremely faster than the original IEBGENER. If your system automatically executes the sort product (under the covers) for simple IEBGENER executions, this will not improve the performance.


Agree, I've have a number of JCL's using different utilities based on requirments, for the OP's requirements to backup large files, SORT would be my first choice
Peter

Re: How to take backup of huge number of datasets

PostPosted: Sat Jan 07, 2012 12:08 pm
by skankatala
Currently I am using a SORT utility to copy a dataset from tape to disk.

I need an advise to read a dataset name from the ps file and i need to give that as input to my jcl and the output dataset name also same as input dataset except the first qualifier.

This loop should repeat for each and every dataset.

NOTE: First qualifier of All the input datasets are same. So the output should be same as input dataset except the first qualifier.

If input dataset names are like below :

MTPLV01.MAJORDS.ASDFATTB.D5010.G1293V00
MTPLV01.MAJORDS.ASDFATTB.D5010.G1294V00
MTPLV01.MAJORDS.ASDFATTB.D5010.G1295V00


The output dataset names should be:

TSMABC.MAJORDS.ASDFATTB.D5010.G1293V00
TSMABC.MAJORDS.ASDFATTB.D5010.G1294V00
TSMABC.MAJORDS.ASDFATTB.D5010.G1295V00


I am trying to automate this process.
Please help me...

Please let me know if you need any other information.

Re: How to take backup of huge number of datasets

PostPosted: Sat Jan 07, 2012 12:49 pm
by BillyBoyo
You need a program. What mainframe languages are you familiar with?

You have two input files. One is an "outline" or "skeleton" of the jcl you want for the sort. The other is your list of datasets.

You take the first from your list of datasets. You make from it a new name with the desired HLQ, You take those two names and apply them to the outline/skeleton giving you a complete piece of JCL. You write that to an output file. Continue until end.

There are a couple of details, like whether you have a Job for each dataset combination (easier) or a step (have to look at max-number of steps)? Do you want to subit all the jcl at once, or do you want to store in a PDS? Do you want to use the Internal reader? Etc.

However, all of those can be dealt with (largely) through changing the outline/skeleton once you have the basic program up.

Re: How to take backup of huge number of datasets

PostPosted: Sat Jan 07, 2012 2:13 pm
by skankatala
BillyBoyo wrote:You need a program. What mainframe languages are you familiar with?

You have two input files. One is an "outline" or "skeleton" of the jcl you want for the sort. The other is your list of datasets.

You take the first from your list of datasets. You make from it a new name with the desired HLQ, You take those two names and apply them to the outline/skeleton giving you a complete piece of JCL. You write that to an output file. Continue until end.

There are a couple of details, like whether you have a Job for each dataset combination (easier) or a step (have to look at max-number of steps)? Do you want to subit all the jcl at once, or do you want to store in a PDS? Do you want to use the Internal reader? Etc.

However, all of those can be dealt with (largely) through changing the outline/skeleton once you have the basic program up.



Hello Billy....

What ever you understand the problem is exactly correct. I am not familier with other languages. So, I am trying to fulfill this request with JCL. It would be good, if one step that accepts my input, output datasets and that should be a procedure. So that I can call the same procedure again and again.