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

universe o/s

21 views
Skip to first unread message

joyce

unread,
Jun 26, 2007, 12:06:25 AM6/26/07
to
Does anyone know how to retrieve the spooler job number from within a
basic program in universe?????

Jeffrey Kaufman

unread,
Jun 26, 2007, 10:46:19 AM6/26/07
to
I can't help you with Universe, but in D3 it is:

JOB.NO=SYSTEM(20)


"joyce" <albrig...@gmail.com> wrote in message
news:1182553394.3...@i38g2000prf.googlegroups.com...

da...@sysmarkinfo.com

unread,
Jun 26, 2007, 1:21:02 PM6/26/07
to
On Jun 25, 8:06 pm, joyce <albright1...@gmail.com> wrote:
> Does anyone know how to retrieve the spooler job number from within a
> basic program in universe?????

Joyce,

It is always helpful to the forum to know what rel. of the database
you are running and what operating system you are running on.

Working in the blind, however, here are some thoughts that may help.

1. Universe/NT (any Windows OS) does not have a spooler, of any kind
- none whatsoever. Unless they are sent to the &HOLD& file, all print
jobs are sent directly to the named Windows printer spooler with no
entry no. Otherwise they are sent directly to the named Windows
printer spooler with no entry no. when they are SPOOLed from the
&HOLD& file.

2. Universe/nix (any unix-type OS) does have a spooler but it does
not work like a generic Pick spooler in that it has no queues. So,
print jobs can not be sent to queues in the spooler and printers can
not be assigned to queues to print the print jobs in those queues.

3. In both cases, when a print job is sent to the &HOLD& file it is
assigned a print file ID that you designate in the SETPTR command that
you issue. This record ID may or may not contain numbers and can be
both alpha, numeric or a combination of the two. This print file ID
is automatically displayed by Universe when the print file is opened
in the &HOLD& file and is similar in function to the Entry No. in a
generic Pick spooler. But it is only generated for print files that
are place on hold, not for those that are sent directly to the
printer.

4. I am not able to find any reference in the documentation for the
SYSTEM function in Universe that refers to returning the print file ID
from within a Basic program.

Since you are asking this question on this (generic Pick)forum, it
sounds like you may be currently working with a generic Pick database
and evaluating Universe with the possibility of converting your
software to Universe.

<AD> If so, you may wish to learn more about SpoolerPlus, our generic
Pick print spooler for both Universe and Unidata
(www.sysmarkinfo.com). SpoolerPlus provides the functionality of a
generic Pick print spooler so that you don't have to modify the print
processes in your generic Pick software to run it on Universe or
Unidata. We are also an authorized IBM Business Partner and can help
you with your acquisition and installation of Univers</AD>

Feel free to contact me off-line if you'd like to discuss this
further.

hth,

Dave
800-SYSMARK (800-797-6275)
USA

Bill H

unread,
Jun 28, 2007, 1:38:56 AM6/28/07
to
This is a perspective difference. D3 and other MVs (usually) generate their
own spooler entry# and D3 allows it to be queried with the SYSTEM(20)
function call. This is because the developer wants to know the print job
just printed. U2, and I suspect other MVs, handle this differently. They
allow the developer to assign the print job themselves.

The STARTPTR statement will allow a print job to be saved into a spooler
entry# defined by the developer.

Hope this helps.

Bill

<da...@sysmarkinfo.com> wrote in message
news:1182878462....@j4g2000prf.googlegroups.com...

Manu Fernandes

unread,
Jun 29, 2007, 10:35:47 AM6/29/07
to
Hi, for fun...

I do'nt found the Universe's call to found it but :
this works on unix and on NT

from your applicaiton :
DEFFUN GET.SPJOBID
...
PRINTER ON
SPID = GET.SPJOBID
....
PRINTER OFF

-------------------------------------------------------------------------
FUNCTION GET.SPJOBID
RESULT = 0
IF SYSTEM(1) = 0 THEN RETURN(0) ; * no printer ON
IF SYSTEM(91) THEN
EXECUTE 'DOS /C "':SYSTEM(32):'\bin\analyze.shm -p"' CAPTURING RES
END ELSE
EXECUTE 'SH -c "':SYSTEM(32):'/bin/analyze.shm -p"' CAPTURING RES
END
LOOP
REMOVE R FROM RES SETTING S
IF FIELD(R,':',1) = 'sp_job_id' THEN RESULT = TRIM(FIELD(R,':',2))
WHILE RESULT = 0 AND S DO REPEAT
RETURN(RESULT)
-------------------------------------------------------------------------------------------------------


There is probably a another short method but it works.

Manu
"joyce" <albrig...@gmail.com> a écrit dans le message de news:
1182553394.3...@i38g2000prf.googlegroups.com...

Clifton Oliver

unread,
Jul 3, 2007, 12:42:44 AM7/3/07
to
On 2007-06-26 10:21:02 -0700, da...@sysmarkinfo.com said:

> 4. I am not able to find any reference in the documentation for the
> SYSTEM function in Universe that refers to returning the print file ID
> from within a Basic program.
>
> Since you are asking this question on this (generic Pick)forum, it
> sounds like you may be currently working with a generic Pick database
> and evaluating Universe with the possibility of converting your
> software to Universe.

UniVerse does not have a SYSTEM function to return the current spooler
number. On other conversion projects we have written subroutines to
execute SETPTR and capture the output. It is not a perfect solution
because, unlike other platforms, UniVerse does not generate the spooler
number when you do PRINTER ON; it generates it when you do the first
actual PRINT statement.

<plug> If you are converting an application from a generic Pick
platform to UniVerse, and it uses a lot of the spooler stuff, you
really should look at Dave's SpoolerPlus product. </plug>

<ad> If you are trying to streamline print job management and allow
users to have better access to their print jobs with enhanced security,
you might consider looking at my ExtendedSPooler (ESP) for UniVerse
that bypasses much of the UniVerse spooler mechanism. </ad>

mat...@yahoo.com

unread,
Jul 5, 2007, 5:11:40 AM7/5/07
to

> UniVerse does not have a SYSTEM function to return the current spooler
> number. On other conversion projects we have written subroutines to
> execute SETPTR and capture the output. It is not a perfect solution
> because, unlike other platforms, UniVerse does not generate the spooler
> number when you do PRINTER ON; it generates it when you do the first
> actual PRINT statement.

This is what we do as well, far from ideal but we couldn't think of a
better way. Here is the subroutine that we use that does the job.

0001: SUBROUTINE GET.SPOOLER.NUMBER.SUB(SPOOLER.NO,CHANNEL)
0002: * Purpose : Return the current spooler number.
0003: * Note : This needs to be run before the PRINTER CLOSE
command or
0004: * before the program returns to TCL
0005: EQU SLASH TO '/'
0006: EXECUTE "SETPTR ":CHANNEL CAPTURING OUTPUT
0007: NO.OF.SLASH = DCOUNT(OUTPUT,SLASH)
0008: SPOOLER.NO = FIELD(OUTPUT,SLASH,NO.OF.SLASH)
0009: SPOOLER.NO = SPOOLER.NO[3,5]
0010: IF NUM(SPOOLER.NO) AND SPOOLER.NO # "" THEN
0011: SPOOLER.NO += 0
0012: END ELSE
0013: SPOOLER.NO = "ERROR"
0014: END
0015: *
0016: RETURN

0 new messages