On 21-Mar-2015 10:42 -0500, CRPence wrote:
For reference, the past thread of the same Subject:
<http://archive.midrange.com/rpg400-l/201105/threads.html#00051>
Is anyone aware of and willing to share the hopefully since-revealed
secret incantation to effect the retrieval of the library list
information from a not-yet-active job on the Job Queue (JOBQ)? The
topic thread from 2011 identified a PTF that apparently both included
the Retrieve Job Information (QUSRJOBI) API and provided a capability
to obtain the [some portion(s) of the LIBL information [what of
SYSLIBL, CURLIB, and INLLIBL <aka\effectively USRLIBL> was not made
clear]; presumably that capability was exposed via QUSRJOBI, and part
of the base OS in v7r2 such that no PTF would be required. My inquiry
is purely academic, as I have no access to any /current/ release.
If the capability is in that QUSRJOBI API <<SNIP>>
Revealed to me off-list, was the following URL. Seemingly revealed
there, is an undocumented interface [an undocumented format name
JOBI0310 made available in 2011] for the QUSRJOBI API.
<
http://www.taatool.com/document/L_savrstjobq.htm>
Being curious to determine what other undocumented formats might
exist for that API, perhaps someone running IBM i 7.2 would run the
attached CL job stream using the Submit DataBase Job (SBMDBJOB), and
then report the output for the benefit of those on the list who might be
interested in having that information revealed; if any output is
produced, a list of supported formats [beyond those documented] should
get written to the spool file name QPRINT placed on OUTQ(QPRINTS).
//bchjob usrjobi inllibl(qgpl) endsev(30) log(0 0 *nolist) jobd(qgpl/qbatch)
crtclmod qtemp/usrjobi modsrc output(*none) log(*no)
crtpgm qtemp/usrjobi bndsrvpgm(qc2io) module(*pgm)
ovrprtf qprint hold(*yes) prttxt(*blank) spool(*yes) outq(qprints) usrdta(usrjobi)
call qtemp/usrjobi
//data MODSRC *SRC '//ENDMODSRC'
dcl &rcvvar *char (3000)
dcl &rcvlen *int ( 4) 3000
dcl &fmt *char ( 8) 'JOBI####'
dcl &qjob *char ( 26) '*'
dcl &ijob *char ( 16) ' '
dcl &errcde *char ( 16) x'0000001000000000'
dcl &fmtnbr *dec ( 4 0) 0 /* start on JOBI0000 */
dcl &fmtmin *int ( 4) 0000
dcl &fmtmax *int ( 4) 9999
dcl &rtncde *int ( 4)
dcl &putstr *char ( 9) x'404040404040404000'
chgvar &fmtnbr &fmtmin
getijobid: /* if error, then fail; i.e. no monmsg! */
call qusrjobi ( &rcvvar x'00000033' JOBI0100 &qjob &ijob ) /* get iJob ID */
chgvar &qjob '*INT' /* use the just-retrieved int job ID */
chgvar &ijob %sst(&rcvvar 35 16) /* set iJob ID obtained by above CALL */
nxtfmt: /* loop thru the possible valid format names JOBI#### */
chgvar %sst(&fmt 5 4) &fmtnbr
if ( (&fmtnbr *eq 100) *or (&fmtnbr *eq 150) +
*or (&fmtnbr *eq 200) *or (&fmtnbr *eq 300) +
*or (&fmtnbr *eq 400) *or (&fmtnbr *eq 500) +
*or (&fmtnbr *eq 600) *or (&fmtnbr *eq 700) +
*or (&fmtnbr *eq 750) *or (&fmtnbr *eq 800) +
*or (&fmtnbr *eq 900) *or (&fmtnbr *eq 1000)+
) then(goto skipfmt) /* format is already documented */
call qusrjobi ( &rcvvar &rcvlen &fmt &qjob &ijob &errcde )
if (%sst(&errcde 9 7) *ne 'CPF3C21') then(do)
sndpgmmsg &fmt msgtype(*info) topgmq(*prv) tomsgq(*topgmq)
chgvar %sst(&putstr 1 8) &fmt
callprc 'puts' parm((&putstr *byref)) rtnval(&rtncde)
enddo
resetErr: /* optional, but nice for debug purposes */
chgvar &errcde x'00000010000000004040404040404040'
skipfmt:
if (&fmtnbr *lt &fmtmax) then(do)
chgvar &fmtnbr (&fmtnbr + 1)
goto nxtfmt /* all values *lt 10000 is exhaustive */
enddo
fin:
return
endpgm
//ENDMODSRC
//endbchjob
As an Amazon Associate we earn from qualifying purchases.