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

Capturing job names and all the datasets associated with it


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sandeep kumar302

New User


Joined: 14 Mar 2012
Posts: 81
Location: India

PostPosted: Sat Dec 07, 2013 9:17 am
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sat Dec 07, 2013 11:59 am
Reply with quote

see here for a FULL FUNCTION jcl parser/analyzer/reformatter
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: 81
Location: India

PostPosted: Sun Dec 08, 2013 12:09 am
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: 81
Location: India

PostPosted: Sun Dec 08, 2013 12:13 am
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: 1788
Location: Bloomington, IL

PostPosted: Sun Dec 08, 2013 12:25 am
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sun Dec 08, 2013 1:20 am
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

Moderator Emeritus


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

PostPosted: Sun Dec 08, 2013 10:44 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Capturing Job Execution Information All Other Mainframe Topics 3
No new posts Rexx log capturing CLIST & REXX 15
No new posts Merging 2 datasets into one DFSORT/ICETOOL 1
No new posts Capturing COBOL job and program names... All Other Mainframe Topics 2
No new posts PL/I, VB Datasets and the RDW PL/I & Assembler 4
Search our Forums:

Back to Top