Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Count the number of JCL executable steps

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
nartcr

New User


Joined: 06 Jun 2007
Posts: 73
Location: Chicago

PostPosted: Wed Nov 05, 2014 2:57 am    Post subject: Count the number of JCL executable steps
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: 175
Location: UK

PostPosted: Wed Nov 05, 2014 1:42 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Nov 05, 2014 2:10 pm    Post subject: Reply to: Count the number of JCL executable steps
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: 73
Location: Chicago

PostPosted: Wed Nov 05, 2014 10:58 pm    Post subject:
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: 7907
Location: Bellevue, IA

PostPosted: Thu Nov 06, 2014 4:17 am    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Sequence number add in SORT pshongal SYNCSORT 3 Fri Sep 02, 2016 3:32 pm
No new posts Casting a Binary Number to Numeric in... Bob Steinkraus Java & MQSeries 6 Tue Aug 09, 2016 5:58 pm
No new posts GDG vsersion number change Raghu navaikulam JCL & VSAM 5 Fri May 27, 2016 4:49 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us