checking HP Variables
Pickering, John (NORBORD)
PICKERIJ@norbord.com
Wed, 7 Nov 2001 17:28:38 -0500
Scott
The short answer is "nope".
Don't confuse what looks like a system variable (e.g. HPMPE, HPMPEXL) with
"real system variables". The conditional compile variables HPMPE and HPMPEXL
are predefined by Cognos and hard coded somewhere deep inside PH.
But you could use GETSYSTEMVAL("HPSTREAMEDBY") within Quiz to get the value
of the "real system variable". Something like:
DEFINE HEADERSTR CHAR*30 = <blah.blah> &
IF "TRANS" = GETSYSTEMVAL("HPSTREAMEDBY")[1:5]
The Quizlist file equate will be harder (but definitely doable) but will
depend largely on where the device class or number comes from. Hard coding
them in a bunch of jobs seems like a recipe for "fun with maintenance". If
you need suggestions then maybe you should explain where the printer device
class/number comes from and we'll suggest a method to generate an
appropriate file equate for Quizlist.
Regards,
JWP
> -----Original Message-----
> From: Scott Gates [SMTP:SGates@olbh.com]
> Sent: Wednesday, November 07, 2001 4:49 PM
> To: 'Powerh-L (E-mail)
> Subject: checking HP Variables
>
> I have some QUIZ code that checks to see if it's running on an HP or not.
>
> @IF HPMPE OR HPMPEXL
> USE MARS152U NOLIST
> @ELSE
> USE ALT$DATA:MARS152U.DAT NOLIST
> @ENDIF
>
> I was wondering. I need to check HPSTREAMEDBY[1:5] = "TRANS"
> If it is TRUE, direct a 2nd copy of the quiz report with a different
> heading
> to another printer.
>
> Would code similar to the above do it?
> Say something like:
> @IF HPSTREAMEDBY = "TRANS"
> DEFINE HEADERSTR CHAR* 30 = <blah.blah>
> :FILE QUIZLIST;DEV=<blah>
> @ENDIF
>
> Is this DOABLE within QUIZ?
>
> The job is generated on the fly by the application and I can't change the
> JCL. I can only change the code it calls to generate the QUIZ report.
> There are several other changes also needed but, I'm trying to investigate
> this before I can even make judgment on whether or not it's even worth
> trying.
>
>
>
> Scott Gates
> Programmer/Analyst
> Information Services
> Our Lady of Bellefonte Hospital
> P.O. Box 789
> Ashland, Kentucky 41105-0789
>