|
View previous topic :: View next topic
|
| Author |
Message |
nartcr
New User
Joined: 06 Jun 2007 Posts: 83 Location: anada
|
|
|
|
Hello,
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.
Thanks for your response. |
|
| Back to top |
|
 |
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
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. |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10902 Location: italy
|
|
|
|
unfortunately JCL thinks otherwise
| Code: |
****** ***************************** Top of Data ******************************
000001 //ENRICOS JOB (ACCT),'ZSTEPS',NOTIFY=ENRICO,
000002 // CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1)
000003 //*
000004 //IEFBR14 PROC
000005 //S1 EXEC PGM=IEFBR14
000006 //S2 EXEC PGM=IEFBR14
000007 // PEND
000008 //*
000009 //P1 EXEC IEFBR14
000010 //P2 EXEC IEFBR14
000011 //* .....
000012 //P128 EXEC IEFBR14
****** **************************** Bottom of Data ****************************
|
fails ... ( 256 program execs )
while
| Code: |
****** ***************************** Top of Data ******************************
000001 //ENRICOS JOB (ACCT),'ZSTEPS',NOTIFY=ENRICO,
000002 // CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1)
000003 //*
000004 //IEFBR14 PROC
000005 //S1 EXEC PGM=IEFBR14
000006 //S2 EXEC PGM=IEFBR14
000007 // PEND
000008 //*
000009 //P1 EXEC IEFBR14
000010 //P2 EXEC IEFBR14
000011 //* .....
000012 //P127 EXEC IEFBR14
000013 //S255 EXEC PGM=IEFBR14
****** **************************** Bottom of Data ****************************
|
works ... ( 255 program execs ) |
|
| Back to top |
|
 |
nartcr
New User
Joined: 06 Jun 2007 Posts: 83 Location: anada
|
|
|
|
Thanks for your response.
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. |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
| Quote: |
| 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. |
|
| Back to top |
|
 |
Hamish
New User
Joined: 13 Nov 2014 Posts: 1 Location: UK
|
|
|
|
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. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|