Getting job-name from Cobol / DB2 program

kishore erukulapati

Getting job-name from Cobol / DB2 program
Hi ,
Is there any way to get the job-name from Cobol / DB2 ? ( Using DB2
System tables or something else )
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com



Jim Harrison

Re: Getting job-name from Cobol / DB2 program
(in response to Harvey Wachtel)
Gilbert Saint Flour has a sample posted at his web site:

http://members.home.net/gsf/tools/cob2job.txt

At 11:04 AM 12/29/99 PST, you wrote:
>Hi ,
> Is there any way to get the job-name from Cobol / DB2 ? ( Using DB2
>System tables or something else )
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
>
>
>


>
>



Harvey Wachtel

Re: Getting job-name from Cobol / DB2 program
(in response to kishore erukulapati)
Here's the assembler subroutine we use. It's got a few homegrown macros
which should be easy to decipher ("NOLSA" on the ENTER macro means no low
save area -- just STM into the high save area provided), and you'll want to
take out the locator/descriptor stuff, but the essentials are there:

JOBNAME TITLE 'DESCRIPTION'
* RENT,REFR.
*
* PL/I FUNCTION TO RETURN JOBNAME.
*
* DCL JOBNAME EXT ENTRY RETURNS(CHAR(8));
TITLE 'START SLOP'
JOBNAME IRTCSECT AMODE=ANY,RMODE=24
CODE IRTLOCTR ,
CONS IRTLOCTR ,
TITLE 'DATA AREAS'
IHAPSA DSECT=YES,LIST=YES
IKJTCB DSECT=YES,LIST=YES
TIOSECT DSECT ,
IEFTIOT1 ,
TITLE 'MAIN ROUTINE'
IRTLOCTR CODE
MAIN DS 0Y JOBNAME FUNCTION ENTRY
ENTER NOLSA,REGS=NONE,ID=(*,DATE)
USING PSA,0
L 15,PSATOLD ADR TCB
DROP 0 DONE WITH PSA
USING TCB,15
L 15,TCBTIO ADR TIOT
DROP 15 DONE WITH TCB
USING PSA,0
L 15,PSATOLD ADR TCB
DROP 0 DONE WITH PSA
USING TCB,15
L 15,TCBTIO ADR TIOT
DROP 15 DONE WITH TCB
USING TIOT1,15
L 1,0(,1) ADR RESULT DV/LOCATOR-DESCRIPTOR
L 1,0(,1) ADR RESULT AREA
MVC 0(L'TIOCNJOB,1),TIOCNJOB MOVE RESULT
DROP 15 DONE WITH TIOT
EXIT NOLSA,REGS=NONE RETURN
TITLE 'END SLOP'
IRTLOCTR CONS
LTORG ,
END MAIN



kishore
erukulapati To: [login to unmask email]
<[login to unmask email] cc:
TMAIL.COM> Subject: Getting job-name from Cobol / DB2 program
Sent by: DB2
Data Base
Discussion
List
<[login to unmask email]
OM>


1999-12-29
14:04
Please
respond to
DB2 Data Base
Discussion
List





Hi ,
Is there any way to get the job-name from Cobol / DB2 ? ( Using DB2
System tables or something else )
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com








[login to unmask email]

Re: Getting job-name from Cobol / DB2 program
(in response to Jim Harrison)
If u are using some online monitoring tools like O-MON ,u can get the job
name corresponding to a plan.

Sanjeev





kishore erukulapati <[login to unmask email]>@RYCI.COM> on 12/29/99 07:04:49
PM

Please respond to DB2 Data Base Discussion List <[login to unmask email]>

Sent by: DB2 Data Base Discussion List <[login to unmask email]>


To: [login to unmask email]
cc:
Subject: Getting job-name from Cobol / DB2 program


Hi ,
Is there any way to get the job-name from Cobol / DB2 ? ( Using DB2
System tables or something else )
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com