|
Thanks Vernon for your help. It did what I needed. -----Original Message----- From: Vernon Hamberg [mailto:vhamberg@attbi.com] Sent: quinta-feira, 4 de Julho de 2002 18:07 To: midrange-l@midrange.com Subject: Re: Printer job number You don't need the user, as it's always the same user - QSPLJOB. What you call a printer job is actually a writer job, and each one of those has unique name. So you can use DSPJOB WRITERNAME OUTPUT(*PRINT) OPTION(*DFNA) to get a spooled file with, in this case, the option 2 values from a DSPJOB. The reason for the OPTION is to minimize the size of the spooled file. You can leave it off. Then you CPYSPLF QPDSPJOB to a physical file, then read the 2nd record, where the job number is in position 77. You can get to the 2nd record with OVRDBF FILE(OUTF) POSITION(*RRN 2), followed by RCVF in a CL program. The [hysical file has to exist before running the command, and also before compiling the CL. Should have RCDLEN(132) for this purpose. PGM PARM(&WRITER) DCL VAR(&WRITER) TYPE(*CHAR) LEN(10) DCL VAR(&JOBNUM) TYPE(*DEC) LEN(6 0) DCLF FILE(VERN/SPLF) DSPJOB JOB(&WRITER) OUTPUT(*PRINT) OPTION(*DFNA) CPYSPLF FILE(QPDSPJOB) TOFILE(VERN/SPLF) SPLNBR(*LAST) DLTSPLF FILE(QPDSPJOB) SPLNBR(*LAST) OVRDBF FILE(SPLF) POSITION(*RRN 2) RCVF CHGVAR VAR(&JOBNUM) VALUE(%SST(&SPLF 77 6)) DLTOVR FILE(SPLF) ENDPGM At 04:58 PM 7/4/02 +0100, you wrote: >Is there an easy way to retrieve the job number of a printer job in >subsystem QSPL, knowing the user and the printer name? Thanks for your >help. > >A.Sousa _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l or email: MIDRANGE-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.