Page 1 of 1

Want to take backup of file

PostPosted: Wed Mar 28, 2018 8:36 am
by artlk
Hi,

I want to take backup of all dataset which starts with a particular high level qualifier with new high level qualifier

Ex: Original files starts with ART1.FILENAME.JCL TO ARU1.FILENAME.JCL

Like this i want to take backup all datasets which starts with ART1* TO ARU1*

Thanks in Advance!!

Re: Want to take backup of file

PostPosted: Wed Mar 28, 2018 10:01 am
by steve-myers
  1. The only "files" in operating systems derived from OS/360 and DOS/360 is data on magnetic tape between the beginning of the tape and a "tape mark" or "file mark;" or between two "file marks" or "tape marks." A "tape mark" and a "file mark" are the same thing.
  2. Your ART1.FILENAME.JCL and ARU1.FILENAME.JCL appear to be describing "data sets," not "files." Use the correct terminology.
It appears to me that you need instruction in methods to copy one data set to another data set. There are many IBM programs you can use to accomplish this task. Most of us have programs we like for this task, and documentation for these programs is readily available. Two of the most common: IEBGENER and the data set copy function in the sort program your site uses. Many people regard the data set copy function in the sort program as more efficient than IEBGENER. Preparing JCL to use these programs is a little more difficult since you have to determine where the output data set will be located, and if you propose to put the output data set on direct access storage, you have to determine its space requirement. We can't help you with that, as it depends on the space occupied by the input data set. Good luck. You now know enough to start your real research.

Re: Want to take backup of file

PostPosted: Wed Mar 28, 2018 11:25 am
by expat
It also depends on the media of the datasets, using ADRDSSU would be so very easy for DASD datasets yet unusable for tape datasets.

Re: Want to take backup of file

PostPosted: Wed Mar 28, 2018 3:33 pm
by willy jensen
Judging by the description, I would think that ADRDSSU is the best choice. But as expat says, only for disk dataset.

Re: Want to take backup of file

PostPosted: Wed Mar 28, 2018 7:22 pm
by steve-myers
Provided you are doing a disk to disk copy, as both expat and Mr. Jensen say, ADRDSSU might well be your best choice, especially if your goal is to copy a group of data sets in a single operation. I think you will find its command language to be rather difficult to master. But that's just my personal opinion.

Re: Want to take backup of file

PostPosted: Wed Mar 28, 2018 8:12 pm
by prino
Why isn't anyone asking why the TS wants to make those backups, and why isn't anyone pointing out the obvious, ie that a new HLQ needs an ALIAS to be defined first, as not doing so will catalog the datasets in the Master Catalog, and that would be a pretty bad thing to do...

Re: Want to take backup of file

PostPosted: Wed Mar 28, 2018 8:21 pm
by Robert Sample
as not doing so will catalog the datasets in the Master Catalog,
Only if the person has authority to write to the Master Catalog -- and few, if any, application programmers will have such authority. More likely the job will fail as soon as the first write is attempted to the Master Catalog. As a system programmer, I've done this accidentally a few times and had to re-catalog the data sets in the appropriate user catalog.