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
 

 

Retrieve the JOBID for a particular process

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
ashimprodhan

New User


Joined: 08 Dec 2006
Posts: 12
Location: Kolkata

PostPosted: Tue Nov 04, 2008 7:48 pm    Post subject: Retrieve the JOBID for a particular process
Reply with quote

Hello All,

I have a requirment to retrieve the JOBID for a particular process.

The situation is like this- the JOBNAME and FIRST or ALL will be the Input prameter for this. And if the input parameter is First then the Last job with the input JOBNAME will be the output and if it is ALL then all the jobs with the same jobname will be the output.

I have to implement this either through JCL or COBOL program. Please suggest/advise how can it be implemented?

I guess the SDSF display output is stored somewhere. Is it stored in any Files or DB2 tables from where it is getting displayed on the console? can we use those files/tables and retrieve the messages programatically?
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Tue Nov 04, 2008 7:55 pm    Post subject:
Reply with quote

Actually, SDSF output is generated on-the-fly from the list of jobs and processes running on the system. There is no table nor file that contains this information -- it's pieces of system control blocks that link to one another.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Tue Nov 04, 2008 7:57 pm    Post subject: Re: JOBID retrieval
Reply with quote

Although this can be done traversing control blocks in COBOL, a small Assembler sub-program, which issues the MVS "EXTRACT" Macro could be Called from COBOL and can then be used by any COBOL Batch program as a shop utility.

Regards,

Bill
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Wed Nov 05, 2008 12:58 am    Post subject:
Reply with quote

Hello,

Quote:
if it is ALL then all the jobs with the same jobname will be the output.
What controls which jobs are "of interest"? Is everything that "ran today" a candidate - there may be things from multiple days still in the queue and visable to sdsf? When ALL is specified, should every job for that day be considered? What about jobs that were run, printed, and removed from the spool - they will not be "found" by this?

If you more clearly explain the requirement, we may be able to provide better suggestions.
Back to top
View user's profile Send private message
ashimprodhan

New User


Joined: 08 Dec 2006
Posts: 12
Location: Kolkata

PostPosted: Wed Nov 05, 2008 9:34 am    Post subject:
Reply with quote

Hi,

If its ALL then the JOBs which are in the spool will be considered only. If the job is purged/removed from the SPOOL then those will not be considered.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Wed Nov 05, 2008 9:42 am    Post subject:
Reply with quote

Hello,

O.K. Only jobs currently in the spool.

What will the output look like? Posting sample desired output will help.

You can run sdsf in batch if you have the proper permissions. This may be all that you need. If you use the forum SEARCH, there are multiple topics.
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 Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts Viewing executing process in NDM .. q... Debb.Brant IBM Tools 0 Wed Dec 14, 2016 10:55 pm
No new posts Need to retrieve Julian_date Suganya87 DB2 4 Wed Aug 17, 2016 7:27 pm
No new posts Retrieve current year or month using ... vnktrrd DFSORT/ICETOOL 15 Tue Mar 15, 2016 4:14 pm


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