[SOLVED] Determine if HOLD File Exists in FOCCACHE
I'm creating a HOLD file (format ALPHA) in FOCCACHE. This file is TABLE'd again (ON TABLE PCHOLD FORMAT XML) to populate a drop-down list control in an HTML form. The HOLD file can be used repeatedly during a user's session, and I only want to create it once (i.e., first time thru). I need a way to detect if it already exists so I don't keep hitting the database server to recreate it. Can anyone help with the appropriate command? I know about the STATE command/&RETCODE combination, but I don't seem to be providing the correct path to the HOLD file -- it's never found.
Thanks!
CraigThis message has been edited. Last edited by: Kerry,
Since no takers yet, let me try. I would use CHECK FILE. It sets &LINES to the number of fields defined in the Master, and &RECORDS to number of segments, if the Master file exists and is valid; and both to zero otherwise. Since foccache start out empty, the Master file will exist in foccache if and only if the data file was already pulled during the current browser session.
So you can test whether the pull already took place as follows;