View previous topic :: View next topic |
Author |
Message |
kalicharan Beginner
Joined: 25 Sep 2004 Posts: 9 Topics: 4
|
Posted: Mon Dec 13, 2004 12:07 pm Post subject: How to convert temp datasets to permanent datasets. |
|
|
Hi
I am creating a temporary dataset in one step and in subsequent steps
I want to make it permanent.
Thanks
Kalicharan. _________________ Kalicharan |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
|
Posted: Mon Dec 13, 2004 12:56 pm Post subject: |
|
|
kalicharan,
Simply copy the temp dataset to a permanent dataset in another step.
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=YOUR TEMP DATASET,
// DISP=SHR
//SORTOUT DD DSN=YOUR PARAMANENT DATASET,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(X,Y),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
/*
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
kalicharan Beginner
Joined: 25 Sep 2004 Posts: 9 Topics: 4
|
Posted: Tue Dec 14, 2004 11:13 am Post subject: |
|
|
Hi Kolusu
Thanks for your quick reply.
Yes it is the only way we can do.
Even though if we change DISP parameter in the subsequent step,
the data set is deleting at end of the job.
Disp=(NEW,PASS,DELETE) is default for TEMP datasets.
Can't we change.
Thanks
Kalicharan. _________________ Kalicharan |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
|
Posted: Tue Dec 14, 2004 11:19 am Post subject: |
|
|
kalicharan,
The purpose of the temp datasets is that you create and delete within a job. If you really want to catalog the dataset then why not code it as regular dataset instead of a temp dataset?
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Fin Beginner
Joined: 19 Jan 2004 Posts: 27 Topics: 8
|
Posted: Thu Dec 16, 2004 12:11 pm Post subject: |
|
|
Hi Kolusu
I got a JCL error when I tried DISP=(NEW,CATLG,DELETE) and changed to
DISP=(NEW,PASS)...
Cheers, Fin |
|
Back to top |
|
 |
Fin Beginner
Joined: 19 Jan 2004 Posts: 27 Topics: 8
|
Posted: Thu Dec 16, 2004 12:19 pm Post subject: |
|
|
...following my last post I still have an issue with creating my temporary dataset - can anyone help?!
//SORTOUT DD DSN=&NAMEOFDATASET,
// UNIT=SYSDA,DISP=(NEW,PASS),
// RECFM=FB,LRECL=602,BLKSIZE=0,
// SPACE=(CYL,(10,2),RLSE)
!!!ERROR 8: MISSING OR INVALID DELIMITER AFTER -DSN- KEYWORD: . |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
|
Posted: Thu Dec 16, 2004 12:27 pm Post subject: |
|
|
Fin,
The temp dataset name(=&NAMEOFDATASET) Length is 14 which is not valid. Remember that you cannot have more than 8 characters for any qualifier in a dataset name. so change the name to 8 characters and your job will run fine
So change &NAMEOFDATASET to &NAMEOFDA
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Fin Beginner
Joined: 19 Jan 2004 Posts: 27 Topics: 8
|
Posted: Thu Dec 16, 2004 12:39 pm Post subject: |
|
|
Once again, thank you Kolusu.
That was my problem and thanks for the prompt response. |
|
Back to top |
|
 |
|
|