Focal Point
[CLOSED] Check if IBI.FIL is empty

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7057037506

June 20, 2011, 10:18 AM
Carlos Dias
[CLOSED] Check if IBI.FIL is empty
Hi there,
How can I check if the result of a IBI.FIL is null?

I want to make this test because if the returned value is null I want to send a "message" like "No data returned".

Thanks in advanced,
Carlos Dias

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


WebFOCUS version: 7.6
Linux/Windows
HTML, Excel
June 20, 2011, 10:40 AM
GamP
You mean to check if the file used in the IBI.FIL command is empty?
If so, you may want to check OS commands to see if the OS has something that can do that for you (for instance unix has something called 'test -f'). Otherwise you could try to use DM to do a -READ from the file. If return code indicates a record has been read, the file is not empty.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
June 20, 2011, 05:42 PM
Waz
If you are creating the file in WebFOCUS, then use &LINES after the TABLE Request.


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!

June 21, 2011, 12:04 AM
John_Edwards
Waz has it. Immediately after you create the hold file, examine (or capture) the value in &LINES and make your decision based on that. At the end of your focexec you can use the logic:

-IF &LINES EQ 0 THEN GOTO EMPTYRPT



June 21, 2011, 02:11 AM
<JG>
If you are creating the file in WebFOCUS then Waz is obviously correct.
However !IBI.FIL. can also be used to serve up static content that has been filedef'd
in which case GamP is correct.