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 Profile Log in to check your private messages Log in
 
To copy attributes of one SMS DS to another

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

Active User


Joined: 22 Aug 2005
Posts: 413
Location: Colarado, US

PostPosted: Sun Nov 20, 2005 2:54 pm    Post subject: To copy attributes of one SMS DS to another
Reply with quote

Hi folks,

Can anyone tell me how can the attributes of one SMS dataset be copied to another dataset ? Please I need a clear explanation.
Back to top
View user's profile Send private message

Phantom

New User


Joined: 04 Sep 2005
Posts: 25

PostPosted: Mon Nov 21, 2005 5:40 pm    Post subject:
Reply with quote

iKnow,

I am new to this mainframe board and I have no idea about the skill level of anyone here.

Quote:

Can anyone tell me how can the attributes of one SMS dataset be copied to another dataset ? Please I need a clear explanation.


In JCL, you can use the referback parameter to copy any of the attribute of a given dataset to another. Please see below.

Code:

//SORTIN   DD  DSN=MY.INPUT.FILE,DISP=SHR
//SORTOUT  DD  DSN=MY.OUTPUT.FILE,
//                 DISP=(NEW,CATLG,DELETE),
//                 UNIT=*.SORTIN,
//                 DATACLAS=*.SORTIN,
//                 STORCLAS=*.SORTIN,


When you use SORT to create a output file, you don't have to worry about DCB parameters as SORT automatically copies the DCB of SORTIN to SORTOUT.

Hope this helps,

Thanks,
Phantom
Back to top
View user's profile Send private message
iknow

Active User


Joined: 22 Aug 2005
Posts: 413
Location: Colarado, US

PostPosted: Tue Nov 22, 2005 10:02 am    Post subject: Re: To copy attributes of one SMS DS to another
Reply with quote

Hi Phantom,

Thanks for your reply...

But clarify one thing like "referback" parameter is used only in EXEC to refer to the previous DD statement which is being used.

So the code will be in the format:

Code:
EXEC=*.referback


As per your listing where exactly you have used referback parameter.

Please let me know if anyone comes with a solution for the above issue.
Back to top
View user's profile Send private message
Phantom

New User


Joined: 04 Sep 2005
Posts: 25

PostPosted: Tue Nov 22, 2005 12:56 pm    Post subject:
Reply with quote

iKnow,

Quote:

As per your listing where exactly you have used referback parameter.


Well, I have used referback in 3 places - UNIT, DATACLAS & STORCLAS. DATACLAS=*.SORTIN will force JCL to store the output file in the same dataclas as input file. Similarly UNIT & STORCLAS.

To verify the job, create a dummy input file in a Dataclas & Storclas which is not the default one in your shop, run the JCL that I gave and see where the output file is stored.

Thanks,
Phantom
Back to top
View user's profile Send private message
iknow

Active User


Joined: 22 Aug 2005
Posts: 413
Location: Colarado, US

PostPosted: Tue Nov 22, 2005 1:57 pm    Post subject: Re: To copy attributes of one SMS DS to another
Reply with quote

Hi Phantom,

Thanks for your reply...

Sorry I didn't check the code. Anyways I will look into your logic.
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 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
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm

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