View previous topic :: View next topic
|
Author |
Message |
ajay_udl
New User
Joined: 10 Oct 2006 Posts: 29
|
|
|
|
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 |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
.....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 |
|
|
ajay_udl
New User
Joined: 10 Oct 2006 Posts: 29
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
|