Re: [U2] Obtain the last spool number Universe generated

2011-10-31 Thread George Gallen
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: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jean Pierre Boishardy
Sent: Monday, October 31, 2011 8:18 AM
To: u2-users@listserver.u2ug.org
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
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Obtain the last spool number Universe generated

2011-10-31 Thread George Gallen
This subroutine must be run by that user# in order to function correctly.

And it returns the HOLD filename, not the spooler number - sorry.

George

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Monday, October 31, 2011 10:17 AM
To: U2 Users List
Subject: Re: [U2] Obtain the last spool number Universe generated

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.
*
*
*
*
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users