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 

Error in using ISPF Skeletons
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
Mukunda
Beginner


Joined: 11 Dec 2002
Posts: 46
Topics: 15

PostPosted: Mon Jun 02, 2003 1:48 pm    Post subject: Reply with quote

For the benefit of those who want to try out their fingers at ISPF skeletons, I'm posting the REXX macro and skeleton JCL.
REXX MACRO

Code:
/*REXX*/                                               
arg NEWDS OLDDS                                         
if (NEWDS = '') then do                                 
   say "Missing New file name - to be created"         
   exit                                                 
end                                                     
if (OLDDS = '') then do                                 
   say "Missing Existing file name - to be cloned"     
   exit                                                 
end                                                     

/* Look at the current CLIST dataset for skeletons */   
"ispexec libdef ispslib library id(sysproc)"           

/* open the skeleton and output to temp dataset */     
"ispexec ftopen temp"                                   
"ispexec ftincl DSCLONE"  /*DSCLONE is where the skeleton jcl lies*/                             

/* close the output */                                 
"ispexec ftclose"                                       
"ispexec vget (ztempf) shared"                         

/*submits JCL at temp dataset */
"submit '"ztempf"'" 
exit 0


JCL SKELETON

Code:
//*                                                                     
//**********************************************************************
//* TO CREATE A FILE (PS/PDS) BY CLONING ATTRIBUTES OF ANOTHER FILE    *
//**********************************************************************
//*                                                                     
//STEP010  EXEC  PGM=IEFBR14                                           
//CREAT    DD  DSN=&NEWDS,                                             
//             LIKE=&OLDDS,                                             
//             DISP=(,CATLG,),                                         
//             UNIT=SYSDA                                               
//*                                                                     
//**********************************************************************
//* TO COPY THE CONTENTS OF OLDDS TO NEWDS CREATED AT STEP010          *
//**********************************************************************
//*                                                                     
//STEP020  EXEC  PGM=SORT                                               
//SORTIN   DD DSN=&OLDDS,                                               
//         DISP=SHR                                                     
//SORTOUT  DD DSN=&NEWDS,                                               
//         DISP=SHR                                                     
//SYSIN    DD *                                                         
 SORT FIELDS=COPY                                                       
//SYSOUT   DD SYSOUT=Q                                                 
//*


You can invoke this from the command line with
Code:
<REXX MACRO MEMBER NAME> NEW.DATASET EXISTING.DATASET


It will be easy (avoids confusion Razz ) if we keep both the rexx macro and the skeleton jcl in the same PDS.
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 -> TSO and ISPF All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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