MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to convert temp datasets to permanent datasets.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
kalicharan
Beginner


Joined: 25 Sep 2004
Posts: 9
Topics: 4

PostPosted: Mon Dec 13, 2004 12:07 pm    Post subject: How to convert temp datasets to permanent datasets. Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12377
Topics: 75
Location: San Jose

PostPosted: Mon Dec 13, 2004 12:56 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
kalicharan
Beginner


Joined: 25 Sep 2004
Posts: 9
Topics: 4

PostPosted: Tue Dec 14, 2004 11:13 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12377
Topics: 75
Location: San Jose

PostPosted: Tue Dec 14, 2004 11:19 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Fin
Beginner


Joined: 19 Jan 2004
Posts: 27
Topics: 8

PostPosted: Thu Dec 16, 2004 12:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
Fin
Beginner


Joined: 19 Jan 2004
Posts: 27
Topics: 8

PostPosted: Thu Dec 16, 2004 12:19 pm    Post subject: Reply with quote

...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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12377
Topics: 75
Location: San Jose

PostPosted: Thu Dec 16, 2004 12:27 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Fin
Beginner


Joined: 19 Jan 2004
Posts: 27
Topics: 8

PostPosted: Thu Dec 16, 2004 12:39 pm    Post subject: Reply with quote

Once again, thank you Kolusu.
That was my problem and thanks for the prompt response.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group