Focal Point
[CLOSED] Print the contents of a HOLD table

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

August 15, 2016, 02:44 PM
gcarterIT
[CLOSED] Print the contents of a HOLD table
I create a HOLD table similar to this:

 
TABLE FILE ORDER_PAYMENTS
BY ORDER_KEY AS 'ORDER_NUMBER'
BY CUST_ID AS 'CUST_NUMBER'
WHERE ORDER_DT GE HADD((HGETC(8, 'HYYMDs')), 'DAY', -30, 8, 'HYYMDs');
WHERE INACTIVE_ACCT NE '1' OR INACTIVE_ACCT EQ MISSING;
WHERE ORDER_KEY IN &ORDER_KEY;
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS CUST_ORDERS FORMAT FOCUS INDEX ORDER_KEY
END


I wish to see what's in the table so I try this:

TABLE FILE CUST_ORDERS
 PRINT *
 END
 -EXIT
 


But all I get back is this:

0 NUMBER OF RECORDS IN TABLE= 9 LINES= 9

What am I doing wrong?

Thanks.

Thanks.

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


WebFOCUS 7.6
Windows, All Outputs
August 15, 2016, 03:14 PM
BabakNYC
Are these two TABLE requests in the same focexec or in two different focexecs?

Unless you have APP HOLD in your code, a HOLD file is temporary and only there for the duration of the session. So, you ought to see what happens if you do something like this:
TABLE FILE CAR
SUM RCOST BY COUNTRY BY CAR
ON TABLE HOLD AS TEST
END
TABLE FILE TEST
PRINT *
END
-RUN



WebFOCUS 8206, Unix, Windows
August 15, 2016, 03:20 PM
BabakNYC
Just one word of caution. If you're using APP HOLD, your hold file is going be written into an application path directory. So, you should be careful where you use it. Look up doc and read up on APP HOLD command.

"The APP HOLD command defines an application in which to hold output data files (and associated Master and Access Files, if applicable) created by a HOLD, SAVE, or SAVB process in the application.

APP HOLD is intended to be used to refresh files that are common for all users of the application. It should not be used for private files since it points to an application area that is used by multiple users. If the same hold name (HOLD or AS name, for example) is used, conflicts between users could result."


WebFOCUS 8206, Unix, Windows
August 15, 2016, 03:37 PM
gcarterIT
The 2 table requests are in the same file, one immediately following the other.

Since the files are private, I won't try APP HOLD.

Maybe I need to SET or unSET an option to make it work?

I'm sure I'm missing something minor.

I'll keep trying . Thanks for your help.


WebFOCUS 7.6
Windows, All Outputs
August 16, 2016, 09:19 AM
Joni Campbell - Europa Sports
What happens if you add something like this to TABLE FILE CUST_ORDERS:

ON TABLE PCHOLD FORMAT EXL2K


8009
Windows, HTML, AHTML, Excel
In FOCUS since 1983
August 16, 2016, 09:34 AM
j.gross
quote:
0 NUMBER OF RECORDS IN TABLE= 9 LINES= 9

LINES = 9 indicates that the data are accessible, so much of this thread was off base.

The behavior looks like what you would expect in FOCUS with SET PRINT=OFFLINE

Throw in a
? SET ALL
and check the PRINT setting
September 06, 2016, 09:39 AM
Tamra
gcarterIT

Did the ? SET ALL help you out at all?

Refer to all the Set commands within this documentWebFOCUS Developing Reporting
Page 440


Thank you for participating in the Focal Point Forum.

Kind Regards,
Tamra Colangelo
IBI Focal Point Moderator


WebFOCUS 8x - BI Portal, Developer Studio, App Studio, Excel, PDF, Active Formats and HTML5