-SET &FLAG = IF &BLAH EQ '1' THEN '-SET &|VAR = '' '';' ELSE ' ';
But what are you going to do with the &Variable ?
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
September 02, 2011, 01:43 PM
Tomsweb
quote:
THEN '-SET &|VAR = '' '';'
Waz, I changed my code a bit:
quote:
-DEFAULTH &NUM = '1';
-SET &FLAG = IF &NUM EQ '1' - THEN '-DEFAULTH &|ATTYR = ''1'';' - ELSE ' '; -* -TYPE &FLAG.EVAL
-EXIT
Here is the result:
quote:
-DEFAULTH &NUM = '1'; -SET &FLAG = IF 1 EQ '1' - THEN '-DEFAULTH &ATTYR = ''1'';' - ELSE ' '; -* 0 ERROR AT OR NEAR LINE 9 IN PROCEDURE ADHOCRQ FOCEXEC * (FOC295) A VALUE IS MISSING FOR: &ATTYR
The &ATTYR would only be set if the &NUM eq '1'. But when it is active in the focexec, I would not expect to get the (FOC295) error.