Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [CLOSED] UnBalanced Paraentheses (FOC262) while CASTING as DATE
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] UnBalanced Paraentheses (FOC262) while CASTING as DATE
 Login/Join
 
Member
posted
for the following code I got the error (FOC262) UNBALANCED PARENTHESES and these two lines utilizing in Focus Procedure

-SET &&HISTORICAL_MTH_END_DT= AYMD(&Contant_Value, -1, 'I8YYMD');

-SET &&HISTORICAL_MTH_END_DT_C = CAST(EDIT('&&HISTORICAL_MTH_END_DT','9999/99/99') AS DATE);

Any Clue ? for the missing parantheses

here is the Full Code for Focus Procedure

-SET &ECHO=ALL;

-SET &Contant_Value = '20150101';
-SET &&HISTORICAL_MTH_END_DT= AYMD(&Contant_Value, -1, 'I8YYMD');
-SET &&HISTORICAL_MTH_END_DT_C = CAST(EDIT('&&HISTORICAL_MTH_END_DT','9999/99/99') As DATE );
-TYPE &&HISTORICAL_MTH_END_DT
-RUN

This message has been edited. Last edited by: <Kathryn Henning>,


iWay
 
Posts: 3 | Registered: June 02, 2014Reply With QuoteReport This Post
Virtuoso
posted Hide Post
I'm not sure you can use DB expressions in Dialogue Manager. I would be inclined to use them in a DEFINE associated with a relational table. In any case, you might try using the DB_EXPR function:

DB_EXPR(CAST(EDIT('&&HISTORICAL_MTH_END_DT','9999/99/99') AS DATE));


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Reply With QuoteReport This Post
Member
posted Hide Post
The suggested proposal would not work


iWay
 
Posts: 3 | Registered: June 02, 2014Reply With QuoteReport This Post
Platinum Member
posted Hide Post
You are probably going to have to do it in 3 lines.

Also you probably need to have the final line in quotes otherwise Dialoge Manager will treat CAST and DATE as DM functions.

Try

-SET &&HISTORICAL_MTH_END_DT= AYMD(&Contant_Value, -1, 'I8YYMD');
-SET &&HISTORICAL_MTH_END_DT_A = EDIT('&&HISTORICAL_MTH_END_DT','9999/99/99');
-SET &&HISTORICAL_MTH_END_DT_C = 'CAST( &&HISTORICAL_MTH_END_DT_A AS DATE)';

You may need to change the thirdline to be

-SET &&HISTORICAL_MTH_END_DT_C = 'CAST( &&HISTORICAL_MTH_END_DT_A.EVAL AS DATE)';

OR

-SET &&HISTORICAL_MTH_END_DT_C = 'CAST( &&HISTORICAL_MTH_END_DT_A.QUOTEDSTRING AS DATE)';

depending on your SQL variant.

Cheers

Stu


WebFOCUS 8.0.09
 
Posts: 234 | Location: Melbourne, Australia | Registered: February 07, 2007Reply With QuoteReport This Post
Master
posted Hide Post
What do these resolve to when they're expanded at runtime? Are there ever parens or quotes in the amper-variables that could gum up the works?



 
Posts: 916 | Location: At the Mast | Registered: May 17, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [CLOSED] UnBalanced Paraentheses (FOC262) while CASTING as DATE

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.