[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: What happened to my Reserved Variables?
- Subject: Re: What happened to my Reserved Variables?
- From: "Ivory, Wayne" <wayne.ivory@ILUKA.COM>
- Date: Thu, 14 Oct 1999 08:27:01 +0800
You're right John! I actually started to write a reply saying "No, you
don't understand, it's *reservered* variables I'm talking about" but then I
thought I better try what you suggested and it worked! This seems rather
bizarre behaviour to me - SQR is the first language I've ever come across
(and I've come across a few in my time) where reserved variables have to be
referenced differently according to the scope.
Still, chalk up another victory to sqrug.
Thanks
Wayne Ivory
Information Services
Iluka Resources Limited
-----Original Message-----
From: John Milardovic [mailto:milardj@SX.COM]
Sent: Wednesday, 13 October 1999 20:55
To: Multiple recipients of list SQR-USERS
Subject: Re: What happened to my Reserved Variables?
Hi Wayne.
It sounds like you might have made a previously global procedure
into a local one. If so use the underscore character to reference the
global variable. ie. $_USERNAME
HTH
John Milardovic
> -----Original Message-----
> From: Ivory, Wayne [SMTP:wayne.ivory@ILUKA.COM]
> Sent: Tuesday, October 12, 1999 10:58 PM
> To: Multiple recipients of list SQR-USERS
> Subject: What happened to my Reserved Variables?
>
> SQR 3
> Informix 7.2(?)
> SCO Open Server
>
> We have an SQR that does a 'call system' to a Unix shell script and passes
> a
> couple of SQR Reserved Variables to the script. Recently this SQR has had
> some major work done on it, and now the reserved variables appear to be
> blank. I'm not aware of anything that a programmer could do that would
> affect this. Following is the code:
>
> let $Run_String = getenv('PS_HOME') ||
> '/../wsl_scripts/xferjnl
> ' || $USERNAME || ' ' || $OutputDest || ' 2>' || $SQR-REPORT || '.err'
> show $Run_String
> call system using $Run_String #Unix_Status
>
> The 'show' produces the following:
>
> /u/peoplesoft/hrtest/../wsl_scripts/xferjnl /tmp/GLIF9IM.1100
> 2>.err
>
> Note that nothing is output where $USERNAME and $SQR-REPORT should be.
> Yet
> I wrote a 3-liner that says:
>
> begin-report
> show $USERNAME
> end-report
>
> which outputs 'HRTEST'. What could be blanking these variables?
>
> Wayne Ivory
> Information Services
> Iluka Resources Limited