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     [CLOSED] LET command problem

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] LET command problem
 Login/Join
 
Expert
posted
It's not often we get a chance to use the LET command and now that I have the opportunity, I can't get it to work.

This example works:

LET APPLE=CAR

TABLE FILE APPLE
PRINT
COUNTRY
END

This example does not work, qualified column names are not translated by the LET command:
LET APPLE=CAR

TABLE FILE APPLE
PRINT
APPLE.COUNTRY
END

I thought this would work, but it does not:

LET APPLE=CAR
LET APPLE.=CAR.

TABLE FILE APPLE
PRINT
APPLE.COUNTRY
END

The error: (FOC004) THE OPTION ON THE VERB OBJECT IS NOT RECOGNIZED: APPLE.COUNTRY

Any ideas?

This message has been edited. Last edited by: Francis Mariani,


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
Virtuoso
posted Hide Post
I may be way off on this (as I have probably used LET only slightly more than what you probably have) but my understanding is that it only does WHOLE WORD matching. For example PINEAPPLE would not become PINECAR just as APPLE.COUNTRY does not become CAR.COUNTRY. Someone please correct me if that is wrong.

Is there a reason why an &var could not be used instead?


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Virtuoso
posted Hide Post
The LET substituton process -- like Dialog Manager's focexec prescan process -- has no knowledge of Focus syntax. It operates very mechanically, breaking the line into "tokens" wth blanks and start/end of line serving as delimiters, and substituting where it finds a whole-token exact match. It regards quotes and periods as potentialy part of a token, not as delimiters.

In your example, APPLE.COUNTRY is a token, and the APPLE or APPLE. portion does not trigger substitution, since it is not an etire token.

Consider: If you had
LET CA=Central_America

would you want subsitution to be made on the CA prefix in
TABLE FILE CAR ...
?


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
Darin, yes an &VAR would work, I just thought "here's a nice opportunity for the LET command", but I'm sure you're right about the "whole word" matching.

Thanks for the input.


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
Jack, no, I wouldn't expect the CA in CAR to be translated to Central_America, but I would have thought LET was smart enough to see that there are two words in APPLE.COUNTRY, the . being a delimiter in most languages.

Thanks.


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
Virtuoso
posted Hide Post
Francis,

Would this suit you:
  
LET APPLE=CAR
LET APPLESEG=CAR<1>
TABLE FILE APPLE 
PRINT APPLE
BY APPLESEG .COUNTRY
END


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

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
Daniel, that works, but what is the <1> doing? It doesn't seem obvious.

Thanks,


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
Virtuoso
posted Hide Post
Francis,
The <1> is the parameter for the LET. By defining it stuck to CAR, APPLESEG .COUNTRY is translated as CAR.COUNTRY. Nice trick, no?
You can have many params. For example:
  
LET 
SORTGROUP=BY <1> IN-GROUPS-OF <2>
END

TABLE FILE CAR
SUM SALES
SORTGROUP MPG 10
END


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

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
Very neat trick!

Is this documented anywhere?

Thanks,


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:
Is this documented anywhere?

Hooray! I've won my bet with someone that you would come up with that statement Wink

Don't change Francis Razzer

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

Just being consistent!

It IS a rather interesting technique, innit?

By the way, I just cannot find the LET command syntax in the WebFOCUS Windows Help documentation - 'LET command' doesn't result in much.

Good One


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
Francis,

Look in a mainframe FOCUS manual. I have an old 7.0 one. It is in book 2, chapter 21.

I personally don't use LET anymore but I used to use it a lot when I did mainframe FOCUS back in the day. I'd make shortcuts for TED for example.

Happy reading!


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Expert
posted Hide Post
Ah, yes! Those famous TED shortcuts:

LET TF    = TED FOCEXEC(<1>)
LET TH    = TED HOLDMAST(<1>)
LET TM    = TED MASTER(<1>)
LET EF    = EXEC FMSPEDIT
LET SPF   = TSO ISPF
LET BR    = TSO ISPF 1
LET ED    = TSO ISPF 2
LET IOF   = TSO ISPF I


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
Virtuoso
posted Hide Post
Is period a token separator in circa-1980 FORTRAN?

As I noted, even quote marks are excluded, despite their delimiting functon since the early days of Focus.

IBI could update the rules, after due deliberation -- but for now the period is not a token delimiter for LET subsitution.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
I don't expect IBI will be updating the delimiter rules any time soon.

I have an open case that just celebrated its fourth anniversary regarding CHECK FILE PICTURE - it's not very useful now that, more often than not, table names are longer than 8 characters.


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
I always found some easy target to show that -

SAMPLE
END

could produce a simple report. Of course I did have LET SAMPLE = TABLE FILE CAR SUM RCOST DCOST BY COUNTRY BY CAR BY MODEL in a profile somewhere. Raised a few smiles back in the late 1980's early 1990's!

As for the LET command, search for LET in Dev Studio help files but don't expect any mention of the parameter syntax as reminded by Dan (thank goodness he didn't mention w*****p again 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
quote:
Ah, yes! Those famous TED shortcuts (mainframe days)
Something like:
LET TFC = TABLE FILE CAR
TFC
PRINT CAR BY COUNTRY
END
I got "Extra Credit" for the TFC thing back in 19xx at a Basic Reporting Class at IBI's 1250 Broadway location. Now, that was a while ago...
Good One Thanks for the memories...




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report 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     [CLOSED] LET command problem

Copyright © 1996-2020 Information Builders