I use: 0001: SUBROUTINE RETURN.SETPTR(JOBNAME,PON) 0002: * 0003: * RETURN-SETPTR - THIS SUBROUTINE WILL RETURN IN "JOBNAME" THE CURRENT 0004: * SPOOL WILL GO TO. 0005: * 0009: ********************************************************************* 0010: * 0011: * 0012: EXECUTE "SETPTR ":PON CAPTURING JUNK 0013: [EMAIL PROTECTED]:"Output to HOLD file" 0014: XX=INDEX(JUNK,SEARCH,1) 0015: IF XX=0 THEN 0016: JOBNAME="" 0017: RETURN 0018: END 0019: JUNK=JUNK[XX+1,LEN(JUNK)] 0020: YY=INDEX(JUNK,":",1) 0021: YZ=INDEX(JUNK,CHAR(254),1) 0022: JOBNAME=JUNK[YY+2,YZ-YY-2] 0023: RETURN 0024: * 0025: END
Passit the PON (printer channel), and the holdname is returned in JOBNAME The hold number is : FIELD(JOBNAME,"_",COUNT(JOBNAME,"_")+1) George > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Tom Dodds > Sent: Wednesday, February 15, 2006 10:53 AM > To: User group U2 > Subject: [U2] Capturing hold file numbers. > > > Hi all: > > I need a little printer help if someone has experience with > this situation. > > When you use the SETPTR command to direct printed output to a > HOLD file and > turn on the INFORM option (SETPTR 0,,,,,1,AT > ASHTEST,HOLD,INFORM) you get > the number of the hold file that is generated, displayed to > the screen when > the printer is turned OFF, CLOSED or the program is > terminated. How can you > capture this number, the Hold file number, within the > executing program? > > > > Thanks in advance for you assistance. > > > > Tom Dodds > > [EMAIL PROTECTED] > > 708-234-9608 Office > > 630-235-2975 Cell > ------- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/