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
TThis 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
December 19, 2012, 06:05 AM
Dave
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
December 19, 2012, 10:06 AM
Tony A
Thanks Dave
You'll notice that I have changed the sample code to the one that I should have posted.
T
December 19, 2012, 11:17 AM
Francis Mariani
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
December 19, 2012, 02:19 PM
susannah
APPLAUSE! and very very much the same to you
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
December 19, 2012, 03:19 PM
Prarie
Much improved since this morning Tony.
Merry Christmas to all.
December 19, 2012, 03:50 PM
Waz
Awesome,
Now I think we all expect something for every holiday.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
December 19, 2012, 04:02 PM
Tony A
quote:
something for every holiday
I'm sure that can be arranged. Although probably a more flexible approach might be in order.
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
December 19, 2012, 04:10 PM
Waz
I expect no less that Extreme Brilliance.......
First task New Year or is it Hanukkah.....
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
December 19, 2012, 04:10 PM
susannah
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
December 19, 2012, 04:15 PM
Waz
Interesting, perhaps IBI will add these to Tips and Techniques.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
December 19, 2012, 04:21 PM
Prarie
December 19, 2012, 04:44 PM
Francis Mariani
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
December 19, 2012, 04:57 PM
Tony A
quote:
a bottle of Grand Marnier
Just the one? At least two surely
T
December 19, 2012, 05:05 PM
Tony A
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
TThis 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
December 19, 2012, 10:28 PM
susannah
gauntlet flung...
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
December 19, 2012, 10:58 PM
Waz
Working on it......
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
December 20, 2012, 10:36 AM
susannah
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
December 20, 2012, 12:02 PM
Tony A
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
December 20, 2012, 12:12 PM
susannah
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
January 07, 2013, 08:48 AM
MAdams1
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
January 25, 2013, 11:09 PM
susannah
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
January 28, 2013, 03:30 PM
susannah
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
January 28, 2013, 03:51 PM
Waz
Have problems with some browsers, and ended up enjoying the holiday too much so it wan't fixed.
Seems to work in IE, Firefox, Chrome and Safari. At least from my Work PC.