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     [SOLVED] Is there a HOLD format that does not create a file?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Is there a HOLD format that does not create a file?
 Login/Join
 
Virtuoso
posted
I'm in a situation where I perform a TABLE request, where I'm only interested in whether there is a result or not. I don't care about the actual result at all.

Since this request will be fired as part of our authorization code, I'd prefer it to take as few resources as possible. Creating a file that I don't need seems a (very small) bit of a waste that I'd like to circumvent.

My code boils down to this:
-* Override external sources setting this parameter
-SET &IS_ADMIN = 0;

TABLE FILE CAR
SUM COUNTRY
WHERE CAR EQ &UID.QUOTEDSTRING;
WHERE COUNTRY EQ 'ITALY';
ON TABLE HOLD
END
-RUN
-SET &IS_ADMIN = &LINES;


As long as someone with a &UID that is known to be an Italian car logs in, they're considered an admin user. That is all the information I need.

Is there a way to change that ON TABLE HOLD to something that doesn't create a file?

I suppose the next best option is to create the file on a device that is not physical storage (a memory disk or something like that). I don't suppose anything built into WF already does that?

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


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
Master
posted Hide Post
Howdy neighbor,

You could add RECORDLIMIT EQ 1 which will ensure it's not a big file.

If you HOLD the file as same_db it will create a volatile table on the database. This will also prevent a file on the reportingserver/client.

Greets,
Dave


_____________________
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
Hi Dave!

The thing is; our result is already a single record. Hence, the overhead of writing the result to a file is relatively large; I expect that creating the file uses more cycles than writing the actual record.

I realise this would be a very minor optimization, so I won't put a lot of effort into it, but it kind of rubs me the wrong way Wink

I suppose these "volatile" tables are implemented using temporary tables? Does DB2/400 write temp tables to a file or not (not too familiar with that mythical beast)?
If not, we could write it as a temp table in Postgres, as soon as we figure out how to create temp tables from an ON TABLE HOLD statement.

But even that is starting to look like more effort than this is worth.


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
Guru
posted Hide Post
to my experience, creating a small HOLD file doesn't take a lot of resources. On Linux, the BINARY outputformat was always the fastest for me. It's worth testing some options and then do a stresstest on the Reporting server.

You can change your temp directory to a memory mount or tmpfs. Not sure how to do that in Windows.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Master
posted Hide Post
...

the AS400/DB2 beast.

AS/400 thinks disc and memory are just 'storage'. But I think volatiles have the preference of being created in memory.

on need to figure out.

TABLE FILE CAR
SUM SALES
BY CAR
ON TABLE HOLD AS SAME_DB
END


Should do the trick.
If CAR weren't some local sample data...


_____________________
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
Just use SAVE, goes away after execution, and, no master created...
Comment out the WHERE to get 1 line...
  
TABLE FILE IBISAMP/CAR
 SUM COMPUTE TOT_SALES/I11 = SALES;
 WHERE COUNTRY EQ 'IRELAND';
 ON TABLE SAVE
 ON TABLE SET HOLDLIST PRINTONLY
 END
 -RUN
 0 NUMBER OF RECORDS IN TABLE=        0  LINES=      0
 ALPHANUMERIC RECORD NAMED  SAVE
 0 FIELDNAME                         ALIAS         FORMAT        LENGTH
 TOT_SALES                                       I11            11
 TOTAL                                                          11
 -SET &XLINES =        0;
 -TYPE Total Lines:        0
 Total Lines:        0
 -EXIT


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
To expand on Tom's suggestion, you can get Determine if there is a record and write no records, but a file will be created.

Just check &RECORDS

Try this:
TABLE FILE IBISAMP/CAR
 PRINT COMPUTE BLANK/A1 = ' ' ;
 BY COUNTRY NOPRINT
 ON TABLE SET HOLDLIST PRINTONLY
 WHERE COUNTRY EQ 'ENGLAND'
 WHERE TOTAL COUNTRY EQ 'DUMMY'
 ON TABLE SAVE
 END
 -RUN
-TYPE &|RECORDS = &RECORDS
-TYPE &|LINES = &LINES


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
Virtuoso
posted Hide Post
Thanks guys, that should do the trick!


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     [SOLVED] Is there a HOLD format that does not create a file?

Copyright © 1996-2020 Information Builders