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.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] UNBALANCED PARENTHESES

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] UNBALANCED PARENTHESES
 Login/Join
 
Member
posted
I've been recently assigned to support our W/F users. By all means, I would classify myself as a novice. Training with IBI is months away due to limited opportunities for classroom opportunities in my area.

Any help would be greatly appreciated.

***********************************************

SET MSG=ON

-*
-* Calculate the dates to use when selecting the the range of Invoice Dates:

-* &DTE_PREV_MO = Today's date - 1 month
-* &DTE_LESS180 = Today's date - 1 month - 180 days
-* &DTE_ADD20 = Today's date - 1 month + 26 days
-*

-SET &DTE_PREV_MO=DATECVT((DATEADD((DATECVT(&YYMD,'I8YYMD','YYMD')),'M',-1)),

- 'YYMD', 'I8YYMD');

-SET &DTE_LESS180=DATECVT((DATEADD((DATECVT(&DTE_PREV_MO,'I8YYMD','YYMD')),

- 'D',-180)),'YYMD', 'I8YYMD');

-SET &DTE_ADD26=DATECVT((DATEADD((DATECVT(&DTE_PREV_MO,'I8YYMD','YYMD')),

- 'D',26)),'YYMD', 'I8YYMD');

-*-TYPE INVOICE DATE GE &DTE_LESS180

-*-TYPE INVOICE DATE LE &DTE_ADD26

-*-EXIT

-*

-* Define and sort on ACN_U from BANTAB so that the hold file can be

-* joined to the hold file from MCINV and MCPYM.

-*

-*

JOIN MCACNT.ACN_VND_U IN MCACNT TO ALL MCVND.VND_U IN MCVND AS J1

END

-*

TABLE FILE MCACNT

PRINT ACN_CO_I

ACN_CUS_NM_I

ACN_TCO_C

ACN_VND_U

VND_N

BY ACN_U

WHERE ACN_AC_I EQ 'T' OR 'L'

ON TABLE HOLD AS JULIA FORMAT FOCUS

END

-*

JOIN

MCINV.INV_ACN_U AND MCINV.INV_D IN MCINV TO ALL MCPYM.PYM_ACN_U AND

MCPYM.PYM_INV_D IN MCPYM AS J2

END

-*

TABLE FILE MCINV

PRINT

INV_CRN_CHG

INV_D

INV_SRV_TYP_C

PYM_O

PYM_DUE_D

PYM_STT_C

PYM_VOU_U

INV_LOAD_D

BY INV_ACN_U

WHERE PYM_STT_C EQ 'PM' OR 'PF' OR 'PU'

WHERE INV_CRN_CHG_O GT 0

-*WHERE PYM_VOU_U EQ 'N$*'

WHERE PYM_O NE 0

WHERE (INV_D GE &DTE_LESS180) AND (INV_D LE &DTE_ADD26)

ON TABLE HOLD AS PUMPKIN FORMAT FOCUS INDEX INV_ACN_U

END

-*

JOIN CLEAR *

JOIN ACN_U IN JULIA TO ALL INV_ACN_U IN PUMPKIN AS JP1

-*

-* Define DTE_DUE as one month from INV_D.

-* Define DIFF as the difference between today's date and the due date.

-*

DEFINE FILE JULIA

DTE_DUE/YYMD = DATEADD(INV_D,'M',1);

DTE_NOW/YYMD = '&YYMD';

DIFF/I9 = DATEDIF(DTE_NOW, DTE_DUE, 'D');

AMT_INV_CHG/D12.2M = INV_CRN_CHG_O;

AMT_PAY/D12.2M = PYM_O;

END

-*

TABLE FILE JULIA

HEADING CENTER
"AIT ONTIME REPORT"
"WITHIN 4 DAYS OF DUE DATE"
"AS OF &DATEMDYY
PRINT

AMT_INV AS 'TOTAL DUE'
AMT_PAY AS 'PAYMT AMT'
PYM_STT_C AS 'STATE'
INV_D/MDYY AS 'INV DT'
DTE_DUE/MDYY AS 'DUE DT'
PYM_DUE_D/MDYY AS 'PYMT DUE DT'
INV_LOAD_D AS 'INV LOAD DT'

BY ACN_TCO_C AS 'TELCO CODE'
BY VND_N AS 'VENDOR'
BY INV_SRV_TYP_C AS 'SVC TYP'
BY ACN_CUS_NM_I AS 'ACNA'
BY LOWEST DIFF AS 'DAY UNTIL DUE DATE'
BY ACN_CO_I AS 'CO IND'
BY ACN_U AS 'BAN'
BY PYM_VOU_U AS 'VOUCHER NO.'

WHERE DIFF LE 4
ON TABLE COLUMN-TOTAL

ON TABLE SET STYLE *

TYPE=REPORT,SIZE=8,ORIENTATION=LANDSCAPE,GRID=OFF,$

TYPE=HEADING,FONT=TIMES,SIZE=9,$

TYPE=TITLE,SIZE=7,FONT=TIMES,STYLE=Bold,COLOR=navy,BACKCOLOR=None,$

DEFMACRO=COND0001, MACTYPE=RULE,WHEN=N2 LE 5,$

TYPE=DATA,MACRO=COND0001,COLUMN=N4,SIZE=8,FONT=TIMES,

COLOR=red,BACKCOLOR=None,STYLE=Bold,$

ENDSTYLE

ON TABLE SET EMPTYREPORT ON

ON TABLE SET PAGE-NUM NOLEAD

-*ON TABLE PCHOLD FORMAT EXCEL

END

This is the error being returned:
SET ASNAMES=ON
SET MSG=ON
-*
-* Calculate the dates to use when selecting the the range of Invoice Dates:
-* &DTE_PREV_MO = Today's date - 1 month
-* &DTE_LESS180 = Today's date - 1 month - 180 days
-* &DTE_ADD20 = Today's date - 1 month + 26 days
-*
-SET &DTE_PREV_MO=DATECVT((DATEADD((DATECVT(20090303,'I8YYMD','YYMD')),'M',-1)),
0 ERROR AT OR NEAR LINE 5 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC262) UNBALANCED PARENTHESES

This message has been edited. Last edited by: Kerry,


7.6.4 (being implemented 1/09)
Word, EXCEL EXL97, EXL2K, pdf, delimited, and many more
Operating system Windows
 
Posts: 4 | Registered: December 18, 2008Report This Post
Expert
posted Hide Post
The Dialogue Manager code looks OK, but perhaps the second () is confusing things.

This should work:

-SET &DTE_PREV_MO = DATECVT(DATEADD(DATECVT(&YYMD, 'I8YYMD', 'YYMD'), 'M', -1), 'YYMD', 'I8YYMD');

-SET &DTE_LESS180 = DATECVT(DATEADD(DATECVT(&DTE_PREV_MO, 'I8YYMD', 'YYMD'), 'D', -180), 'YYMD', 'I8YYMD');

-SET &DTE_ADD26 = DATECVT(DATEADD(DATECVT(&DTE_PREV_MO, 'I8YYMD', 'YYMD'), 'D', 26), 'YYMD', 'I8YYMD');

20090203
20080807
20090301

By the way, your code will look like code if you use the code tags, click on and place your code within the generated code tags.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
You've got 5 lefties and 4 righties. Add one more to the end and you should be fine.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Member
posted Hide Post
Thank you. I was able to set-up and run the report without error.


7.6.4 (being implemented 1/09)
Word, EXCEL EXL97, EXL2K, pdf, delimited, and many more
Operating system Windows
 
Posts: 4 | Registered: December 18, 2008Report This Post
Expert
posted Hide Post
Missed the fifth leftie!


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
It certainly can be easier to maintain and understand when you break up the statements like Fancis demonstrated.

There's probably very little performance gains by nesting functions but I know I've definitely done it in the past - just because...


WebFOCUS 7.6.6/TomCat/Win2003,SQL Server 2005,Oracle
 
Posts: 125 | Location: New England | Registered: February 20, 2007Report This Post
Expert
posted Hide Post
I humbly feel this may be an interesting read: [CODE] Simplifying the use of Date functions in Dialogue Manager


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] UNBALANCED PARENTHESES

Copyright © 1996-2020 Information Builders