Page 1 of 2

Can one "referback" space for a dataset

PostPosted: Tue Jul 24, 2012 7:31 pm
by dja2
I know that one can "referback" dataset record format and length by, (e.g.), "*.OUTPUT". Can one utilise this method when assigning the space a dataset requires? This would be especially useful when copying a dataset.

Re: Can one "referback" space for a dataset

PostPosted: Tue Jul 24, 2012 7:37 pm
by Monitor
Have a look in the manual for LIKE= operand.

Re: Can one "referback" space for a dataset

PostPosted: Tue Jul 24, 2012 7:45 pm
by dja2
Thanks very much - I suppose it's obvious when it's pointed out. Thanks again

Re: Can one "referback" space for a dataset

PostPosted: Tue Jul 24, 2012 9:19 pm
by dick scherrer
Hello,

Depending on what and how you are copying, the output dataset characteristics will automatically be copied if you use your sort product to do the copy. The sort will typically outperform other file-copy tools.

Re: Can one "referback" space for a dataset

PostPosted: Wed Jul 25, 2012 12:25 pm
by mongan
I like ADRDSSU for copying datasets.

Re: Can one "referback" space for a dataset

PostPosted: Wed Jul 25, 2012 12:51 pm
by dja2
Dick and Mongan, thanks for the replies.

If SORT copies the input attributes, will SORT override the attributes specified in the JCL?

Also, thanks for mentioning "ADRDSSU ", I've not heard of this before, and looking at the SAW manual, there seems to be a whole load of very useful things to explore.

Re: Can one "referback" space for a dataset

PostPosted: Wed Jul 25, 2012 7:50 pm
by dick scherrer
Hello,

If SORT copies the input attributes, will SORT override the attributes specified in the JCL?
Suggest you run a test on your system and see what happens.

I believe the output file will have the attributes specified in the jcl. I think i mis-spoke earlier - i forgot we were talking about SPACE and i believe that still needs to be specified (rather than DCB info which sort will use from the input dataset).

If you run a couple of tests, you will know for sure what will happen on your system (and we'd be interested to hear as well :) ).

Re: Can one "referback" space for a dataset

PostPosted: Fri Jul 27, 2012 1:35 am
by Peter_Mann
A quick search educated me, I didn't think LIKE would copy SPACE attributes......

The LIKE parameter is used to copy the attributes and allocation
information for a new data set from an existing data set. LIKE is
ignored other than syntax checking if SMS is not active.

You can copy LRECL, RECFM, KEYOFF, KEYLEN, SPACE, AVGREC, and data set
organization (RECORG) using the LIKE parameter. If you code any of the
JCL parameters on the same DD statement as LIKE, then they override the
parameter modeled by LIKE.
etc.....

Re: Can one "referback" space for a dataset

PostPosted: Fri Jul 27, 2012 12:42 pm
by dja2
Peter, thanks very much for taking the time to give such a comprehensive reply. Regards.

Re: Can one "referback" space for a dataset

PostPosted: Fri Aug 17, 2012 8:07 pm
by dja2
Thanks everyone, eventually got time to try LIKE - superb

//STEP020 EXEC PGM=IEBGENER,COND=(0,NE)
//SYSUT1 DD DSN=TQIAA04.S0000,DISP=SHR
//SYSUT2 DD DSN=TQIAA04.S0000.VX,
// DISP=(NEW,CATLG,DELETE),
// LIKE=TQIAA04.S0000
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY