works perfectly for me. Using .EVAL still prompts.
-SET &SEL_A0 = 4; -SET &SEL_A1 = 10; -SET &SEL_A2 = 11; -SET &SEL_A3 = 97; -SET &SEL_A4 = 99; -SET &TOKENVAL = ''; -REPEAT END_REP FOR COUNTER FROM 1 TO 4 -SET &TOKENVAL = || '#' || 10; -REPEAT END_REP FOR COUNTER FROM 1 TO 4 -SET &TOKENVAL = #10 || '#' || 11; -REPEAT END_REP FOR COUNTER FROM 1 TO 4 -SET &TOKENVAL = #10#11 || '#' || 97; -REPEAT END_REP FOR COUNTER FROM 1 TO 4 -SET &TOKENVAL = #10#11#97 || '#' || 99; -REPEAT END_REP FOR COUNTER FROM 1 TO 4 -END_REP -TYPE #10#11#97#99 #10#11#97#99
If the index variable doesn't work, i.e.
-SET &ECHO=ALL;
-SET &SEL_A0 = 4;
-*SET &SEL_A1 = 10;
-SET &SEL_A2 = 11;
-SET &SEL_A3 = 97;
-SET &SEL_A4 = 99;
-SET &TOKENVAL = '';
-REPEAT END_REP FOR &COUNTER FROM 1 TO &SEL_A0
-SET &TOKENVAL = &TOKENVAL || '#' || &SEL_A.&COUNTER;
-END_REP
-TYPE &TOKENVAL
results in:
-SET &SEL_A0 = 4;
-*SET &SEL_A1 = 10;
-SET &SEL_A2 = 11;
-SET &SEL_A3 = 97;
-SET &SEL_A4 = 99;
-SET &TOKENVAL = '';
-REPEAT END_REP FOR COUNTER FROM 1 TO 4
0 ERROR AT OR NEAR LINE 10 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC295) A VALUE IS MISSING FOR: &SEL_A1
This is because parameter prompting is a pre-parser and does not see &SEL_A1. This is not seen until the process actually runs. For neither does parameter prompting come in to play.
(pressed POST too early…)This message has been edited. Last edited by: Alan B,
After the EVALuation, you are left (on the first round) with:
-SET &TOKENVAL = &TOKENVAL || '#' || &SEL_A.1;
Since "1" is not a reference to a variable, the syntax for indexing is not satisfied, and the "." just indicates catenation, to be performed after &SEL_A is evaluated.
Since &SEL_A is undefined, you get prompted.
- Jack Gross WF through 8.1.05
January 31, 2011, 08:58 AM
Ramkumar - Webfous
Hi All,
Thanks for the Reply.
As said, .EVAL played it... It worked.
But Still,
Alan,
It is bit more Interesting that, In 7.6.9 It worked perfect, and in 7.1.4 This is is making a user prompt. Still... Donno Y.. ?
Thanks,
Ramkumar. WebFOCUS/Tableau Webfocus 8 / 7.7.02 Unix, Windows HTML/PDF/EXCEL/AHTML/XML/HTML5
February 01, 2011, 04:47 AM
OPALTOSH
If you had used a -RUN after your -SETs your original would have worked fine (apart from the missing '.') because it would have forced the evaluation of the SETs before starting the REPEAT loop. Much simpler than .EVAL
-RUN adds nothing for variables that are already set by -SET.
I suggest you play by the book.
Indexing, using the construct "&base.&index", is documented.
But "&base&index.EVAL", or even "&base.&index.EVAL", is not documented as a means to reference "indexed" variables, and its semantic interpretation may vary with the release.
February 01, 2011, 09:11 AM
Ramkumar - Webfous
hi Opaltosh/J.Gross,
It works fine in 769 with and without RUN.
But in 7.1.4 still doing a user prompt.
Thanks,
Ramkumar. WebFOCUS/Tableau Webfocus 8 / 7.7.02 Unix, Windows HTML/PDF/EXCEL/AHTML/XML/HTML5
February 01, 2011, 10:05 AM
GamP
I take it it is still asking for the &SEL_A variable? If so, since you're not really using that variable, try to do a -SET &SEL_A = ''; in the very top of your fex. That way the var is known and no prompting will take place. And then hope the rest of the fex still works ...