Focal Point
[CLOSED] Null values passed for parameter

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6117071196

March 11, 2019, 12:21 PM
Siva1925
[CLOSED] Null values passed for parameter
I have a procedure
 
-SET &ECHO = ALL;
-DEFAULT &client_i  = 'US';
-SET &PRE = IF &client_i EQ 'EU' THEN 'FR_' ELSE 's' ;
 

This works fine.
Output
-DEFAULT &client_i = 'US';
 -SET &PRE = IF US EQ 'EU' THEN 'FR_' ELSE 's' ;  


When i change the parameter name from &client_i to &client_id blank values are passed for the parameter.
 -SET &ECHO = ALL;
-DEFAULT &client_id  = 'US';
-SET &PRE = IF &client_id EQ 'EU' THEN 'FR_' ELSE 's' ; 


Output
-DEFAULT &client_id = 'US';
 -SET &PRE = IF   EQ 'EU' THEN 'FR_' ELSE 's' ;  


Is this expected.If so why is this happening.

Same happens with &host_env and &host_environment
Thank you
WF 8204

This message has been edited. Last edited by: FP Mod Chuck,
March 11, 2019, 12:45 PM
Addy
Hi Siva,
When I run your code I get the following o/p
 
-DEFAULT &client_id  = 'US';
 -SET &PRE = IF US EQ 'EU' THEN 'FR_' ELSE 's' ;
 -TYPE s
 s
 


My guess is that &client_id is a custom defined variable.

Try running
-? &
to see all the variables defined in custom settings as your values if getting overwritten.

You can also try using -SET instead of DEFAULT to verify.


WF 8.2.04
Windows/Unix
All Formats
In Focus since 2006
March 11, 2019, 01:20 PM
Siva1925
Hi Addy,
Yes It is a custom defined variable.
Thank you.

what does this mean? - &host_environ>=
March 11, 2019, 02:17 PM
Waz
Hi Siva1925,

Please add [SOLVED] or [CLOSED] to the title of this thread as it looks like it is solved.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

March 12, 2019, 07:57 AM
Addy
quote:
Originally posted by Siva1925:

what does this mean? - &host_environ>=


My guess is that it will show you which environment you are working in.. Eg. Dev, UAT Prod etc..


WF 8.2.04
Windows/Unix
All Formats
In Focus since 2006
March 12, 2019, 11:06 AM
Michael L Meagher
I ran this code in 8.2.03:
-SET &ECHO = ALL;
-DEFAULTH &client_id = 'US';
-SET &PRE = IF &client_id EQ 'EU' THEN 'FR_' ELSE 's' ;
-TYPE &|PRE is: &PRE

And got this:
-DEFAULTH &client_id = 'US';
-SET &PRE = IF US EQ 'EU' THEN 'FR_' ELSE 's' ;
-TYPE &PRE is: s
&PRE is: s

It's the same output I got when I initially used &client_i. Is there a setting that's limiting your & parameters to 8 characters?


WebFOCUS 8.2.03 - Production
WebFOCUS 8.2.04 - Sand Box
Windows 2012 R2 Server
HTML, PDF, Excel
In FOCUS since 1980
March 12, 2019, 02:19 PM
MartinY
I don't think that there is a length limitation, but
Coming from the old ages of Mainframe FOCUS I think that if you have two variables with first 8 char the same, FOCUS assume that it's the same var.

This is just an assumption and something that sounds me familiar with an old version, don't take it as the holy words.


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007