RE: [U2] Capturing hold file numbers.
I want to thank everyone who responded. We have found, through a combination of postings, a solution to our specific situation and we would like to thank the contributors Thanks again Tom Dodds [EMAIL PROTECTED] 708-234-9608 Office 630-235-2975 Cell -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marc Mergenthaler Sent: Thursday, February 16, 2006 12:35 PM To: u2-users@listserver.u2ug.org Subject: RE: [U2] Capturing hold file numbers. We have used code like the following to capture a print job number within a program. The SETPTR command must be executed after the PRINTER ON and at least one line has been printed and before the PRINTER OFF/CLOSE statement. We are using UV 9.5.1.1E on an IBM RS6000 AIX system. PRINTER ON PRINT "" EXECUTE "SETPTR", OUT > PRINT.INFO PRINTER OFF PRINTER CLOSE PRINT.FILE.INFO = FIELD(PRINT.INFO,'/',2,4) PRINT.FILE.PATH.NAME = FIELD(PRINT.FILE.INFO,@AM,1) * Adjust the FIELD statement based on the spoolers path PRINT.JOB.NUMBER = FIELD(PRINT.FILE.PATH.NAME,'/',4,1)[3,5] CRT PRINT.JOB.NUMBER Running the program produces the following output: Spooler Entry #16719 16719 Hope this helps, Marc Mergenthaler HMS Healthcare Greenwood Village, CO 80111 [EMAIL PROTECTED] 303-504-5408 Office --- 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/
RE: [U2] Capturing hold file numbers.
We have used code like the following to capture a print job number within a program. The SETPTR command must be executed after the PRINTER ON and at least one line has been printed and before the PRINTER OFF/CLOSE statement. We are using UV 9.5.1.1E on an IBM RS6000 AIX system. PRINTER ON PRINT "" EXECUTE "SETPTR", OUT > PRINT.INFO PRINTER OFF PRINTER CLOSE PRINT.FILE.INFO = FIELD(PRINT.INFO,'/',2,4) PRINT.FILE.PATH.NAME = FIELD(PRINT.FILE.INFO,@AM,1) * Adjust the FIELD statement based on the spoolers path PRINT.JOB.NUMBER = FIELD(PRINT.FILE.PATH.NAME,'/',4,1)[3,5] CRT PRINT.JOB.NUMBER Running the program produces the following output: Spooler Entry #16719 16719 Hope this helps, Marc Mergenthaler HMS Healthcare Greenwood Village, CO 80111 [EMAIL PROTECTED] 303-504-5408 Office --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Capturing hold file numbers.
Is VMARK.BP supplied with Universe? I can't find it on my system and I'd be very interested in using SPOOL.NUM, or seeing what it does. Thanks Harman -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gordon J Glorfield Sent: Wednesday, February 15, 2006 9:58 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Capturing hold file numbers. On UV we call a UV supplied subroutine called SPOOL.NUM. It's located in the VMARK.BP. Gordon J. Glorfield Sr. Applications Developer MAMSI (A UnitedHealth Company) 301-360-8839 --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Capturing hold file numbers.
Can't check the system to verify, but I believe that Unidata stores the next hold number in the DICT of the _HOLD_ file, called NEXT.HOLD. Charlie Rubeor Unix/Database Administrator Wiremold/Legrand 60 Woodlawn Street West Hartford, CT 06110 Tel: 860.233.6251 x3498 Fax: 860.523.3690 Email: [EMAIL PROTECTED] Internet: www.wiremold.com [demime 1.01d removed an attachment of type image/jpeg] --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Capturing hold file numbers.
I don't have a VMARK.BP file nor do I have a program called SPOOL.NUM in the APP.PROGS file. If you have the source for SPOOL.NUM I would really appreciate having access to it. Thanks for the help Tom Dodds [EMAIL PROTECTED] 708-234-9608 Office 630-235-2975 Cell -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gordon J Glorfield Sent: Wednesday, February 15, 2006 11:58 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Capturing hold file numbers. On UV we call a UV supplied subroutine called SPOOL.NUM. It's located in the VMARK.BP. Gordon J. Glorfield Sr. Applications Developer MAMSI (A UnitedHealth Company) 301-360-8839 [EMAIL PROTECTED] wrote on 02/15/2006 10:52:38 AM: > 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/ This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. --- 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/
Re: [U2] Capturing hold file numbers.
Hi Tom, Based on the structure of your SETPTR command, you appear to be printing the job to the printer and holding it in the &HOLD& file at the same time. We have not used the SETPTR command in that fashion, but we have used it extensively in a slightly different way that may suggest a solution. In our generic Pick spooler for Universe, we use a SETPTR 0 command with MODE = 3 and the BANNER NEXT option, which allows us to define part of the record ID and then appends a sequential number to each print job and sends it to the &HOLD& file *without* printing it at the time that it's generated We then process the print jobs in the &HOLD& file using the following code: CMD = 'SELECT &HOLD&" EXECUTE CMD RTNLIST (list name) Then we have a list of the record IDs in the &HO:LD& file to process. Depending on how the IDs are assigned by Universe using the HOLD option as you are using it, if the last ID assigned is the highest number, you could SSELECT the &HOLD& file BY-DSND and take the first number in the RTNLIST list. The weakness in this approach is that many print jobs may land in the &HOLD& file generated by different print programs at effectively the same time and you may not be able to know which print job was generated by which print program with any certainty. Alternatively, you might use the MODE = 3 with the BANNER NEXT option as we do and incorporate into the ID the date, time and program name so that your printing program would know what the ID is before the print job is generated, independently of the number assigned by Universe, and could then retrieve the print job with certainty to ensure getting the correct print job. Please contact me online or offline if you would like to discuss this further. hth, Dave Dave Taylor President Sysmark Information Systems, Inc. 49 Aspen Way Rolling Hills Estates, CA 90274 800-SYSMARK (800-797-6275) (O) 310-544-1974 (C) 310-561-5200 (P) 800-339-1497 (F) 310-377-3550 Your Source for Integrated EDI Translation and DataSync Integration www.sysmarkinfo.com - Original Message - From: "Tom Dodds" <[EMAIL PROTECTED]> To: "User group U2" Sent: Wednesday, February 15, 2006 7:52 AM 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/
RE: [U2] Capturing hold file numbers.
I assume this pertains to UniVerse, where you have to jump through the type of hoops outlined by the posters so far. For the sake of completeness, on UniData you can just use the GETPU() function. Tim Snyder Consulting I/T Specialist , U2 Professional Services North American Lab Services DB2 Information Management, IBM Software Group 717-545-6403 [EMAIL PROTECTED] --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Capturing hold file numbers.
On UV we call a UV supplied subroutine called SPOOL.NUM. It's located in the VMARK.BP. Gordon J. Glorfield Sr. Applications Developer MAMSI (A UnitedHealth Company) 301-360-8839 [EMAIL PROTECTED] wrote on 02/15/2006 10:52:38 AM: > 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/ This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Capturing hold file numbers.
You can use the BANNER option on SETPTR to specify the hold entry name. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On 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/ > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.9/261 - Release > Date: 2/15/2006 > > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.9/261 - Release Date: 2/15/2006 --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Capturing hold file numbers.
One way is to assign the filename yourself - SETPTR 03,AT ASHTEST,AS HoldFileName -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Dodds Sent: February 15, 2006 10:53 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/
RE: [U2] Capturing hold file numbers.
PERFORM a setptr with the spool file open and extract the actual file from the result Les Sherlock Hewkin Senior Developer Core Systems - 9951 01604 592289 -Original Message- From: Tom Dodds [mailto:[EMAIL PROTECTED] Sent: 15 February 2006 15:53 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/ This message has been comprehensively scanned for viruses, please visit http://www.avg.power.net.uk/ for details. This e-mail and any attachments are confidential and intended solely for the use of the addressee only. If you have received this message in error, you must not copy, distribute or disclose the contents; please notify the sender immediately and delete the message. This message is attributed to the sender and may not necessarily reflect the view of Travis Perkins plc or its subsidiaries (Travis Perkins). Agreements binding Travis Perkins may not be concluded by means of e-mail communication. E-mail transmissions are not secure and Travis Perkins accepts no responsibility for changes made to this message after it was sent. Whilst steps have been taken to ensure that this message is virus free, Travis Perkins accepts no liability for infection and recommends that you scan this e-mail and any attachments. Part of Travis Perkins plc. Registered Office: Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG. --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Capturing hold file numbers.
Incidentally, if you wanted to output to hold, wouldn't it be better to use a mode of 6 (or 3) rather than the HOLD option? --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Capturing hold file numbers.
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/
RE: [U2] Capturing hold file numbers.
Years ago we faced this same issue and decided that it was better to force the hold file open at the beginning and capture the number then. I don't recall the specifics right now, but I do recall having a program that generated a proc with the SETPTR command and then executing that, capturing the output and parsing the hold file number from there. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Dodds Sent: Wednesday, February 15, 2006 8: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/ -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.9/261 - Release Date: 2/15/2006 --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/