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] Fun with LET

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SHARING] Fun with LET
 Login/Join
 
Expert
posted
Do you have problems typing some words, like me. Can't seem to type PRINTA, sorry PRINT, did I get that right.

Well FOCUS/WebFOCUS has the LET command.

Make those pesky misspelt words work for you, or confound your co-workers.

e.g.
LET PRITNA = PRINT
TABLE FILE CAR
PRITNA COUNTRY
END


Take it to the next level.

In Spanish, Cool.
LET TABLA = TABLE; ARCHIVO = FILE; AUTO = CAR; IMPRIMIR = PRINT; FIN = END
LET PAÍS = COUNTRY; MODELO = MODEL; CARROCERÍA = BODYTYPE; SILLAS = SEATS
LET DISTRIBUIDOR_DE_COSTOS = DEALER_COST; COSTO_MENOR = RETAIL_COST
LET VENTAS = SALES; LONGITUD = LENGTH; ANCHO = WIDTH; ALTURA = HEIGHT
LET PESO = WEIGHT; DISTANCIA_ENTRE_EJES = WHEELBASE
LET TAPA_DE_COMBUSTIBLE = FUEL_CAP; ACELERACIÓN = ACCEL; MANTENER = HOLD
LET EN = ON; QUANDO = WHEN; COMO = 'AS'; MI_ARCHIVO = MY_FILE

-*LET BHP = BHP; RPM = RPM; MPG = MPG

-RUN

? LET

-RUN

-SET &FIJAR  = SET ;
-SET &ECO    = ECHO ;
-SET &CORRER = RUN ;
-SET &SALIR  = EXIT ;
-SET &TODO   = ALL ;

-&FIJAR.EVAL &ECO.EVAL=&TODO;

TABLA ARCHIVO AUTO
IMPRIMIR PAÍS
      AUTO
      MODELO
      CARROCERÍA
      SILLAS
      DISTRIBUIDOR_DE_COSTOS
      COSTO_MENOR
      VENTAS
      LONGITUD
      ANCHO
      ALTURA
      PESO
      DISTANCIA_ENTRE_EJES
      TAPA_DE_COMBUSTIBLE
      BHP
      RPM
      MPG
      ACELERACIÓN 
EN TABLA MANTENER COMO MI_ARCHIVO
FIN

-&CORRER.EVAL

TABLE FILE MY_FILE
PRINT *
END


Or go really geeky in Klingon, Eeker.
LET raS = TABLE; teywI = FILE; Duj = CAR; jatlh = PRINT; Qapla = END
LET Hatlh = COUNTRY; ghantoH = MODEL; porgh = BODYTYPE; qus = SEATS
LET chenmoHwI_Huj = DEALER_COST; Suy_Huj = RETAIL_COST; ngev = SALES
LET aD = LENGTH; juch = WIDTH; Iv = HEIGHT; ngI = WEIGHT; rutlh_waw = WHEELBASE
LET nIn_muq = FUEL_CAP; ervum_HoS = BHP; DIng_Hoch_tup = RPM
LET qelIqam_Hoch_muq = MPG; chung = ACCEL; uch = HOLD; DI = ON; ghorgh = WHEN
LET ghet = 'AS'; wIj_teywI = MY_FILE

-RUN

? LET

-RUN

-SET &lan = SET ;
-SET &cha = ECHO ;
-SET &qet = RUN ;
-SET &mej = EXIT ;
-SET &Hoch = ALL ;

-&lan.EVAL &cha.EVAL=&Hoch;

raS teywI Duj
jatlh Hatlh
      Duj
      ghantoH
      porgh
      qus
      chenmoHwI_Huj
      Suy_Huj
      ngev
      aD
      juch
      Iv
      ngI
      rutlh_waw
      nIn_muq
      ervum_HoS
      DIng_Hoch_tup
      qelIqam_Hoch_muq
      chung 
DI raS uch ghet wIj_teywI
Qapla

-&qet.EVAL

TABLE FILE MY_FILE
PRINT *
END


Its loads of fun, try it out today.

Big Grin

This message has been edited. Last edited by: <Kathryn Henning>,


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
Master
posted Hide Post
This is nice one. Thanks for sharing.
But what about if someone is going to maintain/support the code developed by me using LET.

Thanks,
Ram
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report This Post
Master
posted Hide Post
Clairvoyantly enough, I was just thinking about LET as I went to sleep last night. I have a bunch of synonyms auto-generated via the reporting console, where the filename and segment name are the same - and quite long, such as QUOTEDIRECTITEM.QUOTEDIRECTITEM.

I know this combo is going to come up frequently in some fexes I'm building so I was thinking to:

LET QDI=QUOTEDIRECTITEM


This works:
LET QDI = QUOTEDIRECTITEM
LET DESCR = PDESC

TABLE FILE QDI
PRINT DESCR
END


Alas this does not:
LET QDI = QUOTEDIRECTITEM
LET DESCR = PDESC

TABLE FILE QDI
PRINT QDI.QDI.DESCR
END


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Expert
posted Hide Post
quote:
I was just thinking about LET as I went to sleep last night.

George,

I think that you need to join Francis on that beer Wink

T
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Gold member
posted Hide Post
LET TF = 'TABLE FILE PRINT COUNTRY' 

TF
END


Works aswell, pretty cool Smiler


WebFOCUS App Studio 8103
Windows7
All outputs
 
Posts: 58 | Location: London, UK | Registered: May 09, 2011Report This Post
Expert
posted Hide Post
quote:
But what about if someone is going to maintain/support the code developed by me using LET.

I wouldn't suggest that you EVER build code with LET unless there is a very good reason for doing so (and I can't think of a valid one but wait for the dissenters Wink).

In years gone by it had it's uses but I think that Waz was giving a light hearted discussion point ..... You were weren't you Waz? Razzer

T
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Hence "Fun with LET"

Of course it was light hearted.

This forum can sometimes be very serious, and I was feeling a bit down hearted yesterday, so hope it made some people happy, or at least raised a smile here and there.

If you were to use LET in a formal process, then I would suggest having a defined and documented process of how, where and what can and has been converted to use this functionality.

I was hoping for another language example as well, but the guy I know is ultra busy.

So
LET CHECK_OUT = TABLE FILE; MEFILE = CAR
LET SMOKE_SIGNALS = PRINT COMPUTE MESSAGE/A20
LET SMOKE_N_MIRRORS = BY COUNTRY NOPRINT
LET BYEBYE = END

CHECK_OUT MEFILE
SMOKE_SIGNALS = 'LET MAKES ME HAPPY';
SMOKE_N_MIRRORS 
BYEBYE


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
Guru
posted Hide Post
Smiler Smiler Big Grin

Nice Nice Smiler

In our beloved language Tamil(transliterated)..

A honor Note : This would be the first ever WebFOCUS code written in Tamil, and I am the one who did it.. Yayy Smiler

 
LET CAR_PATRIYA_THAGAVALKALAI = 'TABLE FILE CAR';ACHIDU = 'PRINT *'; POTHUM = 'END';

CAR_PATRIYA_THAGAVALKALAI 
ACHIDU 
POTHUM

 

This message has been edited. Last edited by: Ramkumar - Webfous,


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
 
Posts: 394 | Location: Chennai | Registered: December 02, 2009Report This Post
Expert
posted Hide Post
Good One

I think a challenge has been laid down.


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
Master
posted Hide Post
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report This Post
Guru
posted Hide Post
Nice Thread and Thanks Smiler


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
 
Posts: 394 | Location: Chennai | Registered: December 02, 2009Report This Post
Expert
posted Hide Post
Back in the good old days of IBM mainframe, and FOCUS, I had this in my profile, which helped immensely:
LET TF   = TED FOCEXEC(<1>)
LET TH   = TED HOLDMAST(<1>)
LET TM   = TED MASTER(<1>)
LET EF   = EXEC FMSPEDIT
LET HLI  = EXEC FMSPHLI
LET SPF  = EXEC FMSPF

and sometimes this:
LET SPF    = TSO ISPF
LET BR     = TSO ISPF 1
LET ED     = TSO ISPF 2
LET IOF    = TSO ISPF I
LET TF     = TED FOCEXEC(<1>)
LET TH     = TED HOLDMAST(<1>)
LET TM     = TED MASTER(<1>)


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
Now those commands bring back memories.

I miss TED


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
Master
posted Hide Post
quote:
LET TF = TED FOCEXEC(<1>)
LET TH = TED HOLDMAST(<1>)
LET TM = TED MASTER(<1>)
LET EF = EXEC FMSPEDIT
LET HLI = EXEC FMSPHLI
LET SPF = EXEC FMSPF


Will these work in WebFOCUS? Is there any documentation to cover all these?

Thanks,
Ram
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report This Post
Virtuoso
posted Hide Post
This was my fav way way back in the day (queue Dillenger Four):

LET SHOW = TABLEF FILE <1> PRINT * WHERE RECORDLIMIT EQ 10O # END
-RUN

SHOW CAR


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Platinum Member
posted Hide Post
Very cool - thanks for schooling me!


webFOCUS 8207.15
WindowsServer 2019
 
Posts: 120 | Location: Minnesota | Registered: August 26, 2013Report This Post
Expert
posted Hide Post
quote:
Will these work in WebFOCUS? Is there any documentation to cover all these?




Unfortunately TED is not in WebFOCUS.

Not sure about SPF stuff on mainframe.


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
Guru
posted Hide Post
quote:
LET CAR_PATRIYA_THAGAVALKALAI = 'TABLE FILE CAR';ACHIDU = 'PRINT *'; POTHUM = 'END';

CAR_PATRIYA_THAGAVALKALAI
ACHIDU
POTHUM


@RamKumar
Arumai!!!


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Virtuoso
posted Hide Post
Here's a useful application:

Say you need to capture and embed the total page count, so you run the report twice, with HOLD FORMAT PDF first time, and then the identical TABLE code but with PCHOLD). Then...
-*First leg:
-DEFAULTH &pages='000';
LET 
PCHOLD=HOLD
END

-INCLUDE the_report.fex
-RUN
-SET &pages=&FOCNEXTPAGE-1; (did I spell that right?)

LET CLEAR PCHOLD
END

-*Second:
-INCLUDE the_report.fex
-RUN

... does it.

That allows you to maintain a single copy of the report code, coded with "ON TABLE PCHOLD" - instead of two copies that must be kept synchronized.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Gold member
posted Hide Post
Very nice you all! I may have some fun with LET. . . and put it to good use too.


WebFocus 8201m on Windows; App Studio 8201; Procedures: WebFocus with SQL; HTML Parameter Pages & Dashboard; Output: Excel, HTML, & PDF.
 
Posts: 88 | Location: MI | Registered: July 23, 2009Report 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] Fun with LET

Copyright © 1996-2020 Information Builders