doh!
LSCMD = 'ls -lt /uvwork/spool | grep ':USER
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Peter Olson
Sent: Thursday, March 04, 2004 4:19 PM
To: 'U2 Users Discussion List'
Subject: RE: [UV] Re: SPOOLER NUMBER
maybe
SUBROUTINE( LONGID, USER )
LSCMD = 'ls -lt /uvwork/spool | grep USER
SHCMD = 'sh -c ':QUOTE(LSCMD)
EXECUTE SHCMD CAPTURING STUFF
LONGID = TRIM( STUFF 1,1 )
LONGID = FIELD( LONGID , ' ' , DCOUNT( LONGID ,' ' ) )
RETURN
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of John Hester
Sent: Thursday, March 04, 2004 2:10 PM
To: U2 Users Discussion List
Subject: [UV] Re: SPOOLER NUMBER
Alan Yockey wrote:
I am also interested in ways to manipulate spool files in Universe? The
spool number would be a big help so I could use usm commands to redirect
output externally to the report program which produced the spool file.
Universe 9.3 on DGUX
Is there a function with universe / basic to tell me the id of the last
print job generated from my current uv login?
Universe 10.0.13
RedHat Linux 8.0
Alan Jayne Yockey
[EMAIL PROTECTED]
I don't know of a UV function that does this, but you can use find at
the unix level to get a list of spooler numbers for a particular user.
This will put all spooler file names for a user into an array:
EXECUTE 'SH -c find /usr/spool/uv -user ':@LOGNAME:'', OUT SPOOL.ARR
Assuming the above path is where the UV spooler files reside on your
system, the following will give you the UV spooler number from the file
name:
SPOOL.NO = FIELD(SPOOL.ARRATTR.NO,'/',5)[3,5]
Finding the most recent one could be kind of a pain if you have frequent
deletion of spooler files. Otherwise you could just assume the highest
numbered one is the most recent. Capturing output from ls -l on each
filename will give you the time/date last modified.
-John
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users
Notice of Confidentiality: The information included and/or attached in this
electronic mail transmission may contain confidential or privileged
information and is intended for the addressee. Any unauthorized disclosure,
reproduction, distribution or the taking of action in reliance on the
contents of the information is prohibited. If you believe that you have
received the message in error, please notify the sender by reply
transmission and delete the message without copying or disclosing it.
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users
Notice of Confidentiality: The information included and/or attached in this
electronic mail transmission may contain confidential or privileged
information and is intended for the addressee. Any unauthorized disclosure,
reproduction, distribution or the taking of action in reliance on the
contents of the information is prohibited. If you believe that you have
received the message in error, please notify the sender by reply
transmission and delete the message without copying or disclosing it.
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users