Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 10327
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: 4650
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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us