Focal Point
continue continuation in next line for dialogue manager
December 07, 2011, 04:31 PM
Kameshcontinue continuation in next line for dialogue manager
Hi,
I have an IF condition with multiple values and would like to know the way to continue the values in next line.
Ex:
-IF &PROJECT_ID.( ALL,ENG MISC PRODUCTS,ENG COUNTERWARMER,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS).PROJECT_ID. EQ ALL THEN GOTO TEST;
The values with in the phrase will show in dropdown on the parameter screen.
Thanks
WFConsultant
WF 8105M on Win7/Tomcat
December 07, 2011, 04:40 PM
Dan SatchellEvery DM line must begin with a dash (-) (and a space if the first word is not a DM command or label).
-IF &PROJECT_ID.( ALL,ENG MISC PRODUCTS,ENG COUNTERWARMER,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,
- ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,
- ENG MISC PRODUCTS,ENG MISC PRODUCTS).PROJECT_ID. EQ ALL THEN GOTO TEST;
WebFOCUS 7.7.05
December 07, 2011, 04:43 PM
fatboyjimTry start the subsequent lines with dash '-'
Jimmy
DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
December 08, 2011, 08:54 AM
KameshAlready I tried that but not working.
The Autoprompt screen just shows the values on the first line.
WFConsultant
WF 8105M on Win7/Tomcat
December 08, 2011, 09:26 AM
Tom Flynn
-IF &PROJECT_ID.( ALL,ENG MISC PRODUCTS,ENG COUNTERWARMER,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,
-,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,
-,ENG MISC PRODUCTS,ENG MISC PRODUCTS).PROJECT_ID. EQ ALL THEN GOTO TEST;
Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
December 08, 2011, 10:03 AM
KameshTried it, but still not working. Just shows only the first line of data.
WFConsultant
WF 8105M on Win7/Tomcat
December 08, 2011, 10:43 AM
Tom FlynnRemove the comma after the dash. If that doesn't work, put it all on 1 line...
-IF &PROJECT_ID.( ALL,ENG MISC PRODUCTS,ENG COUNTERWARMER,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,
- ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,ENG MISC PRODUCTS,
- ENG MISC PRODUCTS,ENG MISC PRODUCTS).PROJECT_ID. EQ ALL THEN GOTO TEST;
Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
December 08, 2011, 03:20 PM
KameshAlready I am pulling it all in one line and it works. I am trying to find a solution to put the value in the next line.
WFConsultant
WF 8105M on Win7/Tomcat
December 08, 2011, 03:42 PM
Tom FlynnWell, if you are going to hard-code, put them in FOC DB, including ALL, and do a FIND:
For single selection:
WHERE &PROJECT_ID.(FIND PROJECT_ID IN YOUR_DB).Project ID. EQ 'ALL' GOTO TEST ELSE GOTO WHEREVER;
For multiple selection:
WHERE &PROJECT_ID.(OR(FIND PROJECT_ID IN YOUR_DB).Project ID. EQ 'ALL' GOTO TEST ELSE GOTO WHEREVER;
Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
December 09, 2011, 02:31 AM
DaveTom,
You've missed a ) there...
_____________________
WF: 8.0.0.9 > going 8.2.0.5
December 09, 2011, 03:35 AM
GamPAutoprompt is a fairly simple thing. It checks line by line for the presence of & variables. And if it finds it on a line, only that line will be parsed for use in autoprompt, not any subsequent line.
You need to consider that Autoprompt is not running nor parsing your program, it is just scanning for parameters, that's all.
GamP
- Using AS 8.2.01 on Windows 10 - IE11. |
| in Focus since 1988 |
December 09, 2011, 04:10 AM
Wep5622That's a bug in Autoprompt then. Did you open a case with IBI yet?
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
December 09, 2011, 09:15 AM
KameshNot yet, may be I will.
Thanks all for your help.
WFConsultant
WF 8105M on Win7/Tomcat
December 09, 2011, 09:47 AM
Tom FlynnIt is not a bug. The auto-prompter "requires" selections on 1 line, period.
Also, your example has the same values multiple times, so, it will only display the value 1 time....
I added numerics to separate each value, put everything on 1 line, and, it works just fine, as expected...
-SET &ECHO=ALL;
-DEFAULTS &PROJECT_ID = ''
-IF &PROJECT_ID.(ALL,ENG MISC PRODUCTS,COUNTERWARMER,ENG MISC PRODUCTS0,ENG MISC PRODUCTS1,ENG MISC PRODUCTS2,ENG MISC PRODUCTS3,ENG MISC PRODUCTS4,ENG MISC PRODUCTS5,ENG MISC PRODUCTS6,ENG MISC PRODUCTS7).Select a Project ID. EQ 'ALL' GOTO TEST;
-GOTO NOT_TEST
-TEST
-TYPE &PROJECT_ID
-GOTO EOJ
-NOT_TEST
-TYPE &PROJECT_ID
-EOJ
-EXIT
Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
December 09, 2011, 10:40 AM
Wep5622quote:
It is not a bug. The auto-prompter "requires" selections on 1 line, period.
In this case, both DM and the auto-prompter parse the same lines of code. Even if they use different parts of that code, they should at least interpret the line continuations of the same lines of code in the same way! This is definitely a bug.
I'm getting really tired of folks here and at IBI continuously claiming that if some incorrect behaviour is
documented, it is not a bug! No no no! You
documented a bug, but
it's still a bug! Don't be ridiculous!
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
December 12, 2011, 01:42 AM
DaveI agree with Wep5622.
We used this sentence to ridicule Microsoft for years:
"Document a bug and turn it into a feature".
Whatever the documentation. We all know IBI parses the code twice, and they have their reasons for it.
But it could be the same parser that does that. Or if you really want to have two different parsers, at least make them work in the same way.
It's not a bug, it's not a feature. It's just one of those things that happen. Most likely because the parsers where made by different teams?
it's an RFC.
"Make both parsers parse the same".
_____________________
WF: 8.0.0.9 > going 8.2.0.5
December 12, 2011, 06:31 AM
GamPThe one big difference between the two situations is that DM parses and executes, while autoprompt can't do that. It is only allowed to scan, not parse and execute. Autoprompt will not resolve anything, will not run nor interpret code and has no knowledge of continuation stuff and such. And it is not limited to DM statements, it will also find variables within Focus code.
And if something is built according to specifications, than it can't be a bug, it can at most be an enhancement.
GamP
- Using AS 8.2.01 on Windows 10 - IE11. |
| in Focus since 1988 |
December 12, 2011, 07:32 AM
Wep5622quote:
And if something is built according to specifications, than it can't be a bug, it can at most be an enhancement.
That's an interesting way to say that the problem is with the specification(s). I don't think you meant that sarcastically though, or did you?
Obviously there is a problem (whether you refuse to call it a bug or not), as the OP wrote some perfectly valid DM code that consecutively didn't get picked up by Autoprompt, because it was designed to a different specification of how to handle such lines. If that's the case, then we're looking at a design flaw.
...maybe it's not a bug, but a spider that encountered a malicious child?
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
December 12, 2011, 08:35 AM
Davequote:
has no knowledge of continuation stuff
Obviously...
...the real question is here : Why it has no knowledge.
_____________________
WF: 8.0.0.9 > going 8.2.0.5
December 13, 2011, 06:57 AM
GamPDoes TABLE know how to deal with MODIFY code? No, you'll get an error.
Does DM know how to process maintain code? No, it just puts it on the stack.
Autoprompt just does what it is designed for. Regardless of syntax, table, modify, maintain or dm code, it just scans the file for a very small set of things - the &variables.
And if you want to call that a bug, fine go ahead and do so.
Why not open a case with IB and see what they've got to say about the issue.
GamP
- Using AS 8.2.01 on Windows 10 - IE11. |
| in Focus since 1988 |
December 21, 2011, 12:29 PM
KerryThanks for everyone's input on this one.
Wep5622, I checked a group of Wizards and here is the suggestion: Most of the Dialogue Manager commands were not created with "continuation" capability. Basically, at the time, there was continuation only for those commands which were thought to need multiple lines, such as -SET and -IF ... which continue until the semicolon, and -READ/-WRITE . These, of course, were also based on the maximum size of a FOCEXEC line. , So, no continuation on -PROMPT, -GOTO, etc. Then, with the advent of a 64K possible line in Dialogue Manager, there was no suggestion to us from customers, that this needed to be changed. However, if you do determine that you need to have a continuation for -PROMPT (or the code that would be considered part of a -PROMPT, ie &VAR.(POSSIBLE VALUES).Message., then please open a case as a New Feature Request with
InfoResponse ONLINE, and Customer Support will forward it to the appropriate product managers for evaluation.
Cheers,
Kerry
Kerry Zhan
Focal Point Moderator
Information Builders, Inc.