A general-purpose way to 'modify' a job at run-time is to xeq a command-file
instead, and have the command file use :echo to build the job. Then
anything your session knows can be fed into the job. The job itself is a
temp file, so no limitation on lots of people running it.
Example:
parm PF_INVC=""
parm PRINTER = ""
option NOLIST
# PF_INVC is INFO is required 6-digit invc# to report on.
# PRINTER is 2nd parm, optional laser printer use instead of
# the default
# (most sessions know the user's normal printer in a
# variable named '_USER_PRINTER')
# Example XEQ SIC0300.SYSCMD 123456
setvar R_PF_INVC '!PF_INVC'
if (len('!R_PF_INVC') <> 6) or (not numeric('!R_PF_INVC'))
echo Must enter a 6-digit Proforma-Invoice# to report
return
endif
if "!PRINTER" <> ""
setvar R_LJ '!PRINTER'
elseif bound(_USER_PRINTER) and _USER_PRINTER <> " "
setvar R_LJ '!_USER_PRINTER'
else
setvar R_LJ 'TOLP'
endif
echo Proforma-Invoice# = !R_PF_INVC; Printer = !R_LJ
PURGE TJ, TEMP > $NULL
FILE TJ; REC=-72,,F,ASCII
echo !!JOB SIC0300S,REPORT/<pass>.<acct>;OUTCLASS=LP,1;PRI=ES >>*TJ
echo !# This job assembled by SIC0300S.SYSCMD >>*TJ
echo !!FILE RIC0300=PFINVC;DEV=!R_LJ;ENV=LAND0810.ENV.SHR >>*TJ
echo !!RUN SIC0300S.PROG.MERRY; INFO= & >>*TJ
echo : '!PF_INVC' >>*TJ
echo !!EOJ >>*TJ
STREAM TJ
PURGE TJ, TEMP > $NULL
----- Original Message -----
From: "Lars Appel" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Tuesday, April 23, 2002 3:28 PM
Subject: Re: [HP3000-L] Changing JOB from Access
> Maybe the job could evaluate the HPSTREAMEDBY variable to find out
> some detail (like job/session name) about the (Access driven) session
> and select on of various FILE equations e.g. by using an XEQ file or
> grep-ing a line based on the "criterion"? (just a weird idea ;-)
>
> * 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 *
|