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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: How Do U write the "job no. & a GDG" in to an
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Thu Nov 01, 2007 1:34 pm    Post subject: Reply to: How Do U write the "job no. & a GDG"
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    Post subject: Reply to: How Do U write the "job no. & a GDG"
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

Moderator Team Head


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

PostPosted: Thu Nov 01, 2007 5:55 pm    Post subject: Reply to: How Do U write the "job no. & a GDG"
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    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 Amount field is getting corrupted whe... thesumitk SYNCSORT 5 Tue Oct 18, 2016 8:20 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm
No new posts how to DYNAMICALLY write sort cond to... mohamedmubee COBOL Programming 13 Fri Aug 26, 2016 11:46 pm
No new posts Multi row fetch - "for read only... Nileshkul DB2 3 Sun Aug 14, 2016 12:52 am


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