Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Can use EX command within "TABLE...END" block?
Go
New
Search
Notify
Tools
Reply
  
Can use EX command within "TABLE...END" block?
 Login/Join
 
Gold member
posted
Hi,

Is it possible to use the EX command within a "TABLE...END" block?

Instead of

EX addReportInfo

TABLE
.
.
.
.
END

can I do


TABLE
.
.
.
EX addReportInfo
.
.
.
END

If so, where is the appropriate location for the EX command - after TABLE, after BY, after WHERE, after ON TABLE, etc?

I've tried without success.

Thanks,
George


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 70 | Registered: April 27, 2012Reply With QuoteReport This Post
Virtuoso
posted Hide Post
You cannot use the EXEC command, but you can use -INCLUDE.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Reply With QuoteReport This Post
Gold member
posted Hide Post
Thanks. I thought about that and I'm thinking the contents of the INCLUDEd file must follow the syntax at the location of the file it's included into, as if it was originally written as part of that file.

In other words, if I do this

TABLE...
PRINT...
EX addReportInfo
.
BY...
WHERE...
AND...
ON TABLE...
END

the INCLUDEd file, addReportInfo, can only have commands allowed between PRINT and BY - it cannot have a TABLE or WHERE command.
Does that sound correct?

Thanks,
George


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 70 | Registered: April 27, 2012Reply With QuoteReport This Post
Virtuoso
posted Hide Post
The -INCLUDEd focexec can contain any of the commands allowed in a TABLE FILE request, including the TABLE FILE and END statements themselves. But after the parser has replaced the -INCLUDE with the statements in the focexec, the resulting code must be complete and proper.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Reply With QuoteReport This Post
Gold member
posted Hide Post
Ok,

It sound like you're agreeing...

quote:
the INCLUDEd file must follow the syntax at the location of the file it's included into, as if it was originally written as part of that file.


In that case, I would need to rewrite the EX file to work properly as an INCLUDE file, resulting in 2 files, since the EX already works fine in other places. I need to research other alternatives.

Thanks,
George


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 70 | Registered: April 27, 2012Reply With QuoteReport This Post
Expert
posted Hide Post
You might like to tell us what you want to achieve with this program and the EX - perhaps a Dialog Manager loop is what you need...


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, 2005Reply With QuoteReport This Post
Gold member
posted Hide Post
I have a report header generated through a .fex file specifically written for that purpose. for TABLE...END blocks generating a single report page, there is no issues - treat as a compound report, just run the EX first followed by the TABLE...END block. But I wish to use this same header for each page of a multi-page report generated using a TABLE...END bloc. That's why I was hoping I could stick the EX inside the TABLE...END block.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 70 | Registered: April 27, 2012Reply With QuoteReport This Post
Virtuoso
posted Hide Post
You also might want to try executing the procedure first and writing the results (formatted contents of heading lines) out to a file. Then you can just -INCLUDE that file as Dan indicated.


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, 2007Reply With QuoteReport This Post
Gold member
posted Hide Post
Darin:

Interesting.

I've always thought of INCLUDEing as inserting source code as if it was originally part of the recipient file. But it sound like you're saying the item to be INCLUDEd does not necessarily have to be source code (text), but as in my case, can be PDF output which is what my EX file produces. Am I understanding you correctly?

Thanks.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 70 | Registered: April 27, 2012Reply With QuoteReport This Post
Virtuoso
posted Hide Post
What Darin tried to make clear, is that you can have parts of your table command generated beforehand, which can then be -INCLUDEd into you TABLE fex. Like (parts of) the heading, WHERE fields, style sheet lines and such.
Mind you, it all has to be plain readable code that fits into the curernt command syntax...
So your initial thought is correct: INCLUDEing is inserting source code as if it was originally part of the recipient file.


GamP

- Using AS 8.2.01 on Windows 7 - IE11.
in Focus since 1988
 
Posts: 1960 | Location: Netherlands | Registered: September 25, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Can use EX command within "TABLE...END" block?

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.