IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

To copy attributes of one SMS DS to another


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
iknow

Active User


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

PostPosted: Sun Nov 20, 2005 2:54 pm
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
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: 411
Location: Colarado, US

PostPosted: Tue Nov 22, 2005 10:02 am
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
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: 411
Location: Colarado, US

PostPosted: Tue Nov 22, 2005 1:57 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts DB2 Table - Image copy unload IBM Tools 2
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
Search our Forums:

Back to Top