Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


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

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[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, 2014Report 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, 2007Report This Post
Member
posted Hide Post
The suggested proposal would not work


iWay
 
Posts: 3 | Registered: June 02, 2014Report This Post
Guru
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.2.03 (8.2.06 in testing)
 
Posts: 253 | Location: Melbourne, Australia | Registered: February 07, 2007Report This Post
Virtuoso
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: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

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-2020 Information Builders