Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Capture d3 Spooler Job Number

21 views
Skip to first unread message

Robert S. Lobel

unread,
Oct 27, 2008, 8:46:37 PM10/27/08
to
Group,
Is there a way to capture the d3 spooler job number for a print job
initiated by a basic program? Let me know.
Rob


Mike Wooding

unread,
Oct 27, 2008, 10:44:36 PM10/27/08
to
"Robert S. Lobel" <Rober...@COX.net> wrote in message
news:HhtNk.2998$I61....@newsfe03.iad

system(20) returns the most recent Spooler entry number generated by the
current process.

Hope that helps.

With Kindest Regards

Mike Wooding


keyda...@gmail.com

unread,
Nov 17, 2008, 10:26:01 AM11/17/08
to
On Oct 27, 6:44 pm, "Mike Wooding" <mikewood...@email.com> wrote:
> "Robert S. Lobel" <RobertLo...@COX.net> wrote in messagenews:HhtNk.2998$I61....@newsfe03.iad

>
> > Group,
> > Is there a way to capture the d3 spooler job number for a print job
> > initiated by a basic program?  Let me know.
> > Rob
>
> system(20) returns the most recent Spooler entry number generated by the
> current process.
>
> Hope that helps.
>
> With Kindest Regards
>
> Mike Wooding

Here is some code I wrote a number of years ago. Obviously some pre
and post code is necessary.

JOB.NO=SYSTEM(20)
*
* If you can read from the PEQS file, use this method
*
OPEN "DM,PEQS," TO PEQS ELSE RET.GOTO=999 ; RETURN
890 READ SPOOLER.REC FROM PEQS,JOB.NO ELSE
PRINT @(0,23):"SPOOLER JOB# NOT FOUND. ENTER (JOB#), OR <CR>
":
INPUT JOB.NO,5: ; PRINT @(0,23):@(-4):
IF JOB.NO="" THEN RET.GOTO=999 ; RETURN
GOTO 890
END
DELETE PEQS,JOB.NO
*
* AP/PRO method
*
SP.ID="SPOOL.ID.":PORT.NO
AM=CHAR(254)
DATA "S":AM:"F":AM:"SUSPENSE":AM:SP.ID:AM:"Y"
ECHO OFF
EXECUTE 'SP-EDIT ':JOB.NO
ECHO ON
895 READ SPOOLER.REC FROM SUSPENSE,SP.ID ELSE
PRINT @(0,23):"SPOOLER JOB# NOT FOUND. ENTER (JOB#), OR <CR>
":
INPUT JOB.NO,5: ; PRINT @(0,23):@(-4):
IF JOB.NO="" THEN RET.GOTO=999 ; RETURN
GOTO 895
END
DELETE SUSPENSE,SP.ID
IF SPOOLER.REC<1>[1,3]=".BP" THEN SPOOLER.REC=DELETE
(SPOOLER.REC,1,0,0)
K=DCOUNT(SREC,CHAR(254))
IF SPOOLER.REC<K>[1,3]=".CH" THEN SPOOLER.REC=DELETE
(SPOOLER.REC,K,0,0)
*

dwagn...@gmail.com

unread,
Nov 19, 2008, 3:27:30 PM11/19/08
to

Use system(20)
example program
*EXAMPLE PROGRAM TO CAPTURE SPOOLER # AND VIEW IT .
* DAN WAGNER TAURUS COMPUTER GROUP 800-466-4713
* E Syracuse NY 13057
sp.cmd=\sp-assign f33 hs \
* puts spool job in hold file which is PEQS file on D3 systems
crt @(-1):" example program to get spooler no and view peqs no "
crt @(0,13):sp.cmd
execute sp.cmd
*
crt "NOW PRINTING REPORT "
*
printer on
print " this is a test "
for i = 1 to 43
pline = i 'r#2':" test line "
print pline
next i
print str('-',79)
print " finished @ ":oconv(time(),'mth') :" ":oconv(date(),'d4/')
*
printer off
printer close
spjob.no=system(20)
*
* can now show hold spjob.no using d3 VIEW command
crt @(0,19):" report printed now ready to VIEW PEQS ":spjob.no:"
Press <RTN> ":;input xans
* ex.cmd=\edit peqs \:spjob.no
ex.cm= \VIEW PEQS \:SPJOB.NO
execute ex.cmd
CRT " BACK TO PROGRAM , PRESS <RTN> ";;INPUT XANS
STOP
*END OF PROGRAM

Dan Wagner


0 new messages