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.
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 :
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
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 :
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.
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
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
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 :