Hmmm..    Is this a test?  Game playing?

...But,it seems that's not the method my manager expects.

well, of course first you just ask your manager what method he does expect you to use!


REXX is useful. A better job will require a little assembler too. You may need extra seal meat for the sled dogs.

There's no perfect answer to this question. Identifying the programs named on EXEC PGM= statements is a start. And of course you'll have to allow catalogued procedures to be expanded, so the TYPRUN=SCAN approach will be useful for that. That will get you (golfers, turn away at this point) a fair way down the fairway but it wont tell you about the programs that those PGM=.. programs themselves invoke, et cetera.

It's possible for data-driven conditions, some of which might happen, say, but once a year, to cause the selective loading and/or execution of otherwise un-referenced programs. You cannot make a definitive determination of this from an analysis of JCL, expanded or otherwise.

With those limitations in mind, I'd probably start by building a faux job stream, with the same //JOBLIB DD and //STEPLIB DD as each production job has, but with each step executing my REXX and passing into it the corresponding PGM= program name as a parameter (you can omit all other DD statements). I'd have my REXX call my assembler module to LOAD the specified program and determine which library (STEPLIB/ JOBLIB/ LINKLIST/ LPA..) that the program was actually retrieved from. The assembler bit would return the library name, or a null string if the program wasn't found, to the REXX. The REXX would add/append this information to some database or flat file.

This approach will enable you to identify, in a substantial, but still incomplete, way, which programs exist and which libraries are involved, and of course, which programs can't be found.

Keep in mind that the mere presence of a JOBLIB or STEPLIB DD doesn't guarantee that the program named on the EXEC PGM=.. statement actually resides in one of those libraries, it may be in a linklisted library or an LPA.. library instead (or as well, in fact it may be in many libraries!).


I'd grill your manager a little more before you code anything.

Graeme.

(Just 9 days to Midyear, revellers!)

At 07:39 PM 12/06/2006, you wrote:
Hi,

Recently I've got a mission from my manager. He asked me:If I got a JCL
which runs many cobol programs,how can I
know whether these load modules exist or not without actually running it?
<Darren, I've snipped a few lines here 'cos the server rejected my post!>
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to