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
 

 

Capturing job names and all the datasets associated with it

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sandeep kumar302

New User


Joined: 14 Mar 2012
Posts: 69
Location: India

PostPosted: Sat Dec 07, 2013 9:17 am    Post subject: Capturing job names and all the datasets associated with it
Reply with quote

Hi,
I am new to Mainframe technology and i have requirement like below:

1. I have a flat file which contains the job details with the expanded PROC with dataset name.
2. The datasets has so many JCLS in expanded order.
3. My requirement is to capture all the job names and the datasets associated with the job names.
4. I am planning to use string and unstring concept but not sure how to proceed the coding. Can someone please help?

I am pasting the details of the files below:

//ABCDEFGH JOB .....................MSGCLASS=X,CLASS=
..
...
...
..
..EXEC PROC
...
..
//-- DSN=a.b.c,Disp=shr
..
..

Please note that the position of //Jobname i.e //ABCDEFGH here is not in a particular position and can vary
i want to apply logic like-
a) Read the lines one by one
b) If a line contains the keyword (MSGCLASS or CLASS) or has the keyword JOB then after the "//" symbol it should be job name and i have to capture the job name here ABCDEFGH
c) then i have to capture all the datasets associated to this job name until the next job name comes.
d) please note that to capture the datasets i can use keyword DSN and some other criteria but i am not sure how to implement it.

Can you please help me
Back to top
View user's profile Send private message

TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Sat Dec 07, 2013 10:36 am    Post subject:
Reply with quote

I am not sure if your requirement qualifies to do using Cobol, Might be REXX/Macro will be a better solution.

How big is your flat file?. Is this a one-time/daily/weekly/monthly activity?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Sat Dec 07, 2013 11:59 am    Post subject: Reply to: capturing job names and all the datasets associate
Reply with quote

see here for a FULL FUNCTION jcl parser/analyzer/reformatter
http://www.ibmmainframes.com/viewtopic.php?t=32494&highlight=jcl+parser

and do not double post the same question on sibling forums
the people answering there are at the same answering here
Back to top
View user's profile Send private message
sandeep kumar302

New User


Joined: 14 Mar 2012
Posts: 69
Location: India

PostPosted: Sun Dec 08, 2013 12:09 am    Post subject: Reply to: capturing job names and all the datasets associate
Reply with quote

Hi Mfkid,
I am suppose to develop a cobol program for this task. The flat files might contain more than 50000 jobs. icon_rolleyes.gif . Even if I have a small and easy Rexx program then I can try to convince them for Rexx.
Back to top
View user's profile Send private message
sandeep kumar302

New User


Joined: 14 Mar 2012
Posts: 69
Location: India

PostPosted: Sun Dec 08, 2013 12:13 am    Post subject: Reply to: capturing job names and all the datasets associate
Reply with quote

Hi Enrico,
The Link which u provided me is very lenghthy one and as I told that I am new to writing cobol programs and Rexx programs. Please suggest the small cobol or rexx program which will work fine.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Sun Dec 08, 2013 12:25 am    Post subject:
Reply with quote

You have been told -- both here and on our sister board -- that a quick, easy solution does not exist. Mr. Myers has pointed out some of the difficulties. You have taken a bite (or had it thrust into your mouth) that is too big for you to chew.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Sun Dec 08, 2013 1:20 am    Post subject: Reply to: capturing job names and all the datasets associate
Reply with quote

Quote:
Please suggest the small cobol or rexx program which will work fine.


no small program will be able to parse and extract info from a JCL stream
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: Sun Dec 08, 2013 10:44 am    Post subject:
Reply with quote

Hello and welcome to the forum,

As has been explained, it is not acceptable to post the same question in multiple forums. This topic is being locked.

As your experience level is on the low end, the "other" forum will be more suitable to help you with various kinds of questions.

Be aware that most of us senior "helpers" here support that forum as well, so you will have mostly the same answers anyway.

As explained, this will not be a trivial task (if done well).

If a working solution seems too complicated to download and run, you will be better working on something else until your experience level increases.

d
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts Variable for cursor names ravikumar15 DB2 5 Sun Jul 17, 2016 7:08 am
No new posts Finding unreferenced datasets without... Alan Playford JCL & VSAM 5 Tue Jul 12, 2016 9:07 pm
No new posts Using Field names in FILEAID Batch CO... Atul Banke Compuware & Other Tools 2 Wed Jun 29, 2016 9:54 pm
No new posts BDW in VB datasets harisukumaran JCL & VSAM 5 Sat May 28, 2016 9:46 am


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