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

File Tailoring Skeleton


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Pragati Soni

New User


Joined: 18 Jan 2008
Posts: 47
Location: India

PostPosted: Thu Apr 30, 2009 3:00 pm
Reply with quote

My requirement is : I will invoke a panel and will give some parameters. In the background one JCL skeleton is there, in the JCL some parameters need to be replaced like the userid of the current user should be written, the input file name should be changed, etc. On pressing enter the JCL should be submitted.

Also there should be an option of editing the JCL, if required.

I read the about MACROS and then came to know about File tailoring Skeletons.

On searching the file skeletons, I found very few things in the ISPF Dialogue Developers Guide MANUAL and some in the ISPF REFERENCE MANUAL. Only four comands are given FTOPEN, FTINCL, FTERASE and FTCLOSE with almost nill description.

Could you please illustrate or give any example on this.

Pragati
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Apr 30, 2009 3:26 pm
Reply with quote

I'm not quite sure about there being no information available.

There's a whole chapter on File Tailoring:

10.0 Chapter 10. Defining file-tailoring skeletons.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Thu Apr 30, 2009 3:27 pm
Reply with quote

Take a look in the ISPF Services Guide for further information.
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Thu Apr 30, 2009 3:32 pm
Reply with quote

Hi, see if this example helps you:

following are the rexx statements:

Code:

DATE   = DATE()                                                   
TIME   = TIME()                                                   
USER   = USERID()                                                 
/* ---------------------------------------------------------  */ 
JOBNAME = USERID() || "ST"                                       
SYSUID = "&SYSUID"                                               
TMPDSN = "MY.K2S.JCL"                                           
TMPJOB = USERID() || "KS"                                         
OUTDSN = SUBSTR(INDSN,1,LASTPOS('.KSDS',INDSN)-1)||'.SAMF'       
ADDRESS TSO "ALLOC FI(TMPJCL)   DA('"TMPDSN"("TMPJOB")')    SHR" 
ADDRESS ISPEXEC "FTOPEN TEMP"           /*File Tailoring*/
ADDRESS ISPEXEC "FTINCL REFSKEL2"     /*File Tailoring*/                   
ADDRESS ISPEXEC "FTCLOSE"           /*File Tailoring*/                           
ADDRESS ISPEXEC "VGET (ZTEMPN)"                                   
ADDRESS TSO"EXECIO * DISKR "ZTEMPN" (FINIS STEM SKEL."           
ADDRESS TSO"EXECIO * DISKW TMPJCL (FINIS STEM SKEL."             
ADDRESS ISPEXEC "EDIT DATASET ('"TMPDSN"("TMPJOB")'"             
ADDRESS TSO "FREE FI(TMPJCL)"                                     


the skeleton REFSKEL2 looks like:

Code:

//&JOBNAME JOB CLASS=H,MSGCLASS=X,                                   
//             NOTIFY=&SYSUID,MSGLEVEL=(1,1)                         
//* - - - - - - - - - - - - - - - - - - - - - - - - - - - - -       
//** EXECUTED BY: &USER                                             
//** ON: &DATE    AT  &TIME                                         
//* - - - - - - - - - - - - - - - - - - - - - - - - - - - - -       
//STEP10 EXEC PGM=IEFBR14                                           
//DD1 DD DSN=&OUTDSN,                                               
// DISP=(MOD,DELETE,DELETE)                                         
//**- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
//STEP20 EXEC PGM=SORT,COND=(4,LT)                                   
//SYSPRINT DD SYSOUT=*                                               
//SORTIN DD DSN=&INDSN,                                             
// DISP=SHR                                                         
//SORTOUT DD DSN=&OUTDSN,                                           
// DISP=(NEW,CATLG,DELETE),                                         
 // SPACE=(CYL,(10,5),RLSE),             
 // DCB=(&LRECL,RECFM=FB,BLKSIZE=0)     
 //SYSIN DD *                           
   << ENTER SORT STATEMENTS HERE >>     
 /*                                     
Back to top
View user's profile Send private message
Pragati Soni

New User


Joined: 18 Jan 2008
Posts: 47
Location: India

PostPosted: Thu Apr 30, 2009 5:50 pm
Reply with quote

Thanks a lot Genesis. Could you please tell me where should REFSKEL2 reside?

genesis786 wrote:
Hi, see if this example helps you:

following are the rexx statements:

Code:

DATE   = DATE()                                                   
TIME   = TIME()                                                   
USER   = USERID()                                                 
/* ---------------------------------------------------------  */ 
JOBNAME = USERID() || "ST"                                       
SYSUID = "&SYSUID"                                               
TMPDSN = "MY.K2S.JCL"                                           
TMPJOB = USERID() || "KS"                                         
OUTDSN = SUBSTR(INDSN,1,LASTPOS('.KSDS',INDSN)-1)||'.SAMF'       
ADDRESS TSO "ALLOC FI(TMPJCL)   DA('"TMPDSN"("TMPJOB")')    SHR" 
ADDRESS ISPEXEC "FTOPEN TEMP"           /*File Tailoring*/
ADDRESS ISPEXEC "FTINCL REFSKEL2"     /*File Tailoring*/                   
ADDRESS ISPEXEC "FTCLOSE"           /*File Tailoring*/                           
ADDRESS ISPEXEC "VGET (ZTEMPN)"                                   
ADDRESS TSO"EXECIO * DISKR "ZTEMPN" (FINIS STEM SKEL."           
ADDRESS TSO"EXECIO * DISKW TMPJCL (FINIS STEM SKEL."             
ADDRESS ISPEXEC "EDIT DATASET ('"TMPDSN"("TMPJOB")'"             
ADDRESS TSO "FREE FI(TMPJCL)"                                     


the skeleton REFSKEL2 looks like:

Code:

//&JOBNAME JOB CLASS=H,MSGCLASS=X,                                   
//             NOTIFY=&SYSUID,MSGLEVEL=(1,1)                         
//* - - - - - - - - - - - - - - - - - - - - - - - - - - - - -       
//** EXECUTED BY: &USER                                             
//** ON: &DATE    AT  &TIME                                         
//* - - - - - - - - - - - - - - - - - - - - - - - - - - - - -       
//STEP10 EXEC PGM=IEFBR14                                           
//DD1 DD DSN=&OUTDSN,                                               
// DISP=(MOD,DELETE,DELETE)                                         
//**- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
//STEP20 EXEC PGM=SORT,COND=(4,LT)                                   
//SYSPRINT DD SYSOUT=*                                               
//SORTIN DD DSN=&INDSN,                                             
// DISP=SHR                                                         
//SORTOUT DD DSN=&OUTDSN,                                           
// DISP=(NEW,CATLG,DELETE),                                         
 // SPACE=(CYL,(10,5),RLSE),             
 // DCB=(&LRECL,RECFM=FB,BLKSIZE=0)     
 //SYSIN DD *                           
   << ENTER SORT STATEMENTS HERE >>     
 /*                                     
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Thu Apr 30, 2009 5:51 pm
Reply with quote

Hi,

REFSKEL2 should be present in a PDS mapped to ISPSLIB. something like MY.GENERAL.SKELS or MY.GENERAL.ISPSLIB
Back to top
View user's profile Send private message
Pragati Soni

New User


Joined: 18 Jan 2008
Posts: 47
Location: India

PostPosted: Mon May 04, 2009 11:55 am
Reply with quote

Thanks a lot GENESIS786. It is working till some extent. I am facing issue with )DEFAULT control word. I am giving this word in the JCL. But it is not working and giving error with the characters '|' and '<', etc.

Also would be great if anyone can guide me with the following:
I need to include a functionality with my ISPF panel: I have prepared a skeleton JCL. I need to give the option 'EDIT JCL = (Y/N)' on the panel. If the option is given Y, the temporary skeleton should get opened for editing. Could you please guide me how this EDIT JCL functionality works?

Thanks a lot.

genesis786 wrote:
Hi,

REFSKEL2 should be present in a PDS mapped to ISPSLIB. something like MY.GENERAL.SKELS or MY.GENERAL.ISPSLIB
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Mon May 04, 2009 12:30 pm
Reply with quote

hi..

Quote:
I need to give the option 'EDIT JCL = (Y/N)' on the panel. If the option is given Y, the temporary skeleton should get opened for editing.


You can read the option (ZOPT) as a variable from ISPF panel and use conditional logic on it. You can use following command to open the dataset in edit mode (as given in above example):

Code:

ADDRESS TSO"EXECIO * DISKW TMPJCL (FINIS STEM SKEL."             
ADDRESS ISPEXEC "EDIT DATASET ('"TMPDSN"("TMPJOB")'"<<<<====COMMAND
ADDRESS TSO "FREE FI(TMPJCL)"             



Quote:
I am facing issue with )DEFAULT control word.


can you give details of what you are doing. paste the JCL. then may be someone will be able to help.
Back to top
View user's profile Send private message
Pragati Soni

New User


Joined: 18 Jan 2008
Posts: 47
Location: India

PostPosted: Mon May 04, 2009 3:31 pm
Reply with quote

Hello,

I could not find ZOPT in any of the IBM ISPF manual (developers guide, service guide, reference). Google also didn't help. Could u please tell me where can I look for Zopt.

Also for )default. The jcl is

***************************** Top of Data ******************************
//QHTOOL00 JOB (09092178),'EXECUTE QHTOOL PGM',
// NOTIFY=&SYSUID,MSGCLASS=9,REGION=0M,TIME=10,
// CLASS=8,USER=Y00205,PASSWORD=
//*
//JOBLIB DD DSN=PRD.Y00205.LOADLIB,DISP=(SHR,PASS)
// DD DSN=EVBN.LOADLIB,DISP=(SHR,PASS)
//*
//PROCL JCLLIB ORDER=(PRD.Y00208.PROCLIB,'EVBN.PROCLIB')
//*
)DEFAULT ABCDEFG
//**********************************************************************
//*
//* STEPNAME | DESCRIPTION | RESTART INSTRUCTION
//* | |
//* QHDEL | DELETE PDS OF PREVIOUS| RESTART FROM TOP.
//* | RUN |
//* | |
//* QHADD | CREATE PDS FOR CURRENT| RESTART FROM TOP.
//* | RUN |
//* | |
//* QHCOPY | COPY REQUIRED INPUT | RESTART FROM TOP.
and so on.

But this is giving the error.

ISPF Dialog Error
Command ===>

******************************************************************************
* ISPF112 *
* *
* Substitution error *
* Invalid cond. sub. string, RUNJCL02 record-15 *
* *
* *
* *
* *
* *
* *
* File tailoring input line: *
* //* STEPNAME | DESCRIPTION | RESTART INSTRUCTION *
* *
* Enter HELP command for further information regarding this error. *
* Press ENTER key to terminate the dialog. *
* *
* *
* *
* *
******************************************************************************

Not giving )default also gives the same error

ISPF Dialog Error
Command ===>

******************************************************************************
* ISPF112 *
* *
* Substitution error *
* Invalid cond. sub. string, RUNJCL02 record-14 *
* *
* *
* *
* *
* *
* *
* File tailoring input line: *
* //* STEPNAME | DESCRIPTION | RESTART INSTRUCTION *
* *
* Enter HELP command for further information regarding this error. *
* Press ENTER key to terminate the dialog. *
* *
* *
* *
* *
******************************************************************************

Please guide.

One more thing:

It also gives output overflow error though the sentence length is less than 80. (Line to be written greater than the data set LRECL (80).

Thanks a lot in advance.



genesis786 wrote:
hi..

Quote:
I need to give the option 'EDIT JCL = (Y/N)' on the panel. If the option is given Y, the temporary skeleton should get opened for editing.


You can read the option (ZOPT) as a variable from ISPF panel and use conditional logic on it. You can use following command to open the dataset in edit mode (as given in above example):

Code:

ADDRESS TSO"EXECIO * DISKW TMPJCL (FINIS STEM SKEL."             
ADDRESS ISPEXEC "EDIT DATASET ('"TMPDSN"("TMPJOB")'"<<<<====COMMAND
ADDRESS TSO "FREE FI(TMPJCL)"             



Quote:
I am facing issue with )DEFAULT control word.


can you give details of what you are doing. paste the JCL. then may be someone will be able to help.
Back to top
View user's profile Send private message
Pragati Soni

New User


Joined: 18 Jan 2008
Posts: 47
Location: India

PostPosted: Mon May 04, 2009 3:52 pm
Reply with quote

I am giving )default in the skeleton jcl as below:

***************************** Top of Data ******************************
//QHTOOL00 JOB (09092178),'EXECUTE QHTOOL PGM',
// NOTIFY=&SYSUID,MSGCLASS=9,REGION=0M,TIME=10,
// CLASS=8,USER=Y00205,PASSWORD=
//*
//JOBLIB DD DSN=PRD.Y00205.LOADLIB,DISP=(SHR,PASS)
// DD DSN=EVBN.LOADLIB,DISP=(SHR,PASS)
//*
//PROCL JCLLIB ORDER=(PRD.Y00208.PROCLIB,'EVBN.PROCLIB')
//*
)DEFAULT ABCDEFG
//**********************************************************************
//*
//* STEPNAME | DESCRIPTION | RESTART INSTRUCTION
//* | |
//* QHDEL | DELETE PDS OF PREVIOUS| RESTART FROM TOP.
//* | RUN |
//* | |
//* QHADD | CREATE PDS FOR CURRENT| RESTART FROM TOP.
//* | RUN |
//* | |
//* QHCOPY | COPY REQUIRED INPUT | RESTART FROM TOP.
and so on.

But this is giving the error.

ISPF Dialog Error
Command ===>

******************************************************************************
* ISPF112 *
* *
* Substitution error *
* Invalid cond. sub. string, RUNJCL02 record-15 *
* *
* *
* *
* *
* *
* *
* File tailoring input line: *
* //* STEPNAME | DESCRIPTION | RESTART INSTRUCTION *
* *
* Enter HELP command for further information regarding this error. *
* Press ENTER key to terminate the dialog. *
* *
* *
* *
* *
******************************************************************************

Not giving )default also gives the same error

ISPF Dialog Error
Command ===>

******************************************************************************
* ISPF112 *
* *
* Substitution error *
* Invalid cond. sub. string, RUNJCL02 record-14 *
* *
* *
* *
* *
* *
* *
* File tailoring input line: *
* //* STEPNAME | DESCRIPTION | RESTART INSTRUCTION *
* *
* Enter HELP command for further information regarding this error. *
* Press ENTER key to terminate the dialog. *
* *
* *
* *
* *
******************************************************************************

Please guide.

One more thing:

It also gives output overflow error though the sentence length is less than 80. (Line to be written greater than the data set LRECL (80).

Thanks a lot in advance.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1248
Location: Richfield, MN, USA

PostPosted: Mon May 04, 2009 9:07 pm
Reply with quote

Pragati, please use BBCode to make your code more readable.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2594
Location: Silicon Valley

PostPosted: Mon May 04, 2009 9:33 pm
Reply with quote

1. I think the poster meant that you should make up a variable and use the same name in both in the panel and in the rexx. In the panel, set the value to 'Y' or 'N'. In the rexx check for variable being one of those values and conditionally do the edit. ZOPT was just an example given, but not a particularly good one... variables starting with Z are reserved for ISPF's use.

2. Please read the description for )DEFAULT in the ISPF Dialog Developer's Guide, chapter 10. By your use of it, it is fairly clear that you do not understand what it is used for.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2594
Location: Silicon Valley

PostPosted: Mon May 04, 2009 9:53 pm
Reply with quote

You are gettting this:
Code:
ISPF Dialog Error
Command ===>

******************************************************************************
* ISPF112 *
* *
* Substitution error *
* Invalid cond. sub. string, RUNJCL02 record-15 *
* *
* *
* *
* *
* *
* *
* File tailoring input line: *
* //* STEPNAME | DESCRIPTION | RESTART INSTRUCTION *
* *


Please read the help for message ISPF112 and let us know if you do not understand the description.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Tue May 05, 2009 12:28 am
Reply with quote

My guess is that the vertical line (|) is interpreted as an 'OR' by FT.
Try doubling them (||) or removing them.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Tue May 05, 2009 12:34 am
Reply with quote

Pedro wrote:
1. I think the poster meant that you should make up a variable and use the same name in both in the panel and in the rexx. In the panel, set the value to 'Y' or 'N'. In the rexx check for variable being one of those values and conditionally do the edit. ZOPT was just an example given, but not a particularly good one... variables starting with Z are reserved for ISPF's use.

2. Please read the description for )DEFAULT in the ISPF Dialog Developer's Guide, chapter 10. By your use of it, it is fairly clear that you do not understand what it is used for.
And also, follow Pedro's instructions!
Back to top
View user's profile Send private message
Pragati Soni

New User


Joined: 18 Jan 2008
Posts: 47
Location: India

PostPosted: Tue May 05, 2009 10:43 am
Reply with quote

Thanks a lot all of you for the interest and guidance you have given.

My issue is resolved to a great extent.
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Unable to interpret a hex value to De... COBOL Programming 4
No new posts how to eliminate null indicator value... DB2 7
No new posts Format Binary file to EBCDIC JCL & VSAM 4
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
Search our Forums:

Back to Top