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     [CLOSED]Variable Length

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]Variable Length
 Login/Join
 
Member
posted
Hi ,

I am trying to construct a & variable for one where clause and one one compute statement.

But when I do -? & it shows only part of the statement.

Please let know if there is some work around.

Best Regards,
Prakash

-DEFAULT &START_DATE = 0;
-DEFAULT &END_DATE =0;
-DEFAULT &SUBTOTBYEMP = 0;
-SET &START_DATE = IF &START_DATE EQ '' THEN _FOC_NULL ELSE &START_DATE;
-SET &END_DATE = IF &END_DATE EQ '' THEN _FOC_NULL ELSE &END_DATE;
-SET &SUBTOTBYEMP = IF &SUBTOTBYEMP EQ '' THEN ' ' ELSE 'ON EMPLOYEE_NUMBER SUBTOTAL AS EMPLOYEE';
-SET &SORTBY = IF &SUBTOTBYEMP EQ '' THEN ' ' ELSE 'BY EMPLOYEE_NUMBER NOPRINT';
-*-SET &TESTTYPE = IF &RP_FN01P_Detail1 CONTAINS CODE_TYPE THEN 'BY CODE_TYPE NOPRINT' ELSE '';
-*-SET &TESTCHECK = IF &RP_FN01P_Detail1 CONTAINS CODE_TYPE THEN 'BY CHECK_NUMBER NOPRINT' ELSE '';
-*-SET &DEMO_PAY_CD = IF &DEMO_PAY_CD EQ '_FOC_NULL' THEN '''000''' ELSE &DEMO_PAY_CD;
-*-SET &DEMO_DED_CD = IF &DEMO_DED_CD EQ '_FOC_NULL' THEN '''000''' ELSE &DEMO_DED_CD;
-SET &DEMO_WAGES = IF (&DEMO_PAY_CD EQ '_FOC_NULL') OR (&DEMO_DED_CD EQ '_FOC_NULL') THEN 'COMPUTE DEMO_WAGES/P11.2 =0' ELSE 'COMPUTE DEMO_WAGES/P11.2 = RETIREMENT.RETIREMENT.DEMO_PAY_AMOUNT - RETIREMENT.RETIREMENT.DEMO_DED_AMOUNT';
-SET &WHERE_C = IF (&DEMO_PAY_CD EQ '_FOC_NULL') OR (&DEMO_DED_CD EQ '_FOC_NULL') THEN 'WHERE ( RETIREMENT.RETIREMENT.COMPANY_NUMBER EQ &COMPANY_NUMBER.(OR(FIND COMPANY_NUMBER,RETIREMENT.RETIREMENT.COMPANY_NUMBER IN RETIREMENT)).Company. ) AND ( RETIREMENT.RETIREMENT.ACTIVE_CODE EQ &ACTIVE_CODE.(OR(FIND ACTIVE_CODE, RETIREMENT.RETIREMENT.ACTIVE_CODE IN RETIREMENT) ).Status. ) AND ( RETIREMENT.RETIREMENT.DEPARTMENT_CODE EQ &DEPARTMENT_CODE.(OR(FIND DEPARTMENT_CODE,RETIREMENT.RETIREMENT.DEPARTMENT_CODE IN RETIREMENT)).Department. ) AND ( RETIREMENT.RETIREMENT.CHECK_DATE GE '&START_DATE' ) AND ( RETIREMENT.RETIREMENT.CHECK_DATE LE '&END_DATE') AND ( RETIREMENT.RETIREMENT.LOAN_CODE_ID EQ &LOAN_CODE_ID.(OR(FIND LOAN_CODE_ID,RETIREMENT.RETIREMENT.LOAN_CODE_ID IN RETIREMENT)).LOAN_CODE_ID.)' ELSE 'WHERE ( RETIREMENT.RETIREMENT.COMPANY_NUMBER EQ &COMPANY_NUMBER.(OR(FIND COMPANY_NUMBER,RETIREMENT.RETIREMENT.COMPANY_NUMBER IN RETIREMENT)).Company. ) AND ( RETIREMENT.RETIREMENT.ACTIVE_CODE EQ &ACTIVE_CODE.(OR(FIND ACTIVE_CODE, RETIREMENT.RETIREMENT.ACTIVE_CODE IN RETIREMENT) ).Status. ) AND ( RETIREMENT.RETIREMENT.DEPARTMENT_CODE EQ &DEPARTMENT_CODE.(OR(FIND DEPARTMENT_CODE,RETIREMENT.RETIREMENT.DEPARTMENT_CODE IN RETIREMENT)).Department. ) AND ( RETIREMENT.RETIREMENT.CHECK_DATE GE '&START_DATE' ) AND ( RETIREMENT.RETIREMENT.CHECK_DATE LE '&END_DATE') AND ( RETIREMENT.RETIREMENT.LOAN_CODE_ID EQ &LOAN_CODE_ID.(OR(FIND LOAN_CODE_ID,RETIREMENT.RETIREMENT.LOAN_CODE_ID IN RETIREMENT)).LOAN_CODE_ID.) AND ( RETIREMENT.RETIREMENT.DEMO_PAY_CD EQ &DEMO_PAY_CD.(OR(FIND DEMO_PAY_CD,RETIREMENT.RETIREMENT.DEMO_PAY_CD IN RETIREMENT)).DEMO_PAY_CD. ) AND ( RETIREMENT.RETIREMENT.DEMO_DED_CD EQ &DEMO_DED_CD.(OR(FIND DEMO_DED_CD,RETIREMENT.RETIREMENT.DEMO_DED_CD IN RETIREMENT)).DEMO_DED_CD. )'
-? &
-EXIT

This message has been edited. Last edited by: <Emily McAllister>,


WebFocus 8, OS: iSeries
 
Posts: 22 | Registered: September 23, 2015Report This Post
Master
posted Hide Post
quote:
&ACTIVE_CODE.(OR(FIND ACTIVE_CODE, RETIREMENT.RETIREMENT.ACTIVE_CODE IN RETIREMENT) ).Status. ) AND


There are a few different ways to code a complex IF or OR than the way you it is coded here. I suggest you research a less complicated
method.


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Expert
posted Hide Post
-? & can also truncate the output of the amper variable.

Try -? & SAVE {filename}, and check it out


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Master
posted Hide Post
With respect, if you want people to take time out of their busy schedules and analyse your code you should:

a) Remove the fully-qualified field names and just leave the name of the field so

DEMO_WAGES/P11.2 = RETIREMENT.RETIREMENT.DEMO_PAY_AMOUNT - RETIREMENT.RETIREMENT.DEMO_DED_AMOUNT';

becomes

DEMO_WAGES/P11.2 = DEMO_PAY_AMOUNT - DEMO_DED_AMOUNT';

and

b) Space out the code so it becomes readable.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Virtuoso
posted Hide Post
A very helpful diagnostic tool is to add:

-SET &ECHO=ALL;

to the beginning of the code so the resolved variables are displayed when you View Source.

You can find out the length of any &variable using .LENGTH suffix. At the end of the code, add:

-TYPE &WHERE_C.LENGTH;

When you run your fex the code will display with all the substitutions which will help you narrow down where the problem is.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Master
posted Hide Post
Why not just us the -TYPE &WHERE_C after your -SET statement.




Scott

 
Posts: 865 | Registered: May 24, 2004Report 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     [CLOSED]Variable Length

Copyright © 1996-2020 Information Builders