View previous topic :: View next topic
|
Author |
Message |
ursvmg
New User
Joined: 24 May 2007 Posts: 52 Location: Chennai
|
|
|
|
Hi All,
I want to copy the DD parameters of one dataset to the other without explicitely mentioning the same parameters.
Consider this piece of code
Code: |
//STEP1 EXEC PGM=PGM1
//DD1 DD DSN=FILE.TEST.DATA ,DISP=(NEW,CATLG,DELETE),
// SPACE=(800,(100,20),RLSE),
// DCB=(LRECL=80,RECFM=FB,BLKSIZE=800)
//DD2 DD DSN=FILE.TEST.DATA.OUTOUT |
Here i want to mention the same DD parameters of DD1 to DD2, without mentioning all the parameters.....
Please Help me in this regard |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
After reading the reply to your other jcl question, use the "Manuals" link mentioned and do a bit of research on "backward reference" sometimes referred to as "referback".
If there are questions on that material, please let us know. |
|
Back to top |
|
|
ursvmg
New User
Joined: 24 May 2007 Posts: 52 Location: Chennai
|
|
|
|
Is this correct???
Code: |
//STEP1 EXEC PGM=PGM1
//DD1 DD DSN=FILE.TEST.DATA ,DISP=(NEW,CATLG,DELETE),
// SPACE=(800,(100,20),RLSE),
// DCB=(LRECL=80,RECFM=FB,BLKSIZE=800)
//DD2 DD DSN=FILE.TEST.DATA.OUTOUT
// LIKE=STEP1.DD1 |
Please correct me, if i'm wrong |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I believe you will need a comma after "OUTOUT" in DD2. The LIKE parameter appears to be indented too much - it needs to start in pos 16 or before.
Your best bet is to try your jcl on your system and see what happens.
Even if this works, i believe you will want more understanding of what all it did and why it did what it did. There is more info in the manual about LIKE and other methods of backward reference. There are differences in how sms-managed datasets and non-sms datasets are handled.
If you just want to copy a dataset and have the output dcb info the same as the input, you can do this automatically with IEBGENER or your SORT product. |
|
Back to top |
|
|
ursvmg
New User
Joined: 24 May 2007 Posts: 52 Location: Chennai
|
|
|
|
LIKE parameter is used by MVS only if SMS (System Managed Storage)
is installed and operational. For a non SMS dataset, this cannot be used.
LIKE will copy LRECL, RECFM, KEYOFF, KEYLEN, SPACE, AVGREC, and data set
organization (RECORG).
Instead for a non SMS dataset, i used this piece of code to copy the dcb parameters
Code: |
//STEP1 EXEC PGM=IEBGENR
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=X.TEST.DATA.IN,
// DISP=SHR
//SYSUT2 DD DSN=X.TEST.DATA.OUT,
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(10,10),RLSE),
// DCB=*.SYSUT1
//SYSIN DD DUMMY |
This worked fine.......
Please correct me if I'm wrong.... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Gopal,
Yup, that should work as you wish.
If you have the time and the inclination, you might also run that job without the referback (after deleting the output file from your proof run ). The output will have a message that the output dcb info was copied from the input.
Good luck and thanks for posting your result |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
Too late but I think he followed your advise Dick and got somewhere here |
|
Back to top |
|
|
|