Page 1 of 1

"SCAN" to include instream controls & resolved datasetnames

PostPosted: Thu Oct 04, 2018 9:39 pm
by Steve Coalbran
I have a number of libraries (EQQJBLIB concatenation in IWS[OPC for us wrinklies! :D ]).
I want to "SCAN" these JCL JOBs which include input controls (for a particular program we are reviewing) both as [DD *] instream controls as well as [DD DSN=] references.
I want to logically SCAN the JCL JOBs and the result should include both: any instream controls as well as all resolved datasetname references.
I have tried 2 approaches:
  • Just read theJCL and look for instream controls. Yes nowadays they could be in an included PROC but nobody uses this "new" feature.
    This misses any datasets with symbolic variables (most!)
  • Resolve the JCL stream:
    • SCAN the JOB
    • Trap the output in SDSF
    • Analyse the resolved datasetname references
    This misses any instream controls.
Does anyone know how I could achieve all this in one go? :)

Re: "SCAN" to include instream controls & resolved datasetna

PostPosted: Thu Oct 04, 2018 10:01 pm
by enrico-sorichetti
when using sdsf interactive the command "input on" lets You see all the "DD *" stuff
if You plan to use the REXX/SDSF interface, check the manual to see if the construct is supported

Re: "SCAN" to include instream controls & resolved datasetna

PostPosted: Thu Oct 11, 2018 3:24 pm
by Steve Coalbran
Will try and locate the correct manual for this.
I find the REXX interface particularly difficult to use compared to other APIs. ;)
Anyone out there happen to have a handy example of how one might do this from REXX? (if as you suggest Enrico, it is indeed available here?) :D

Re: "SCAN" to include instream controls & resolved datasetna

PostPosted: Thu Oct 11, 2018 4:19 pm
by enrico-sorichetti
I posted quite a few WORKING examples of the rexx sdsf interface

in this forum and on the sibling one http://ibmmainframes.com

search my posts with "sdsf rexx"

beware that when run in batch the authorization logic has to be implemented using RACF

Re: "SCAN" to include instream controls & resolved datasetna

PostPosted: Fri Oct 12, 2018 1:18 pm
by enrico-sorichetti

Re: "SCAN" to include instream controls & resolved datasetna

PostPosted: Fri Oct 12, 2018 2:06 pm
by Steve Coalbran
It gives an RC(8) but it does actually work from REXX...
195 *-*    RC = ISFCALLS("ON")                  
    >>>      "0"                                
196 *-*    isffilter = 'JOBID EQ 'jobid          
    >>>      "JOBID EQ JOB70763"                
197 *-*    ADDRESS SDSF "ISFEXEC ST "            
    >>>      "ISFEXEC ST "                      
198 *-*    ADDRESS SDSF "ISFEXEC PREFIX" jobname
    >>>      "ISFEXEC PREFIX TESTSDSF"          
    +++ RC(8) +++                                
199 *-*    ADDRESS SDSF "ISFEXEC INPUT ON "      
    >>>      "ISFEXEC INPUT ON "                
    +++ RC(8) +++                                
:D

Re: "SCAN" to include instream controls & resolved datasetna

PostPosted: Sat Oct 13, 2018 6:13 pm
by willy jensen
Instead of 'ISFEXEC PREFIX' try setting variable ISFPREFIX to your prefix value. Likewise, use variables isfowner, isfsysname and isfdest. Refer to the 'SDSF User's Guide' manual for details.

Re: "SCAN" to include instream controls & resolved datasetna

PostPosted: Sat Oct 13, 2018 7:34 pm
by enrico-sorichetti
ISFPREFIX to your prefix value
.

thats what I used in the snippets in the link i posted