HP3000-L Archives

March 2000, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Emerson, Tom # El Monte" <[log in to unmask]>
Reply To:
Emerson, Tom # El Monte
Date:
Wed, 22 Mar 2000 20:15:20 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (50 lines)
It is important to remember that "variable substitution" means exactly what
it says -- the CONTENTS of the variable are SUBSTITUTED in the command line
"as if typed there originally".  In fact, the error message is showing
exactly this sort of behaviour:

> -----Original Message-----

your job has:

>     :SETVAR VAR LFT(!HPSTREAMEDBY,1,6)

the execution of the job shows that !HPSTREAMEDBY is being REPLACED by the
literal text of the value of the variable, THEN the command is scanned for
"correctness":

>     SETVAR VAR LFT(JAY.PDEV (#S98),1,6)
>     More parameters specified than allowed for this function. (CIERR

You need to do one of two things [really one of one, I believe...]

   a) place the "referenced" variable "in quotes" like this:

>     :SETVAR VAR LFT("!HPSTREAMEDBY",1,6)

Since the quote characters are OUTSIDE of the "reference" to the variable,
they will remain in the command image AFTER the variable substitution, thus
making the executable look like you are getting the first 6 characters of a
hard-coded string

   b) remove the !

>     :SETVAR VAR LFT(HPSTREAMEDBY,1,6)

Note: I'm not ENTIRELY sure MPE does this [but I know MPEX does]  Basically,
in the CONTEXT of a "setvar" command, the first "argument" is a variable to
take the result of an expression, and the remaining "argument(s)" is(are)
the expression itself.  In the "context" of an expression, VARIABLES are
indeed "variables", so the command interpreter RECOGNIZES "HPSTREAMEDBY" as
a reference to a system-defined variable and can make the substitution at
execution time rather than when the command is being "parsed".

   b') add an additional [] (and move/remove the !):

>     :SETVAR VAR ![LFT(HPSTREAMEDBY,1,6)]

the "![<expression>]" syntax EXPLICITLY makes everything within the square
brackets an "expression", and as noted above, variables are then properly
evaluated during execution of the command rather than when the command is
being parsed.

ATOM RSS1 RSS2