I am trying to determine, if we do have any tools/ or processes in mainframe, that could potentially say the number of exec steps with in a JCL. I understand that i may be able to write a program, that scans jcl libraries, and corresponding proc libraries to determine the number. The reason, i am doing this is, handful of our JCLs in the shops ( around 6000 of them ) are nearby 250 steps or so. And we are adding steps to our procs. The procedures are in separate PDS.
Is anyone aware of smarter way to do this? If i have to write a program, i would mostly end up with cobol code. Any suggestions/workarounds is welcome.
At the end of day, if i can generate a report that would show me number of executable steps with in JCL, that would be my goal - irrespective of whether step would actually execute or not. This way i can avoid JCL error when there are more than 255 executable steps.
A Cobol program is probably a bit OTT, a simple ISRSUPC should do the trick and then a Rexx or SORT to read the output and count the number of EXEC PGM statements.
I seem to recall, although I may be wrong, that the limit of 255 is on the number of EXEC statements, not specifically the number of programs being executed. That is to say, if your JCL calls a procedure, that will be one EXEC statement used, with 254 remaining.
Alternatively, if you have a JCL checker such as Pro/JCL or Job/Scan, that will of course flag these errors.
CA JCLCHECK is one of the utilities we have. For the time being, i would customize it to check more than 5000 jcls to see if any of the JCLs exceeds 255 steps - by scanning job through batch, and looking for keywords - "CAY6134E MORE THAN 255 STEPS IN JOB", and generating the report.
I am guessing there exists no better way around, other than code some program which checks the number of exec steps.
Joined: 06 Jun 2008 Posts: 8154 Location: East Dubuque, Illinois, USA
code some program which checks the number of exec steps.
This is not as easy as you may think -- a PROC may have many executable steps (even though there is only one EXEC for the PROC), and an INCLUDE may include many executable steps (with no EXEC) -- so there's a lot to consider.
Hi, The easiest solution by far is using a JCL management tool such as JCLPREP, PRO/JCL or JCLCheck. They can generate resolved JCL and analyze it. Adding a rule to any of those to report on "more than x steps" is pretty simple as is analyzing whole libraries.
I'm sure this could also be done with REXX, but it would be a lot more work.
Alternatives are to run TYPRUN SCAN's and then get the JESJCL part of the output and analyze that. At its simplest just browse it and FIND ' EXEC '. However, I wouldn't recommend using that technique for anything more than a few jobs.
For analysis of the jobs that are actually running on the system you could use the SMF records, type 30 or 4 IIRC. Of course, that only will see the jobs that are being run, so those that run either adhoc or infrequently would not be spotted, so IMHO it's not a great solution.