|
View previous topic :: View next topic
|
| Author |
Message |
Pragati Soni
New User
Joined: 18 Jan 2008 Posts: 47 Location: India
|
|
|
|
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 |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
| Back to top |
|
 |
genesis786
Active User

Joined: 28 Sep 2005 Posts: 210 Location: St Katherine's Dock London
|
|
|
|
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 |
|
 |
Pragati Soni
New User
Joined: 18 Jan 2008 Posts: 47 Location: India
|
|
|
|
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 |
|
 |
genesis786
Active User

Joined: 28 Sep 2005 Posts: 210 Location: St Katherine's Dock London
|
|
|
|
Hi,
REFSKEL2 should be present in a PDS mapped to ISPSLIB. something like MY.GENERAL.SKELS or MY.GENERAL.ISPSLIB |
|
| Back to top |
|
 |
Pragati Soni
New User
Joined: 18 Jan 2008 Posts: 47 Location: India
|
|
|
|
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 |
|
 |
genesis786
Active User

Joined: 28 Sep 2005 Posts: 210 Location: St Katherine's Dock London
|
|
|
|
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 |
|
 |
Pragati Soni
New User
Joined: 18 Jan 2008 Posts: 47 Location: India
|
|
|
|
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 |
|
 |
Pragati Soni
New User
Joined: 18 Jan 2008 Posts: 47 Location: India
|
|
|
|
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 |
|
 |
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1248 Location: Richfield, MN, USA
|
|
|
|
| Pragati, please use BBCode to make your code more readable. |
|
| Back to top |
|
 |
Pedro
Global Moderator

Joined: 01 Sep 2006 Posts: 2624 Location: Silicon Valley
|
|
|
|
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 |
|
 |
Pedro
Global Moderator

Joined: 01 Sep 2006 Posts: 2624 Location: Silicon Valley
|
|
|
|
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 |
|
 |
Marso
REXX Moderator

Joined: 13 Mar 2006 Posts: 1356 Location: Israel
|
|
|
|
My guess is that the vertical line (|) is interpreted as an 'OR' by FT.
Try doubling them (||) or removing them. |
|
| Back to top |
|
 |
Marso
REXX Moderator

Joined: 13 Mar 2006 Posts: 1356 Location: Israel
|
|
|
|
| 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 |
|
 |
Pragati Soni
New User
Joined: 18 Jan 2008 Posts: 47 Location: India
|
|
|
|
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 |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|