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] what is the use of LET NOPRINT

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] what is the use of LET NOPRINT
 Login/Join
 
Member
posted
Hi All,

what is the use of LET in 'LET NOPRINT '.

thanks
RP

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


webfocus 7.6.9 windows XP Excel
 
Posts: 22 | Registered: July 22, 2009Report This Post
<JG>
posted
Without a right hand component it means nothing.

What's to the right of the =

Is it

LET NOPRINT = ;
LET NOPRINT = 'Happy Christmas'

Where is it coded

in a focexec or edasprof.prf or another profile file?
 
Report This Post
Virtuoso
posted Hide Post
LET is a way of creating substitutes.
For instance, if I specify LET RP=TABLE, I could code RP FILE CAR PRINT *
It means that RP gets substituted by TABLE at runtime.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Master
posted Hide Post
Eeker

That is useful, we use &qout;param for these kind of constructions...

Why isn't LET documented?
(it's not to be found in the 'help')

Legacy?


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Virtuoso
posted Hide Post
Yes, it is a legacy thing. Although I know that it exists, I never use it.
It used to work fine with Focus, but I tried it once in WebFocus and it failed for some odd reason. So I decided to let LET be and never used it again.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Master
posted Hide Post
Like the Beatles would say..

Let LET be.


_____________________
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
Hi RP,

Suggestion from our technicals:

As mentioned, the use of LET will create a substitution. In the case of:

LET NOPRINT=;

a substitution is generated so that when FOCUS sees NOPRINT, it will be replaced by blank. This is an interesting way to prevent people from using NOPRINT in their code. Try this:

LET NOPRINT=;
TABLE FILE CAR
PRINT COUNTRY NOPRINT
END

Notice that COUNTRY will still show up in the output.

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report This Post
<JG>
posted
Old, no documentation number and notice the word legacy in the URL

WebFOCUS Defining a Word Substitution

This message has been edited. Last edited by: <JG>,
 
Report This Post
Master
posted Hide Post
While LET is cool, I never had much use for it except for OS commands. For example, say one wants to delete a file. In Windows one might do:
-DOS DEL path/filename


while in UNIX or Linux it would be
-UNIX rm path/filename


One could put the following in the edasprof
LET OSDEL=-UNIX rm


and use the following in the code:
OSDEL path/filename


So if the code might run on a Windows and a Linux reporting server, doing something like this keeps one from having to change code when moving between environments. All one has to do is change OSDEL in the edasprof of the Reporting Server.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Virtuoso
posted Hide Post
I'd say it's a fairly powerful debugging tool. Say you have a graph that doesn't display what it should be displaying. You put
LET GRAPH=TABLE;
in your fex and you can see what values it's using.

I haven't tried, but you could for example conditionally create a GRAPH or a TABLE.
Like so:
-GOTO TYPE_&OUTPUTFORMAT
-TYPE_TABLE
LET OUTPUT = TABLE;
LET FMT = HTML;
-GOTO TYPE_END

-TYPE_GRAPH
LET OUTPUT = GRAPH;
LET FMT = PNG;
-TYPE_END

OUTPUT FILE CAR
PRINT WIDTH
BY LENGTH
ON TABLE PCHOLD FORMAT FMT
END


Of course you need to be very careful not to accidentally overwrite a core Focus command, that would give some interesting results for sure!

You can do the same using ampersand-variables, but you'll frequently find you need to eval them.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Platinum Member
posted Hide Post
As a software engineer I find the use of LET to be a great trick. As a manager of many software engineers I would bar the use of LET in any production software.

Think of the poor guy trying to maintain a 500 line fex who sees GRAPH ... but getting TABLE?!?! All because much further up in the fex there is a -INCLUDE and the included file did some trickery that CHANGES the language.

If you use &VARs the subsequent readers KNOW there is a substitution.

(getting off my sandbox).


Brian Suter
VP WebFOCUS Product Development
 
Posts: 200 | Location: NYC | Registered: January 02, 2007Report This Post
Virtuoso
posted Hide Post
Certainly true, it's as powerful a tool as it is dangerous.

I also just found out that you apparently can't use it for number formatting :/
-* File let.fex
TABLE FILE CAR
PRINT WEIGHT/P12.2
BY CAR
END

LET WGT = P12.2

TABLE FILE CAR
PRINT WEIGHT/WGT
BY CAR
END

-*0 ERROR AT OR NEAR LINE     10  IN PROCEDURE let     FOCEXEC *
-*(FOC035) ERROR IN THE FORMAT OF THE COMPUTED FIELD DEFINITION: WEIGHT/WGT
-*BYPASSING TO END OF COMMAND
-*(FOC009) INCOMPLETE REQUEST STATEMENT


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report 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] what is the use of LET NOPRINT

Copyright © 1996-2020 Information Builders