View previous topic :: View next topic
|
Author |
Message |
iknow
Active User
Joined: 22 Aug 2005 Posts: 411 Location: Colarado, US
|
|
|
|
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 |
|
|
Phantom
New User
Joined: 04 Sep 2005 Posts: 25
|
|
|
|
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 |
|
|
iknow
Active User
Joined: 22 Aug 2005 Posts: 411 Location: Colarado, US
|
|
|
|
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:
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 |
|
|
Phantom
New User
Joined: 04 Sep 2005 Posts: 25
|
|
|
|
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 |
|
|
iknow
Active User
Joined: 22 Aug 2005 Posts: 411 Location: Colarado, US
|
|
|
|
Hi Phantom,
Thanks for your reply...
Sorry I didn't check the code. Anyways I will look into your logic. |
|
Back to top |
|
|
|