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

How Do U write the "job no. & a GDG" in to an


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

New User


Joined: 10 Oct 2006
Posts: 29

PostPosted: Thu Nov 01, 2007 10:29 am
Reply with quote

I have a Trigger GDG for a job, the particular trigger GDG is converted to a flat file and given as input to a cobol pgm. I'm writing an error report from the cobol pgm, if in case any error found on a particular field in the input file.

Issue
------
I want the Jobnumber and the GDG dataset name which triggered the job, on the error report, for easy identification.

We can pass a static file to cobol program through parm='filename' parameter, but is there any possibility to get the GDG name. Also how do you get the job number in the program?.

Ajay.
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Thu Nov 01, 2007 12:32 pm
Reply with quote

GDG name with version - using JFCB

Job number - I'm not sure whether you can get from COBOL, but I think you can get this using REXX code.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Nov 01, 2007 1:34 pm
Reply with quote

.....the particular trigger GDG is converted to a flat file....

A general remark on WRONG terminology...
Why in h*** use the term flat file,
the correct term for what You/everybody implies is
PS ( Physycal Sequential )

a GDG is by Your terminology already a flat file

if You search the net You will find many samples of scanning mvs control blocks Using cobol...
I can not post the link because it could be in a competitive forum, still the program looks useful

I just searched using
Quote:
cobol Retrieving Job Information

and ( in my case at least ) the link is the first one

I would say that the job number is not very useful for Your analysis,
The file name should be enough
And another point, why not read directly the GDG you need
Back to top
View user's profile Send private message
ajay_udl

New User


Joined: 10 Oct 2006
Posts: 29

PostPosted: Thu Nov 01, 2007 5:51 pm
Reply with quote

Hi Devzee,

Can you please let me know in detail wht is this 'JFCB'.
How can we get the GDG verison name in program with 'JFCB'.

Many thanks
Ajay.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Nov 01, 2007 5:55 pm
Reply with quote

Please search first.

See this previous topic on how to determine the dataset name from the JFCB control blocks in COBOL.

See this site to retrieve the job information in COBOL.
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 Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
This topic is locked: you cannot edit posts or make replies. How To Write, Compile and Execute Cob... COBOL Programming 5
No new posts Compare two files with a key and writ... SYNCSORT 3
Search our Forums:

Back to Top