Greg,
Using the following command file you can change your job to:
!JOB TEST,USER.ACCT
!FILE X=X1;DEV=LP,1
!RUN X.PROG
!FILE X=X2;DEV=LP,1
!RUN X2.PROG
!SPFNUM X2
!RUN MYPROGRAM;INFO="!SPFNUM0001"
!FILE X=X3;DEV=LP,1
!RUN X3.PROG
!EOJ
!SPFNUM X2
regards,
*****************************
Robert W.Mills, Systems Development Manager, Windsong Services
Electron House, Cray Avenue, St. Mary Cray, Kent BR5 3PN, ENGLAND
Tel: +44 (0)1689.870622 x 3005 Fax: +44 (0)1689 899026
[log in to unmask]
********************************
The thoughts, comments, and opinions expressed herein are mine.
They do not reflect those of my employer, nor anyone else.
********************************
***Confidentiality Notice: This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential and privileged information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply e-mail and destroy all copies
of the original message.
#--- start cut ---
parm fdes='@', jobnum=!hpjobtype!hpjobnum
if lft('!fdes',1) = '?' then
setvar s chr(14)
setvar b chr(14)+':'+chr(15)
echo
![s+'R;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;']
echo ![b+' SPFNUM - Get spoolfile number(s) and load into a variable
array.']
echo
![s+'5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;']
echo ![b+'']
echo ![b+' Syntax:']
echo ![b+' SPFNUM [fdes][, jobnum]']
echo ![b+'']
echo ![b+' Parameters:']
echo ![b+' fdes File designator (default: @)']
echo ![b+' jobnum (Default: current job/session)']
echo ![b+'']
echo ![b+' Restrictions:']
echo ![b+' None.']
echo ![b+'']
echo
![s+'F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;']
#
# Author: Robert W.Mills
#
# Modification History can be found at the end of this file.
#
deletevar s, b
return
endif
deletevar SPFNUM@ > $null
reset spfnumwk > $null
purge spfnumwk > $null
purge spfnumwk,temp > $null
build spfnumwk;rec=80,,f,ascii;msg;temp
listspf @;seleq=[jobnum=!jobnum and filedes=!fdes] > spfnumwk
setvar spfnum_count 1
while finfo('spfnumwk','eof') > 0 do
setvar spfnum_number rht('0000'+'!spfnum_count',4)
input spfnum_record < spfnumwk
if str(spfnum_record,2,1) = 'O' &
and str(spfnum_record,1,5) <> 'TOTAL' then
setvar SPFNUM!spfnum_number &
rtrim(str(spfnum_record,2,8),' ') + '.out.hpspool'
echo SPFNUM!spfnum_count = ![SPFNUM!spfnum_number]
setvar spfnum_count spfnum_count + 1
endif
endwhile
deletevar spfnum_@
return
#-- DO NOT ENTER EXECUTABLE CODE AFTER ABOVE 'RETURN' STATEMENT.
Modification History:
Versn | Date | Who | Reason for Change
------+------------+-----+------------------------------------------
01.00 | 04/10/2001 | RWM | Initial version.
| | | Based of SPFNUM by Karsten Holland.
#===================================================================
# End of command file.
#===================================================================
#--- end cut ---
-----Original Message-----
From: Greg Terterian [mailto:[log in to unmask]]
Sent: 27 October 2001 01:42
To: [log in to unmask]
Subject: Re: Latest spoolfile id number
What is the best way to find the spoolfile ID for the following example:
!JOB TEST,USER.ACCT
!FILE X=X1;DEV=LP,1
!RUN X.PROG
!FILE X=X2;DEV=LP,1
!RUN X2.PROG
( AT THIS STAGE I NEED TO FIND THE SPOOLID NUMBER FOR X2)
!RUN MYPROGRAM;INFO="spoolid for spoolfile generated from X2"
!FILE X=X3;DEV=LP,1
!RUN X3.PROG
!EOJ
THANKS IN ADVANCE
GREG
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|