|
|
| Author |
Message |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 6471 Location: Brussels once more ...
|
|
|
|
| Quote: |
"ADDRESS ISPEXEC "LIBDEF ISPSLIB DATASET ID()""
"ADDRESS ISPEXEC "LIBDEF ISPSLIB DATASET ID('XXXXXXXX')" STACK"
Why is STACK used at the end of the statement? And why is the first line necessary? |
The first line clears any pre existing LIBDEF statements
Can not recall why I used STACK but it is explained in the manuals.
The manuals are easily reached from the sticky at the top of the forum topics in the REXX/CLIST forum.
| Quote: |
"ISPEXEC FTINCL TEST00"
How is TEST00 processed? It says FTINCL is an ISPF command for processing skeleton's, but TEST00 is never declared? |
TEST00 is a JCL skeleton stored in the ISPSLIB referenced by the LIBDEF.
| Quote: |
Could you please explain a bit the ERR procedure? Why are there two identical statements at the beginning? What does it do to the trapped synthax errors? (Outputs the faulty line?) |
Two identical statements - originally for foreground use, issue the error message twice - bit more of an eye catcher.
Basically the procedure executes the line in error as the last thing before the exec stops - but uses TRACE I which is the most informative form of the TRACE command and shows all of the substitutions as they happen giving maximum info about the failure. |
|
| Back to top |
|
 |
References
|
|
 |
Ivan P
New User
Joined: 08 Jun 2009 Posts: 47 Location: Europe
|
|
|
|
| expat wrote: |
| Can not recall why I used STACK but it is explained in the manuals. |
I've been reading mostly REXX Reference and Users's Guide, and haven't been able to find it there. In the REXX Reference book, under ADDRESS there is no mention of STACK, just the environment and the expression, but it's clear that STACK is outside the expression here.
| expat wrote: |
| TEST00 is a JCL skeleton stored in the ISPSLIB referenced by the LIBDEF. |
Does it mean LIBDEF creates this skeleton with the ISPEXEC command at the beginning? (because it doesn't exist in ISP.SISPSLIB by default) |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 6471 Location: Brussels once more ...
|
|
|
|
| Quote: |
I've been reading mostly REXX Reference and Users's Guide, and haven't been able to find it there. In the REXX Reference book, under ADDRESS there is no mention of STACK, just the environment and the expression, but it's clear that STACK is outside the expression here.
|
Take a look in the ISPF services manual, it explains LIBDEF in more detail.
| Quote: |
| Does it mean LIBDEF creates this skeleton with the ISPEXEC command at the beginning? (because it doesn't exist in ISP.SISPSLIB by default) |
No, the skeleton is created by you. The LIBDEF only tells ISPF which library to search for the skeleton before the normal ISPF concatenation. |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 5391 Location: italy
|
|
|
|
| Quote: |
| I've been reading mostly REXX Reference and Users's Guide, and haven't been able to find it there. In the REXX Reference book, under ADDRESS there is no mention of STACK, just the environment and the expression, but it's clear that STACK is outside the expression here. |
STACK is not REXX related, is a parm/option related to ISPF LIBDEF
so the explanation would rather be in the ISPF manual |
|
| Back to top |
|
 |
Ivan P
New User
Joined: 08 Jun 2009 Posts: 47 Location: Europe
|
|
|
|
| expat wrote: |
| No, the skeleton is created by you. The LIBDEF only tells ISPF which library to search for the skeleton before the normal ISPF concatenation. |
Oh, I misunderstood... I thought XXXXXXX is a sequential data-set, not a library, sorry! (newbie...)
So, TEST00 is a member in XXXXXXX dataset. Hope I got it right this time.  |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 6471 Location: Brussels once more ...
|
|
|
|
100% correct  |
|
| Back to top |
|
 |
Ivan P
New User
Joined: 08 Jun 2009 Posts: 47 Location: Europe
|
|
|
|
Ran into some trouble... Maybe this is more suitable for the REXX sub-forum now?
Here's the situtation:
2 DS are used:
MYUSER.DITTO.RES - sequential DS, contains just the VOLSERs list
MYUSER.PRIVLIB - PDS with members: DITTOJCL, DITTOREX, REXXEXEC
DITTOJCL - skeleton
DITTOREX - REXX code
REXXEXEC - JCL for running REXX
DITTOJCL skelton
| Code: |
//Z0DT&JNM. JOB NOTIFY=MYUSER,CLASS=S,MSGCLASS=X
//DITTO1 EXEC PGM=DITTO
//SYSPRINT DD SYSOUT=*
//TAPE1 DD UNIT=&UNIT.,DISP=SHR,LABEL=(,BLP),VOL=SER=&VOLSER.
//SYSIN DD *
$$DITTO ERT OUTPUT=TAPE1
$$DITTO EOJ
// |
DITTOREX code (thnx to expat)
| Code: |
SIGNAL ON SYNTAX NAME ERR
ADDRESS ISPEXEC "LIBDEF ISPSLIB DATASET ID()"
ADDRESS ISPEXEC "LIBDEF ISPSLIB DATASET ID('MYUSER.PRIVLIB')" STACK
SYSUID = SYSVAR(SYSUID)
"FREE FI(ISPFILE,INDD)"
"ALLOC FI(INDD) DA('MYUSER.DITTO.RES') SHR"
"DEL '"SYSUID".ISPFILE'"
"ALLOC FI(ISPFILE) DA('"SYSUID".ISPFILE') NEW TRACKS SPACE(10 10)
RECFM(F B) LRECL(80)"
JNM = 1
"EXECIO * DISKR INDD ( STEM STNAME. "
DO AA = 1 TO STNAME.0
PARSE VAR STNAME.AA VOLSER
VOLSER = STRIP(VOLSER)
UNIT = "A00"
"ISPEXEC FTOPEN"
"ISPEXEC FTINCL DITTOJCL"
"ISPEXEC FTCLOSE"
"SUBMIT '"SYSUID".ISPFILE'"
JNM = JNM + 1
IF JNM = 4 THEN JNM = 1
END
"FREE FI(ISPFILE,INDD)"
"DEL '"SYSUID".ISPFILE'"
EXIT
ERR:
SIGNAL OFF SYNTAX
SAY "ERROR ROUTINE OUTPUT STARTING"
SAY "ERROR ROUTINE OUTPUT STARTING"
SAY " "
SAY RIGHT(SIGL,6) ">>>" SOURCELINE(SIGL)
SAY " "
TRACE I
INTERPRET SOURCELINE(SIGL) |
(UNIT is intentionally left as a fixed value in this version...)
REXXEXEC (without the JOBCARD)
| Code: |
//REXX1 EXEC PGM=IKJEFT01
//SYSEXEC DD DSN=MYUSER.PRIVLIB,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
%DITTOREX
/*
// |
And the REXX related output in SDSF...
| Code: |
6 *-* ADDRESS ISPEXEC "LIBDEF ISPSLIB DATASET ID()"
+++ RC(-3) +++
7 *-* ADDRESS ISPEXEC "LIBDEF ISPSLIB DATASET ID('MYUSER.PRIVLIB')" STACK
+++ RC(-3) +++
IKJ56247I FILE ISPFILE NOT FREED, IS NOT ALLOCATED
IKJ56247I FILE INDD NOT FREED, IS NOT ALLOCATED
IDC3012I ENTRY MYUSER.ISPFILE NOT FOUND+
IDC3009I ** VSAM CATALOG RETURN CODE IS 8 - REASON CODE IS IGG0CLEG-42
IDC0551I ** ENTRY MYUSER.ISPFILE NOT DELETED
IDC0014I LASTCC=8
......
IKJ56265I INPUT DATA SET MYUSER.ISPFILE NOT USABLE+
IKJ56265I THE DATA SET IS EMPTY
......
IKJ56861I FILE INDD NOT FREED, DATA SET IS OPEN
IDC0550I ENTRY (A) MYUSER.ISPFILE DELETED
READY
END |
"......" means those two messages are repeated as many times as there are VOLSERs in the RES data set.
First few messages are harmless, but I guess the "NOT USABLE" message is critical - it means the generated JCL isn't saved to the ISPFILE?
Any thoughts?
EDIT: fixed typo |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 6471 Location: Brussels once more ...
|
|
|
|
You are running ISPF under TSO, and will need to allocate the required ISPF libraries to your batch job.
TSO ISRDDN on the command line will show all of the alllocated ISPF libraries for your foreground session. These will need to be replicated in your JCL.
Here is what I usually use. Although there may be some subtle differences from site to site, this should suffice almost anywhere.
| Code: |
//ISPFBAT EXEC PGM=IKJEFT01,DYNAMNBR=256
//PROFLIST DD DSN=&&TEMPPROF,DISP=(,PASS,DELETE),
// SPACE=(TRK,(45,45,44)),
// RECFM=FB,LRECL=80
//SYSLBC DD DSN=SYS1.BRODCAST,DISP=SHR
//SYSPROC DD DSN=My REXX library,DISP=SHR
// DD DSN=Concatenation from ISRDDN
//SYSEXEC DD DSN=My.REXX library,DISP=SHR
// DD DSN=Concatenation from ISRDDN
//ISPPLIB DD DSN=Concatenation from ISRDDN
//ISPMLIB DD DSN=Concatenation from ISRDDN
//ISPSLIB DD DSN=My ISPSLIB,DISP=SHR
// DD DSN=Concatenation from ISRDDN
//ISPTLIB DD DSN=*.PROFLIST,DISP=SHR,VOL=REF=*.PROFLIST
// DD DSN=Concatenation from ISRDDN
//ISPTABL DD DSN=*.PROFLIST,DISP=SHR,VOL=REF=*.PROFLIST
// DD DSN=Concatenation from ISRDDN
//MSGTABL DD DSN=Concatenation from ISRDDN
//ISPPROF DD DSN=*.PROFLIST,DISP=SHR,VOL=REF=*.PROFLIST
//ISPCTL0 DD DISP=(NEW,DELETE),SPACE=(TRK,(10,10)),UNIT=VIO,
// RECFM=FB,LRECL=80,DSORG=PS
//ISPCTL1 DD DISP=(NEW,DELETE),SPACE=(TRK,(10,10)),UNIT=VIO,
// RECFM=FB,LRECL=80,DSORG=PS
//ISPWRK1 DD DISP=(NEW,DELETE),SPACE=(TRK,(10,10)),UNIT=VIO,
// RECFM=FB,LRECL=80,DSORG=PS
//ISPLIST DD SYSOUT=*
//ISPLST1 DD DISP=(NEW,DELETE),SPACE=(TRK,(10,10)),
// RECFM=VB,LRECL=133,DSORG=PS
//ISPLOG DD SYSOUT=*,
// RECFM=FB,LRECL=120,DSORG=PS
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSTSIN DD DUMMY
|
|
|
| Back to top |
|
 |
Ivan P
New User
Joined: 08 Jun 2009 Posts: 47 Location: Europe
|
|
|
|
The concatenation from ISRDDN is quite long for some libs...
I guess all those datasets aren't really necessary in this case...?
For example, isn't SYSPROC and SYSEXEC concatenation useless here, because the only exec is in my REXX lib?
I tried the example you provided, but didn't put all the datasets from ISRDDN (didn't use some with unusual HLQ), and it's still the same error (ISPFILE isn't populated with the generated job).
Is there a shorter allocation of libs in this case? 3 or 4 maybe on which to focus on? |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 6471 Location: Brussels once more ...
|
|
|
|
| Have you tried running with TRACE R or TRACE I to get an idea of exactly what happens during your exec ? |
|
| Back to top |
|
 |
Ivan P
New User
Joined: 08 Jun 2009 Posts: 47 Location: Europe
|
|
|
|
Here's the relevant part of the output:
| Code: |
22 *-* UNIT = "A00"
>L> "A00"
23 *-* "ISPEXEC FTOPEN"
>L> "ISPEXEC FTOPEN"
+++ RC(20) +++
24 *-* "ISPEXEC FTINCL DITTOJCL"
>L> "ISPEXEC FTINCL DITTOJCL"
+++ RC(20) +++
25 *-* "ISPEXEC FTCLOSE"
>L> "ISPEXEC FTCLOSE"
+++ RC(20) +++
26 *-* "SUBMIT '"SYSUID".ISPFILE'"
>L> "SUBMIT '"
>V> "MYUSER"
>O> "SUBMIT 'MYUSER"
>L> ".ISPFILE'"
>O> "SUBMIT 'MYUSER.ISPFILE'"
IKJ56265I INPUT DATA SET MYUSER.ISPFILE NOT USABLE+
IKJ56265I THE DATA SET IS EMPTY |
 |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 6471 Location: Brussels once more ...
|
|
|
|
try changing
| Code: |
//REXX1 EXEC PGM=IKJEFT01
//SYSEXEC DD DSN=MYUSER.PRIVLIB,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
%DITTOREX
/*
// |
to
| Code: |
//REXX1 EXEC PGM=IKJEFT01
//SYSEXEC DD DSN=MYUSER.PRIVLIB,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
ISPSTART CMD(%DITTOREX)
/*
// |
|
|
| Back to top |
|
 |
Ivan P
New User
Joined: 08 Jun 2009 Posts: 47 Location: Europe
|
|
|
|
After adding ISPPROF, ISPPLIB, ISPSLIB, ISPTLIB and ISPMLIB statements to the JCL, it works. \o/
But, if I switch back to:
//SYSTSIN DD *
%DITTOREX
it doesn't work... so it seems ISPSTART CMD() is crucial. |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 6471 Location: Brussels once more ...
|
|
|
|
Oh yes, and I should have thought about it earlier ...........
If you invoke ISPF services within your REXX code, you must use ISPSTART. |
|
| Back to top |
|
 |
|
|
|