Focal Point
[Sharing] Sample code

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5387081296

December 19, 2019, 07:42 AM
Tony A
[Sharing] Sample code
Fellow "pointers",

It's been a while since I posted this, many members have moved on and we have a whole new set!

Anyway, run the following code if you are able Smiler

-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 IBISAMP/CAR
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,2,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 ''
 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

Edited because Daniel is so picky Wink

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 
December 19, 2019, 09:27 AM
pav
Thank you Tony and wish you the same!!! Cool
December 19, 2019, 10:28 AM
FP Mod Chuck
Very creative... Thanks for sharing! Back at you..


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
December 20, 2019, 08:59 AM
Les J
Same to you.
Good One


WebFOCUS 8

Windows, All Outputs
December 20, 2019, 09:42 AM
Frans
Big Grin same to you!


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
December 20, 2019, 01:11 PM
WFConsultant
Nice Good One


WebFOCUS 8206.10
App Studio 8206
December 20, 2019, 03:35 PM
Doug
Right Back Atcha Tony...
All: Run Tony's Code Smiler




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
December 21, 2019, 02:20 PM
Danny-SRL
Methinks LINE3 should be:
LINE3/A20 = GUESS_IT(2,15,5,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1); AS ''


Picky? Ah well, it probably comes from the French upbringing of rigueur
Cool

This message has been edited. Last edited by: Danny-SRL,


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

December 21, 2019, 04:25 PM
Satheesh Babu
Good one. Wish you the same.


WebFOCUS 8.2.04
AIX/UNIX/Windows, All Outputs
December 22, 2019, 12:09 PM
Waz
Ditto


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!

December 24, 2019, 08:53 AM
BabakNYC
Brilliant!


WebFOCUS 8206, Unix, Windows
January 22, 2020, 11:34 AM
Ian Dalton
And for later this year .......try this one !!

-SET &X = -1;
-REPEAT X 20 TIMES
-SET &X = &X + 1;
-SET &X2 = 12 - INT( 0.5 * &X );
-SET &X3 = 15 - &X/2;
-SET &Y = DECODE &X(9 '|' 12 'S' 5 'R' 4 'R' 11 'A' 8 'X' 6 'Y' 2 'M' 10 'M' 3 'E' ELSE '·') | '·';
-REPEAT Y1 &X2 TIMES
-SET &Y = &Y | '·';
-Y1
-SET &Y = &Y | '/';
-REPEAT Y2 &X TIMES
-SET &R = 100.00 * RDUNIF('D5.2');
-SET &Y = IF &R LE 20 THEN &Y | 'O' ELSE IF &R LE 40 THEN &Y | '*' ELSE IF &R LE 70 THEN &Y | '/' ELSE &Y | '\';
-Y2
-SET &Y = &Y | '\';
-REPEAT Y4 &X3 TIMES
-SET &Y = &Y | '·';
-Y4
-TYPE &Y
-X
-REPEAT Y3 3 TIMES
-TYPE ·············|---|·············
-Y3
-TYPE ···········#########···········


_______________________
*** WebFOCUS 8.1.05M ***
February 12, 2020, 12:05 PM
Enrique R
Nice!


WebFOCUS 8.2.05
February 12, 2020, 12:15 PM
Ian Dalton
Yes nice good old dialog manager !!
Sadly though we get these messages.....

Your request did not return any output to display.
Possible causes:
- No data rows matched the specified selection criteria.
- Output was directed to a destination such as a file or printer.
- An error occurred during the parsing or running of the request.


_______________________
*** WebFOCUS 8.1.05M ***