Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us