Were you looking for the last job# for That user# or the last job# by any user?
If for that user# we use the following:
SUBROUTINE RETURN.SETPTR(JOBNAME,PON)
*
* RETURN-SETPTR - THIS SUBROUTINE WILL RETURN IN "JOBNAME" THE CURRENT
* SPOOL WILL GO TO.
*
*********************************************************************
*
*
EXECUTE "SETPTR ":PON CAPTURING JUNK
SEARCH=@FM:"Output to HOLD file"
XX=INDEX(JUNK,SEARCH,1)
IF XX=0 THEN
JOBNAME=""
RETURN
END
JUNK=JUNK[XX+1,LEN(JUNK)]
YY=INDEX(JUNK,":",1)
YZ=INDEX(JUNK,CHAR(254),1)
JOBNAME=JUNK[YY+2,YZ-YY-2]
RETURN
*
END
George
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Jean Pierre Boishardy
Sent: Monday, October 31, 2011 8:18 AM
To: [email protected]
Subject: [U2] Obtain the last spool number Universe generated
we are in universe version 10.1.22 /AIX 5.3
To obtain the last job number created by a user , we use the following shell
script :
sh -c \`cat /.uvhome`/bin/analyze.shm -p|grep sp_job_id| awk '{if (NF==NR) print
$0}'|awk 'BEGIN {OFS=":"}{print $2}'\
But when the server is overloaded the job number delivered by the script seems
not the right one.
1 -is what has already been observed?
2 -is this the only way?
Thanks,
Jean Pierre Boishardy
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users