Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to copy the DD parameters of other DSN

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ursvmg

New User


Joined: 24 May 2007
Posts: 52
Location: Chennai

PostPosted: Thu Jun 21, 2007 2:10 am    Post subject: How to copy the DD parameters of other DSN
Reply with quote

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
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 21, 2007 3:04 am    Post subject:
Reply with quote

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
View user's profile Send private message
ursvmg

New User


Joined: 24 May 2007
Posts: 52
Location: Chennai

PostPosted: Thu Jun 21, 2007 3:23 am    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 21, 2007 8:34 am    Post subject:
Reply with quote

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
View user's profile Send private message
ursvmg

New User


Joined: 24 May 2007
Posts: 52
Location: Chennai

PostPosted: Fri Jun 22, 2007 1:58 am    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jun 22, 2007 2:03 am    Post subject:
Reply with quote

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 icon_smile.gif ). The output will have a message that the output dcb info was copied from the input.

Good luck and thanks for posting your result icon_smile.gif
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Fri Jun 22, 2007 2:14 am    Post subject:
Reply with quote

Too late icon_redface.gif but I think he followed your advise Dick and got somewhere here
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
This topic is locked: you cannot edit posts or make replies. Selecting two copybooks of different ... Vignesh Sid COBOL Programming 8 Tue Sep 05, 2017 7:28 pm
No new posts XMITIP sends it out. Can it copy on l... Rommel Dayon Rustia IBM Tools 0 Tue Sep 05, 2017 10:16 am
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 7 Thu Apr 27, 2017 1:15 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us