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     [Sharing] A little sampler

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Sharing] A little sampler
 Login/Join
 
Expert
posted
All fellow Pointers,

It has been suggested by a group of close friends that I share this code sample with you -

SET NODATA = ''
APP PATH ibisamp
-SET &ECHO = ALL ;
DEFINE FILE EMPDATA
CHAR1/A1 MISSING ON = IF LASTNAME  IN ('ADAMS','PULASKI','SANCHEZ','HIRSCHMAN','KASHMAN') THEN EDIT(FIRSTNAME,'9$') ELSE MISSING;
CHAR2/A1 MISSING ON = IF FIRSTNAME IN ('LOIS','KATRINA','BEN','MARK','TIM','EVELYN') THEN EDIT(LASTNAME,'9$') ELSE
                      IF FIRSTNAME IN ('CHRIS','KAREN') THEN EDIT(LASTNAME,'$$9$') ELSE
                      IF FIRSTNAME IN ('HENRY','JEFF') THEN EDIT(LASTNAME,'$9$') ELSE MISSING;
ORDER/I2 MISSING ON = DECODE LASTNAME  ('PULASKI' 3 'SANCHEZ' 4 'ADAMS' 5 'HIRSCHMAN' 6 'KASHMAN' 7 ELSE 99);
ORDER/I2 MISSING ON = IF ORDER EQ 99 THEN DECODE FIRSTNAME ('LOIS' 1 'HENRY' 2 'KATRINA' 3 'JEFF' 4 'BEN' 5 'CHRIS' 6
                                                          'MARK' 7 'TIM' 8 'KAREN' 9 ELSE 99);
END
-RUN
TABLE FILE EMPDATA
SUM CHAR1 AS ''
OVER CHAR2 AS ''
ACROSS ORDER NOPRINT
WHERE ORDER NE 99
ON TABLE HOLD AS MYPAGE FORMAT HTMTABLE
ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
GRID=OFF, SIZE=84, COLOR=RED, BACKCOLOR=RGB(180 195 255), $
TYPE=DATA, JUSTIFY=CENTER, $
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<html><head><title>To One and All</title>
<base href="www.alsford.me.uk">
<script language='JavaScript' src='snow.js'></script></head>
<body onload="fall();">!IBI.FIL.MYPAGE;
<embed src="/audio/FeedTheWorld.mp3" loop="false" hidden="true"></embed>
</body></html>
-HTMLFORM END
-end


Edited to give the correct code Smiler

T

This message has been edited. Last edited by: Tony A,



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
Master
posted Hide Post
Good One

DEFINE FILE CAR
	X/A2 = IF COUNTRY LIKE 'J%' THEN ' '|EDIT(CAR,'$$9') ELSE
		   IF COUNTRY LIKE 'W%' THEN 'O' ELSE EDIT(CAR,'$$$$$9')|EDIT(CAR,'$$9');
END
TABLE FILE CAR
	PRINT X AS ''
	BY HIGHEST CAR NOPRINT
	BY COUNTRY NOPRINT
WHERE NOT COUNTRY LIKE 'E%' OR '%L%'
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF, $ 
ENDSTYLE
END


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Expert
posted Hide Post
Thanks Dave Smiler

You'll notice that I have changed the sample code to the one that I should have posted.

T
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Fantastic!

Same to you.


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
APPLAUSE! Music Cool
and very very much the same to you




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
Virtuoso
posted Hide Post
Much improved since this morning Tony. Wink

Merry Christmas to all.
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Expert
posted Hide Post
Awesome,

Now I think we all expect something for every holiday.

Big Grin


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
Expert
posted Hide Post
quote:
something for every holiday

I'm sure that can be arranged. Although probably a more flexible approach might be in order. 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
Expert
posted Hide Post
I expect no less that Extreme Brilliance.......

Cool

First task New Year or is it Hanukkah.....


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
Expert
posted Hide Post
Waz, come up with something for Australia day and we'll have to come up with something for the 4th of july...
and frankie martini will come up with something for Polar Bear Swim day... i'm liking this...
oh and Prarie for Remember the Alamo day...
oh we could become the new google banner...




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
Expert
posted Hide Post
Interesting, perhaps IBI will add these to Tips and Techniques. Wink


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
Virtuoso
posted Hide Post
Smiler
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Expert
posted Hide Post
quote:
frankie martini will come up with something for Polar Bear Swim day


Yes, a fireplace, a Canada goose down duvet and a bottle of Grand Marnier.


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
quote:
a bottle of Grand Marnier

Just the one? At least two surely Music

T
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Ok, here's a little "sampler" with more flexibility. Let's see what you can come up with? It should be simple enough to work out how to call the function with your message?

APP PREPENDPATH IBISAMP
-SET &MyStr = ' ';
-REPEAT :Loop FOR &Cnt FROM 97 TO 122;
-SET &MyStr = &MyStr | ',' || HEXBYT(&Cnt,'A1');
-:Loop
DEFINE FUNCTION GUESS_IT(X1/I2,X2/I2,X3/I2,X4/I2,X5/I2,X6/I2,X7/I2,X8/I2,X9/I2,X10/I2,X11/I2,X12/I2,X13/I2,X14/I2,X15/I2,X16/I2,X17/I2,X18/I2,X19/I2,X20/I2)
  MYSTR/A53 = &MyStr.QUOTEDSTRING;
  TEMPSTR/A100V = GETTOK(MYSTR,53,X1,',',1,'A1') | GETTOK(MYSTR,53,X2,',',1,'A1')
                | GETTOK(MYSTR,53,X3,',',1,'A1') | GETTOK(MYSTR,53,X4,',',1,'A1')
                | GETTOK(MYSTR,53,X5,',',1,'A1') | GETTOK(MYSTR,53,X6,',',1,'A1')
                | GETTOK(MYSTR,53,X7,',',1,'A1') | GETTOK(MYSTR,53,X8,',',1,'A1')
                | GETTOK(MYSTR,53,X9,',',1,'A1') | GETTOK(MYSTR,53,X10,',',1,'A1')
                | GETTOK(MYSTR,53,X11,',',1,'A1') | GETTOK(MYSTR,53,X12,',',1,'A1')
                | GETTOK(MYSTR,53,X13,',',1,'A1') | GETTOK(MYSTR,53,X14,',',1,'A1')
                | GETTOK(MYSTR,53,X15,',',1,'A1') | GETTOK(MYSTR,53,X16,',',1,'A1')
                | GETTOK(MYSTR,53,X17,',',1,'A1') | GETTOK(MYSTR,53,X18,',',1,'A1')
                | GETTOK(MYSTR,53,X19,',',1,'A1') | GETTOK(MYSTR,53,X20,',',1,'A1');
  GUESS_IT/A20 = LCWORD(20,TEMPSTR,'A20');
END
TABLE FILE CAR
PRINT COMPUTE GUESS_IT/A20 = GUESS_IT(9,2,17,17,26,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1); AS ''
 OVER COMPUTE GUESS_IT/A20 = GUESS_IT(9,16,13,10,5,2,26,20,1,1,1,1,1,1,1,1,1,1,1,1); AS ''
-* OVER COMPUTE GUESS_IT/A20 = GUESS_IT(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1); AS ''
BY HIGHEST 1 COUNTRY NOPRINT
ON TABLE HOLD FORMAT HTMTABLE AS WHAT
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
  GRID=OFF, FONT=Tahoma, BACKCOLOR=RGB(180 195 255), $
  TYPE=DATA, CLASS=greets, $
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<html>
<head>
<title>From Pointers on WebFOCUS
</title>
<style>
 .greets {font-size:84pt; width:100%; color:#f00104; text-align:center;}
</style>
</head>
<body>
!IBI.FIL.WHAT;
</body>
</html>
-HTMLFORM END

T

This message has been edited. Last edited by: Tony A,



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
gauntlet flung...




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
Expert
posted Hide Post
Working on it......


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
Expert
posted Hide Post
PRINT COMPUTE
  GUESS_IT/A20 = GUESS_IT(17,6, 2, 4, 6,1,16,15,1,6,2,19,21,9,1,1,1,1,1,1); AS ''

OVER COMPUTE GUESS_IT/A20 = GUESS_IT(8,16,16,5,1,24,10,13,13,1,1,1,1,1,1,1,1,1,1,1); AS ''
OVER COMPUTE GUESS_IT/A20 = GUESS_IT(21,16,24,2,19,5,20,1,14,6,15,1,1,1,1,1,1,1,1,1); AS ''




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
Expert
posted Hide Post
PRINT COMPUTE LINE1/A20 = GUESS_IT(24,10,20,9,10,15,8,1,26,16,22,1,2,1,1,1,1,1,1,1); AS ''
 OVER COMPUTE LINE2/A20 = GUESS_IT(14,6,19,19,26,1,4,9,19,10,20,21,14,2,20,1,1,1,1,1); AS ''
 OVER COMPUTE LINE3/A20 = GUESS_IT(2,15,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1); AS ''
 OVER COMPUTE LINE4/A20 = GUESS_IT(9,2,17,17,26,1,15,6,24,1,26,6,2,19,1,1,1,1,1,1); AS ''

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
back atcha!
this is a totally new way to communicate
shall we call it "T-Speak"?




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
Very cool! Thanks for sharing. Hope everyone had a great holiday.


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Expert
posted Hide Post
I'm dying to get to work on Monday now,.... just so i can run this...the anticipation will kill me!




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
Expert
posted Hide Post
THIS WAS SPECTACULAR, WAZ... but wha' happened to your post????




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
Expert
posted Hide Post
Have problems with some browsers, and ended up enjoying the holiday too much so it wan't fixed. Big Grin

Seems to work in IE, Firefox, Chrome and Safari. At least from my Work PC.

Enjoy

A little belated something for Australia Day
-REPEAT :Loop FOR &Cnt FROM 32 TO 122;
-SET &.&Cnt=HEXBYT(&Cnt,'A1') ;
-:Loop
-SET &guess=&76 |&69 |&84;
-SET &unguess=&69 |&78 |&68;
&guess guess = &guess;
guess do = &84..&65..&66..&76..&69..&32..&70..&73..&76..&69..&32..&73..&66..&73..&83..&65..&77..&80..&47..&67..&65..&82..&32..&80..&82..&73..&78..&84..&32..&67..&79..&77..&80..&85..&84..&69..&32..&77..&47..&65..&49..&48..&48..&61..&39..&34..&72..&97..&112..&112..&121..&32..&65..&117..&115..&116..&114..&97..&108..&105..&97..&32..&68..&97..&121..&34..&39..&59;
guess dedo = &66..&89..&32..&67..&79..&85..&78..&84..&82..&89..&32..&78..&79..&80..&82..&73..&78..&84..&32..&87..&72..&69..&82..&69..&32..&82..&69..&67..&79..&82..&68..&76..&73..&77..&73..&84..&32..&69..&81..&32..&49;
guess dedone = &79..&78..&32..&84..&65..&66..&76..&69..&32..&72..&79..&76..&68;
guess unguess = &unguess ;
-RUN
do
dedo
dedone
unguess

-HTMLFORM BEGIN
<html>
<head>
<title>Australia Day</title>
<base href="http://www.jerridyne.com/homesite/ozday/">
<script LANGUAGE="JavaScript" SRC="http://www.jerridyne.com/homesite/ozday/JSFX_Layer.js"></SCRIPT>
<script LANGUAGE="JavaScript" SRC="http://www.jerridyne.com/homesite/ozday/JSFX_Mouse.js"></SCRIPT>
<script LANGUAGE="JavaScript" SRC="http://www.jerridyne.com/homesite/ozday/JSFX_TextFlag.js"></SCRIPT>
<script LANGUAGE="JavaScript">
function JSFX_StartEffects() {JSFX.MakeTextFlag(
!IBI.FIL.HOLD;
, "#00FF00", "Arial", 4);}
</SCRIPT>
</head>
<body style="background:url('http://www.jerridyne.com/homesite/ozday/sydney_harbour.jpg');overflow:hidden;">
<div align="center" id="img" style="position:absolute;">
<img src="http://www.jerridyne.com/homesite/ozday/roo-r.png" id='roo-r' hspace="20" width="85" height="55" onMouseDown="pauseResume();">
<img src="http://www.jerridyne.com/homesite/ozday/roo-l.png" id='roo-l' hspace="20" width="85" height="55" onMouseDown="pauseResume();" style="visibility:hidden">
</div>
<script LANGUAGE="JavaScript">
<!--
var hstep = [10,10,10,10,10,10,10,10,10,10,9,9,9,9,9,9,9,9,9,9,8,8,8,8,8,8,7,7,7,6,6,6,5,5,4,4,3,2,1];var step = 5;var delay = 30;var height = 0;var Hoffset = 0;
var Woffset = 0;var yon = 0;var xon = 1;var pause = true;var interval;var name = navigator.appName;
if(name == "Microsoft Internet Explorer") {name = true;} else {name = false;} var xPos = 0;
if(name) {var yPos = document.body.clientHeight - 45;} else {var yPos = window.innerHeight - 45;} var hoppos = 0 ;
function changePos() {
	if(name) { width = document.body.clientWidth; height = document.body.clientHeight; Woffset = myImg.offsetWidth; myImg.style.left = xPos + document.body.scrollLeft; myImg.style.top = yPos + document.body.scrollTop; }
	else { height = window.innerHeight; width = window.innerWidth; Woffset =30; myImg.style.top = yPos + window.pageYOffset; myImg.style.left = xPos + window.pageXOffset;}
	if (yon) { yPos = yPos + hstep[hoppos]; hoppos--} else { yPos = yPos - hstep[hoppos]; hoppos++}
	if (hoppos==38) { yon = 1;}
	if (hoppos==0) {yon = 0;}
	if (xon) {xPos = xPos + step;} else {xPos = xPos - step;}
	if (xPos < 0) {xon = 1;xPos = 0;rooR.style.visibility = 'visible' ;rooL.style.visibility = 'hidden' ;}
	if (xPos >= (width - Woffset)) {xon = 0;xPos = (width - Woffset);rooR.style.visibility = 'hidden' ;rooL.style.visibility = 'visible' ;}
}
function start() {myImg = document.getElementById('img') ; rooR = document.getElementById('roo-r') ; rooL = document.getElementById('roo-l') ; myImg.style.visibility = "visible"; interval = setInterval('changePos()',delay);}
function pauseResume() {if(pause) { clearInterval(interval); pause = false;} else {interval = setInterval('changePos()',delay); pause = true;}}
start();
JSFX_StartEffects();
//  -->
</script>
<script type="text/javascript" src="http://www.jerridyne.com/homesite/ozday/fireworks.js"></SCRIPT>
</body>
</html>
-HTMLFORM END

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


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
Expert
posted Hide Post
ah. NOW its absolutely spectacular!
run this, everybody!




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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Sharing] A little sampler

Copyright © 1996-2020 Information Builders