Can one "referback" space for a dataset



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Can one "referback" space for a dataset

Postby dja2 » Tue Jul 24, 2012 7:31 pm

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.
dja2
 
Posts: 20
Joined: Wed Jul 11, 2012 6:11 pm
Has thanked: 13 times
Been thanked: 0 time

Re: Can one "referback" space for a dataset

Postby Monitor » Tue Jul 24, 2012 7:37 pm

Have a look in the manual for LIKE= operand.

These users thanked the author Monitor for the post:
dja2 (Tue Jul 24, 2012 7:43 pm)
Monitor
 
Posts: 98
Joined: Wed Jan 18, 2012 8:59 pm
Has thanked: 0 time
Been thanked: 7 times

Re: Can one "referback" space for a dataset

Postby dja2 » Tue Jul 24, 2012 7:45 pm

Thanks very much - I suppose it's obvious when it's pointed out. Thanks again
dja2
 
Posts: 20
Joined: Wed Jul 11, 2012 6:11 pm
Has thanked: 13 times
Been thanked: 0 time

Re: Can one "referback" space for a dataset

Postby dick scherrer » Tue Jul 24, 2012 9:19 pm

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.
Hope this helps,
d.sch.

These users thanked the author dick scherrer for the post:
dja2 (Wed Jul 25, 2012 12:38 pm)
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Can one "referback" space for a dataset

Postby mongan » Wed Jul 25, 2012 12:25 pm

I like ADRDSSU for copying datasets.

These users thanked the author mongan for the post:
dja2 (Wed Jul 25, 2012 12:38 pm)
User avatar
mongan
 
Posts: 211
Joined: Tue Jan 11, 2011 8:32 pm
Has thanked: 1 time
Been thanked: 5 times

Re: Can one "referback" space for a dataset

Postby dja2 » Wed Jul 25, 2012 12:51 pm

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.
dja2
 
Posts: 20
Joined: Wed Jul 11, 2012 6:11 pm
Has thanked: 13 times
Been thanked: 0 time

Re: Can one "referback" space for a dataset

Postby dick scherrer » Wed Jul 25, 2012 7:50 pm

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 :) ).
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Can one "referback" space for a dataset

Postby Peter_Mann » Fri Jul 27, 2012 1:35 am

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.....
Peter

These users thanked the author Peter_Mann for the post:
dja2 (Fri Jul 27, 2012 12:41 pm)
Peter_Mann
 
Posts: 145
Joined: Fri Jun 24, 2011 7:37 pm
Location: Lowell,AR
Has thanked: 15 times
Been thanked: 3 times

Re: Can one "referback" space for a dataset

Postby dja2 » Fri Jul 27, 2012 12:42 pm

Peter, thanks very much for taking the time to give such a comprehensive reply. Regards.
dja2
 
Posts: 20
Joined: Wed Jul 11, 2012 6:11 pm
Has thanked: 13 times
Been thanked: 0 time

Re: Can one "referback" space for a dataset

Postby dja2 » Fri Aug 17, 2012 8:07 pm

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
dja2
 
Posts: 20
Joined: Wed Jul 11, 2012 6:11 pm
Has thanked: 13 times
Been thanked: 0 time

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post