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

Retrieve the JOBID for a particular process


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Nov 04, 2008 7:55 pm
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Tue Nov 04, 2008 7:57 pm
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

Moderator Emeritus


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

PostPosted: Wed Nov 05, 2008 12:58 am
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
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

Moderator Emeritus


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

PostPosted: Wed Nov 05, 2008 9:42 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Using Java/C/C++ to retrieve dataset ... Java & MQSeries 6
No new posts Retrieve IMS SubSystem Name IMS DB/DC 2
No new posts process statement for SUPREC, CMPCOLM... TSO/ISPF 4
No new posts retrieve volume records from decollec... DFSORT/ICETOOL 4
No new posts Unable to retrieve Datasets Names usi... CLIST & REXX 20
Search our Forums:

Back to Top