Recently I was working for a client who didnt have JSCAN/JEM to expand and do syntax/dataset xref checking of a JCL before actually submitting it. As You would understand as a developer how useful it is to have such a utility. And this prompted me to create the JCLEXP tool which checks for things like dataset existance, symbolic parameters expansion, PROCs and Include Members Expansion, Sysin's or other Parm Files Existance etc.
In a nutshell this Exec Reads in the i/p JCL and Expands the Includes, Procs, Symbolic variables in the Job. It also scans for any Datasets, GDG Base, GDG Versions, Sysins, Includes, Procs cross reference errors.
JCLEXP is a ISREDIT command and it runs on the JCL member You currently are in. The utility consists of three Rexx Routines which need to be placed in your clist library and three ISPF panels which need to be placed in your ISPPLIB.
The Rexx Modules are:
The Panels are:
- Note that the tool doesnot do a JCL syntax check.
- You can View/Edit/Browse files directly or using Fileaid directly from the tool's output panel.
- You can get a list of all input and output files used in the job.
- You can resolve the actual GDG version dataset going to be used in the job.
- Most importantly You can see the errors that the job has in its cross references with other modules/datasets.
In a nutshell this Exec Reads in the i/p JCL and Expands the Includes, Procs, Symbolic variables in the Job. It also scans for any Datasets, GDG Base, GDG Versions, Sysins, Includes, Procs cross reference errors.
JCLEXP is a ISREDIT command and it runs on the JCL member You currently are in. The utility consists of three Rexx Routines which need to be placed in your clist library and three ISPF panels which need to be placed in your ISPPLIB.
The Rexx Modules are:
- JCLEXP - The main Driver Program
- JCLDSFA - Interface program with FileAid
- JCLDSFB - Interface program with FileAid
The Panels are:
- JCLEXP0 - Main Panel with choices of Output Desired
- JCLEXP1 - Panel for Input Datasets List and actions
- JCLEXP2 - Panel for Output Datasets List
You can download the zip file(JCLEXP.zip) containing the above modules below.
https://app.box.com/s/q4lnxk3klkxib1llnxmxs7pu9bkblei7
https://app.box.com/s/q4lnxk3klkxib1llnxmxs7pu9bkblei7
Please feel free to edit the program to make cosmetic or required changes to meet your application and system environment. After You copy the modules in the corresponding libraries, You can start using the tool program as below:
- In any JCL member in view or edit mode, issue the command JCLEXP
- After Expansaion is done, You will see the panel as seen below:
- Option 1 shows the expanded code with all the expansion errors encountered. This is the place where you would go mostly.
- Option 2 will give You the details of all the input files used in your job. Here You can view/edit the file directly or thru file aid from this panel.
- Option 3 will take you to the panel which lists all the output datasets from your job.
This is great!
ReplyDeleteCan it be used in batch mode to capture the expanded JCL of multiple JCL decks. If not, would it be straightforward to convert?
In Batch Mode you would better run the job using typerun=scan
ReplyDeleteOkay - what I wanted to do was determine what each JCL member called (PROC, program etc). and return just a list of objects accessed by the JCL deck in CSV form, like this:
ReplyDeleteJCL Member Name,Proc Name,Program Name,Referenced Filename
Values would repeat as required in the output, like this:
"JOB1JCL","J1PROC1","PRGRM1","FILE1.DAT"
"JOB1JCL","J1PROC1","PRGRM1","FILE2.DAT"
"JOB1JCL","J1PROC1","PRGRM2",""
"JOB1JCL","J1PROC2","PRGRM3","FILE2.DAT"
"JOB1JCL","J1PROC2","PRGRM3","FILE3.DAT"
"JOB2JCL","*NONE*","PRGRMy","FILEy.DAT"
...
In which, JCL member "JOB1JCL" repeats five times, Proc "J1PROC1" repeats three times. Each value is repeated as needed according to how many objects are referenced in each 'context' (JOB, PROC, PROGRAM etc).
I do not want to write fully-expanded JCL to a dataset (I'd then need to write a parser to extract what I need), only the bits of information I require. That's why your script looked a great place to start - it does all the difficult stuff already.
Thanks
JG
Hmm...You can check out the xreftool that I had developed..its there as a separete blog in this website...that guy gives you all the places where a particular module is referenced. That tool acutally builds a xref database in form of flat files, after building the db, you can write your scripts to generate the report that you want from this db. That may not be exactly what you want, but may be helpful if you want to look at...Thanks...
ReplyDeleteHi,
ReplyDeleteI couldnt able to see the attachment. Kindly confirm whether it is available still in this link?
Meenakshi, Sorry for the late response..Yes its still there as a box document.
ReplyDeleteHi, is the zip file still available for the JCL Expansion Program? I can't seem to find it on the page.
ReplyDeleteHi please send the expand jcl rexx code to me. I am unable to find it here in this page. my mail id is aravindhan.devarajan@gmail.com
ReplyDeleteI have a requirement that I want to expand all job under a PDS and search particular string in those expanded jobs, Instead to doing JJSCAN one by one and then search the string.
ReplyDeleteI want write the JOB name in separate file which contains the string I am searching for.
IS this possible using JCL or REXX ?
Regards
Abhay
Is this ZIP file still available? I would like to try out the code.
ReplyDeleteHi... can i get the zip file.
ReplyDeleteHi, can I get the zip file? The plug in is not supported. My email address is ztnawal@yahoo.com. Thanks!
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteHi I cannot find the zip file. Can you please send me at jigarc6@gmail.com
ReplyDeleteHi , can you send me zip file to reddybava2014@gmail.com ,I will try once.thankyou.
ReplyDeletewill be of grt help if you can shre the sample code. i am trying to code a similar rexx
ReplyDeleteHi can you send me zip file to kgjothi@gmail.com. Thanks!
ReplyDeletehi, i couldnt find the zip file...can you please send to my mail RAMASUBBU4ALL@GMAIL.COM
ReplyDeleteHi, could you please send the code to madhuhere670@gmail.com!!?
ReplyDeleteHi,
ReplyDeleteCould you pls mail me the file on maratheaditi09@gmail.com
Please send me the zip file as well: camronthomas@gmail.com
ReplyDeleteThanks!
Please send the zip file for jclexp to skumardesigner21@gmail.com
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDelete