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] foc_none OR foc_null

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] foc_none OR foc_null
 Login/Join
 
Platinum Member
posted
I have this code below some of which I found on Focal Point.

My dilemma now is that it works but sometimes there is no middle name in which case i need to ignore it. I can enter the first letter followed by % and it will work but occasionally although rarely a donor may have no middle name in which case I would like the user to not have to enter anything. I tried setting default to % and to foc_none and neither worked.

suggestions are welcome

 
-SET &LASTNAME = LCWORD(&LASTNAME.LENGTH, &LASTNAME, 'A&LASTNAME.LENGTH');
-SET &FIRSTNAME = LCWORD(&FIRSTNAME.LENGTH, &FIRSTNAME, 'A&FIRSTNAME.LENGTH');
-SET &MIDNAME = LCWORD(&MIDNAME.LENGTH, &MIDNAME, 'A&MIDNAME.LENGTH');
-*-SET &2NAME = UPCASE(&2NAME.LENGTH, &2NAME, 'A&2NAME.LENGTH');
-*-SET &3NAME = LOCASE(&3NAME.LENGTH, &3NAME, 'A&3NAME.LENGTH');
TABLE FILE SPRIDEN
PRINT
     SPRIDEN.SPRIDEN.SPRIDEN_PIDM
     SPRIDEN.SPRIDEN.SPRIDEN_ID
     SPRIDEN.SPRIDEN.SPRIDEN_FIRST_NAME
     SPRIDEN.SPRIDEN.SPRIDEN_LAST_NAME
     SPRIDEN.SPRIDEN.SPRIDEN_MI
WHERE ( SPRIDEN.SPRIDEN.SPRIDEN_CHANGE_IND EQ MISSING );
WHERE ( SPRIDEN.SPRIDEN.SPRIDEN_LAST_NAME LIKE '&LASTNAME' );
WHERE ( SPRIDEN.SPRIDEN.SPRIDEN_FIRST_NAME LIKE '&FIRSTNAME' );
WHERE ( SPRIDEN.SPRIDEN.SPRIDEN_MI LIKE '&MIDNAME' );
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/PRDODSP/_EDAHOME/ETC/endeflt.sty,
$
TYPE=DATA,
     COLUMN=N1,
     TARGET='_self',
     FOCEXEC=/WFC/Repository/University_Advancement/universityad/bio/BioDemoMaster11.fex( \
     PIDM=N1 \
     ),
$
ENDSTYLE
END

 

This message has been edited. Last edited by: FP Mod Chuck,


809 DevStudio, MRE, Report Caster , Report Library
Output: Excel PDF, HTML
 
Posts: 171 | Registered: April 28, 2008Report This Post
Expert
posted Hide Post
Geoff, in the TABLE FILE section of your code, the value "FOC_NONE" will force a bypass of the code. In the Dialogue Manager it will not: the LCWORD causes the problem - it gets transformed to "Foc_None".

Easy test - run this code:

-* File fmfp_geoff1.fex
-SET &ECHO=ALL;

-DEFAULTH &MIDNAME = 'FOC_NONE';

-SET &MIDNAME = LCWORD(&MIDNAME.LENGTH, &MIDNAME, 'A&MIDNAME.LENGTH');

DEFINE FILE CAR
MIDNAME/A10 = LCWORD(10, COUNTRY, 'A10');
END

TABLE FILE CAR
SUM 
SALES
WEIGHT
HEIGHT
BY MIDNAME

WHERE MIDNAME EQ '&MIDNAME';

ON TABLE HOLD
END
-RUN


Now, correct the -SET:

-* File fmfp_geoff1.fex
-SET &ECHO=ALL;

-DEFAULTH &MIDNAME = 'FOC_NONE';

-SET &MIDNAME = IF &MIDNAME EQ 'FOC_NONE' THEN &MIDNAME ELSE LCWORD(&MIDNAME.LENGTH, &MIDNAME, 'A&MIDNAME.LENGTH');

DEFINE FILE CAR
MIDNAME/A10 = LCWORD(10, COUNTRY, 'A10');
END

TABLE FILE CAR
SUM 
SALES
WEIGHT
HEIGHT
BY MIDNAME

WHERE MIDNAME EQ '&MIDNAME';

ON TABLE HOLD
END
-RUN


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
Virtuoso
posted Hide Post
...or turn the function calls in your amper-variable values into strings. Those will be subsituted in your TABLE request and only at the point where FOCUS parses your code will those functions be called - that way, FOC_NONE will work as intended.

-SET &MIDNAME = 'LCWORD('|&MIDNAME.LENGTH|', '|&MIDNAME|', ''A'|&MIDNAME.LENGTH|''')';


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 :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Platinum Member
posted Hide Post
Frances and Wep thanks for your help


809 DevStudio, MRE, Report Caster , Report Library
Output: Excel PDF, HTML
 
Posts: 171 | Registered: April 28, 2008Report 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] foc_none OR foc_null

Copyright © 1996-2020 Information Builders