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
 

 

Scan JCL library and extract proc name

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

New User


Joined: 12 Mar 2009
Posts: 30
Location: usa

PostPosted: Fri May 22, 2009 12:26 am    Post subject: Scan JCL library and extract proc name
Reply with quote

What would be the best way to scan a PDS of JCL members and extract the proc name ? I need the job name and the proc name for a compare of proc names, and if a match, then I want the job names on the match only, discarding the non-match job names.


Thanks,
Dave
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri May 22, 2009 12:38 am    Post subject:
Reply with quote

Hello,

From what you have posted, this is not a jcl question. . . .

If you better explain just what you want to do, someone may have a suggestion as to where to move the topic.

Show some sample input and the output you want from that input.
Back to top
View user's profile Send private message
coxdavi

New User


Joined: 12 Mar 2009
Posts: 30
Location: usa

PostPosted: Fri May 22, 2009 1:05 am    Post subject: Reply to: Scan JCL library and extract proc name
Reply with quote

Dick,
I thought this would be the proper place as I am concerned with looking at members in a PDS containing JCL. I wish to scan the members for proc names. I then wish to take the jobname and the proc name from the members and store them in an output file. I will then take that output file as input to a compare of procs. If I match that file to another already existing file of procs containing a certain program, then I want the jobname written to another file. I will then have a list of JCL members that contain procs running that certain program. That gives me a percentage of batch jobs running the certain program.

Thanks,
Dave
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri May 22, 2009 1:31 am    Post subject:
Reply with quote

Hi Dave,

JCL can't do what you want to do - some kind of code will have to be executed. Might be your sort product, rexx, some other utility, etc.

As i mentioned before, you need to post some sample "input" and the output you want when that input is processed. Show some sample members that would be selected by your process and some that would not.

You mention jobname - is that the member name? What if a member does not have a JOB statement? What if a member executes multiple procs?

You now mention additoinal processing, so it would be best if you post samples of the intermediate files created by this process as well as any "other" files like "already existing file of procs containing a certain program". Someone may be able to help with how to implement, but you need to provide clear, complete examples. As they say - a picture is worth 1000 words.
Back to top
View user's profile Send private message
coxdavi

New User


Joined: 12 Mar 2009
Posts: 30
Location: usa

PostPosted: Fri May 22, 2009 1:53 am    Post subject: Reply to: Scan JCL library and extract proc name
Reply with quote

Dick,
Yes, I would be using Easytrieve to do the compares ( Match processing ). All members in the JCL library must have a job card. JCL sample would be like this:

//OPSD022D JOB (999999,410101),,MSGCLASS=X,CLASS=W
/*JOBPARM P=PROC01
//JOBLIB DD DSN=SYS1.EZTRIEVE.LINKLIB,DISP=SHR
//STEP001 EXEC OPSD022P

I can get the jobname from looking for " JOB " in columns 12 through 14, then the jobname is columns 3 throught 10.

Next, would be to go through the following card images and find " EXEC ". Having found that literal, I would then check a number of field ranges, extracting any results along with the jobname into a list.

I would then compare the proc field with another list of known procs containing the program, giving the associated jobname.

Ok, I have explained three times. Looks like it is time to go do it. icon_smile.gif

I will let you know when I am done. Thanks for listening.


Dave
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri May 22, 2009 2:28 am    Post subject:
Reply with quote

Hi Dave,

You're welcome icon_smile.gif

Quote:
Looks like it is time to go do it.
Sounds like a plan.

Sounds like you'll be good to go once you have created the JOB/PROC xref list/file.

Someone will be here if there are questions.
Back to top
View user's profile Send private message
mtaylor

Active User


Joined: 20 Feb 2009
Posts: 108
Location: Kansas City

PostPosted: Fri May 22, 2009 6:09 pm    Post subject:
Reply with quote

Quote:
I can get the jobname from looking for " JOB " in columns 12 through 14, then the jobname is columns 3 throught 10.

Next, would be to go through the following card images and find " EXEC ". Having found that literal, I would then check a number of field ranges, extracting any results along with the jobname into a list.


Generally, this 12-14 assumption isn't true. If your installation has all 8 character job and step names (and every job has single spacing around the job name) then it will work. Essentially, JOB and EXEC (step) names are optional and if present may contain 1-8 characters (of course it doesn't make sense to NOT have a jobname). White space is significant, and it's meaning depends on the context. That's just one reason 'standard' parsing techniques aren't a good fit for JCL.
Back to top
View user's profile Send private message
coxdavi

New User


Joined: 12 Mar 2009
Posts: 30
Location: usa

PostPosted: Fri May 22, 2009 8:54 pm    Post subject: Reply to: Scan JCL library and extract proc name
Reply with quote

Yes, thanks for the heads-up on the JOB statement. I am sure that I would have stumbled into the need to do the same for the literal JOB as I will have to do for the literal EXEC. Yes, true, not all jobnames are 8 characters, so a little more work. I appreciate your input.
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 CICS TS 5.3 migr after DFHCSDUP UPGRA... Kyle Carroll CICS 6 Wed Aug 31, 2016 10:58 pm
No new posts how to find clist's or view library Andrew Hsia CLIST & REXX 4 Tue Jun 28, 2016 6:07 pm
No new posts New PROC not reflecting in prod even ... Musab Ahmed CA Products 9 Tue Mar 15, 2016 12:45 pm
No new posts Sort Logic to extract data scorp_rahul23 DFSORT/ICETOOL 13 Tue Mar 01, 2016 1:22 am
No new posts how to extract the member name ? jackzhang75 CLIST & REXX 1 Wed Feb 17, 2016 9:21 pm


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