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" <[email protected]>
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
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to