• Subject: Re: Internal Job Id
  • From: David McKenzie <davemck@xxxxxxxxxx>
  • Date: Mon, 29 May 2000 08:50:24 -0700

The '001E2F00' is evidently the offset of the WCBTE (Work Control Block Table
Entry) in the Work Control Block Table, QWCBT01 (a sysptr to which is in every
job's PCO at offset x10).  Here's a snippet of MI that gets a ptr to another
job's PCO:

(NB1: must be system state)
(NB2: this is the *hard* [even Pyrrhic] way to do it :-)
--------------------------------------------------------

         DCL SYSPTR QWCBT01  BASPCO POS(H'11');
         DCL SYSPTR QTEMPSYP BASPCO POS(H'41');

         DCL SPCPTR WCBT01P AUTO;

         DCL SPCPTR WCBTEP  AUTO;
         DCL SPC    WCBTE   BAS(WCBTEP);
         DCL SYSPTR WCBTEPCS DEF(WCBTE) POS(H'21');

         DCL SPCPTR HISPCOP AUTO;
         DCL SPC    HISPCO  BAS(HISPCOP);
         DCL SYSPTR HISQTEMP DEF(HISPCO) POS(H'41');

         DCL DD OBJDESC CHAR(34) AUTO BDRY(2);
         DCL DD TYPESUB CHAR(2)  DEF(OBJDESC) POS(1);
         DCL DD OBJNAM  CHAR(30) DEF(OBJDESC) POS(3);
         DCL DD OBJAUTH CHAR(2)  DEF(OBJDESC) POS(33) INIT(X'0000');

         DCL SYSPTR USSYP   AUTO;

         DCL DD USRSPC   CHAR(20) AUTO INIT('QUSLJOB   QTEMP     ');
         DCL DD FMT      CHAR( 8) AUTO INIT('JOBL0100');
         DCL DD QUALJOB  CHAR(26) AUTO INIT('QPADEV0004DAVEM     160774');
         DCL DD STATUS   CHAR(10) AUTO INIT('*ACTIVE   ');
         DCL SPCPTR LJ01    AUTO INIT(USRSPC);
         DCL SPCPTR LJ02    AUTO INIT(FMT);
         DCL SPCPTR LJ03    AUTO INIT(QUALJOB);
         DCL SPCPTR LJ04    AUTO INIT(STATUS);
         DCL OL LJOBOL (LJ01, LJ02, LJ03, LJ04);
         DCL SYSPTR QUSLJOB AUTO
                            INIT('QUSLJOB', CTX('QSYS'), TYPE(PGM,1));

         DCL SPCPTR GENHDRP AUTO;
         DCL SPC    GENHDR  BAS(GENHDRP);
         DCL DD     LISTOFF  BIN(4) DEF(GENHDR) POS(125);

         DCL SPCPTR JL0100P AUTO;
         DCL SPC    JOBL0100 BAS(JL0100P);
         DCL DD     INTJOBID CHAR(16) DEF(JOBL0100) POS(27);
         DCL DD       WCBTEOFF BIN(4) DEF(INTJOBID) POS(5);

         CALLX      QUSLJOB, LJOBOL, *;

         CPYBLA     TYPESUB, X'1934';
         CPYBLAP    OBJNAM, USRSPC(1:10), ' ';
         RSLVSP     USSYP, OBJDESC, QTEMPSYP, *;

         SETSPPFP   GENHDRP, USSYP;
         ADDSPP     JL0100P, GENHDRP, LISTOFF;
         SETSPPFP   WCBT01P, QWCBT01;
         ADDSPP     WCBTEP, WCBT01P, WCBTEOFF;
         SETSPPFP   HISPCOP, WCBTEPCS;

         PEND;
--------------------------------------------------------

Leif Svalgaard wrote:

> When retrieving information about a job with QGYOLJOB, you get something like
> this:
> QPADEV000H LSVALGAARD153409 00440001001E2F00 80BAABC5410A0000*ACTIVE  I
>
> The 00440001001E2F00 80BAABC5410A0000 part is the internal Job Id. It clearly
> has a
> timestamp in it (80BAABC5410A0000). Does anybody here know how to find
> the job PCO from the internal job id?
>
> Leif Svalgaard

+---
| This is the MI Programmers Mailing List!
| To submit a new message, send your mail to MI400@midrange.com.
| To subscribe to this list send email to MI400-SUB@midrange.com.
| To unsubscribe from this list send email to MI400-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: dr2@cssas400.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.