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     Strange effect from Functions

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Strange effect from Functions
 Login/Join
 
Expert
posted
Folks,

I have a current development where I need to perform a couple of repetative data manipulations. I decided to use functions for this as it could be useful across several reports.

The problem arises when I use two functions and the results I am getting are quite strange. If I use one or three functions then the results appear as expected, so it would appear that it is to do with just two functions.

Has anyone else experienced this?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
Tony,

Coukd you give a code-example for this?
With input and expected output?

That would make it easier to try and understand your problem...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
GamP,

A bit late for this now of course, but here is a mock up -

APP PREPENDPATH IBISAMP
DEFINE FUNCTION MERGE_IT(X/A10, Y/A16, Z/A24)
  MERGE_IT/A10 = EDIT(X,'$$9$$') || EDIT(Z,'$$$$$$9$') || EDIT(Y,'$$$$$9$')
                 || EDIT(Z,'$$$$$$$9$$$$$$9$') || (' ' | EDIT(Y,'$$9$$$9$$9')) || EDIT(Y,'$9$');
END
DEFINE FUNCTION CHOOS_IT(X/A10, Y/A16, Z/A24)
  CHOOS_IT/A1 = IF ((X EQ 'ITALY') + (Y EQ 'ALFA ROMEO') + (Z CONTAINS 'SPIDER')) EQ 3 THEN 'Y' ELSE 'N';
END
-RUN
TABLE FILE CAR
PRINT COMPUTE CLONE_IT/A10 = MERGE_IT(COUNTRY, CAR, MODEL);
      COMPUTE SELECT/A1    = CHOOS_IT(COUNTRY, CAR, MODEL);
      COMPUTE DATE/DMtYY   = (RCOST * 2.95) + (DCOST * 3.36) + (SEATS * 18) + 1;
      COMPUTE TIME/I2      = EDIT(EDIT(HHMMSS('A8'),'99$'));
BY COUNTRY NOPRINT
BY CAR     NOPRINT
BY MODEL   NOPRINT
ON TABLE HOLD AS TEMP_HLD FORMAT FOCUS
ON TABLE SET HOLDLIST PRINTONLY
END
TABLE FILE TEMP_HLD
PRINT DATE AS '' CLONE_IT AS '' TIME NOPRINT
WHERE SELECT EQ 'Y'
WHERE DATE   EQ '&DMYY'
WHERE TIME   LE 12
ON TABLE HOLD FORMAT HTMTABLE AS CRASH
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
  GRID=OFF, SIZE=48, $
  TYPE=DATA, CLASS=01_04_f0_01, $
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<html>
<head>
<title>Believe it
</title>
</head>
<style>
 .01_04_f0_01 {font-size:48pts; color:#f00104;}
</style>
<body>
<center>
!IBI.FIL.CRASH;
</center>
</body>
</html>
-HTMLFORM END

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
Tony,

I can't believe I actually ran that code.

Roll Eyes Razzer Good One


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
For me, it gives me an error message: test value inconsistent with format of field.
But then, I'm on 713 at this moment.

After changing the where date and where time to where total's the request ran fine.
Kinda like the red typing that is presented - Good one!

See you at summit ?


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
GamP,

I'm on 713 and ran it fine without adjustments.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
GamP,

Yes, I'll be at Summit, look me up!

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
aaaaaaaaaaarrrrrrrrrrrrggggggggggggggggghhhhhhhhh
Fell for it.
Hook, line, and sinker.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Guru
posted Hide Post
By the time I got to my email, several others had already responded so I new it was an April's Fool item. But I had to run the code any way to see the output. Good one.


Glenda

In FOCUS Since 1990
Production 8.2 Windows
 
Posts: 301 | Location: Galveston, Texas | Registered: July 07, 2004Report This Post
Expert
posted Hide Post
I even left clues for folks such as checking the current date and the hour being LE 12.

Another clue was the class within the style sheet as well as the hex colour code in the HTML.

Hope it gave you all a laugh, it was tough waiting for someone to take the bait Wink

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 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     Strange effect from Functions

Copyright © 1996-2020 Information Builders