IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Count the number of JCL executable steps


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nartcr

New User


Joined: 06 Jun 2007
Posts: 83
Location: anada

PostPosted: Wed Nov 05, 2014 2:57 am
Reply with quote

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
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 199
Location: UK

PostPosted: Wed Nov 05, 2014 1:42 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 05, 2014 2:10 pm
Reply with quote

unfortunately JCL thinks otherwise icon_wink.gif


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
View user's profile Send private message
nartcr

New User


Joined: 06 Jun 2007
Posts: 83
Location: anada

PostPosted: Wed Nov 05, 2014 10:58 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Nov 06, 2014 4:17 am
Reply with quote

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
View user's profile Send private message
Hamish

New User


Joined: 13 Nov 2014
Posts: 1
Location: UK

PostPosted: Thu Nov 13, 2014 10:50 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top