Focal Point
APP HOLDMETA and APP HOLDDATA

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

September 12, 2005, 05:55 PM
Francis Mariani
APP HOLDMETA and APP HOLDDATA
quote:
APP HOLDMETA app
Designates app as the location for Master Files and Access Files created with the HOLD command.

APP HOLDDATA app
Designates app as the location for data files created with the HOLD command.
I am using these two commands to make it easy to create HOLD files on one server, then move and read them on another server.

Instead of using FILEDEF commands for each of the HOLD files being created, the APP HOLDMETA and APP HOLDDATA commands set the location of the data files and Masters - when creating the HOLD files.

Unfortunately, these commands do not set the location of the data files when reading the HOLD files. This seems to be quite inconsistent. It appears I have to issue a FILEDEF command for each of the HOLD files.

Am I missing something or do I have to have FILEDEF's when reading but do not require them when creating?
September 12, 2005, 06:27 PM
Tony A
Francis,

Don't forget the new APP FILEDEF ddname DISK app/filename.extn to go with all the other APP commands.
September 12, 2005, 06:34 PM
Francis Mariani
Tony,

Thanks for the APP FILEDEF details. Unfortunately, it has to be applied for each file being read while APP HOLDMETA and APP HOLDDATA only need to be set once. It seems a bit inconsistent to me.

Thanks.
September 12, 2005, 11:24 PM
Piipster
You, of course, don't need to specify the location if you are creating and reading the file as part of the same process. If you are reading a file that has been created previously, it may or may not have been created via a HOLD file command and the file extension can be anything ... .ftm, .dat, .txt, etc. That would be hard to filedef automatically.
September 15, 2005, 10:42 PM
dwf
Francis,

If you hold the file in FOCUS format, then you won't need to filedef, as long as the file and the master are in your path. And you can use APP PATH or APP APPENDPATH (and maybe APP MAP) to change that path.

Example:

APP HOLDMETA TOOLS
APP HOLDDATA TOOLS

TABLE FILE RACCT
PRINT ACCT_NBR
WHERE RECORDLIMIT EQ 10
ON TABLE HOLD AS DACCT FORMAT FOCUS
END

As long as TOOLS is in the path of subquent focexecs, I can report on DACCT without a FILEDEF.
September 16, 2005, 03:36 PM
Francis Mariani
dwf,

Thanks for the info.
September 16, 2005, 07:34 PM
Francis Mariani
Piipster,

The APP HOLDDATA app command must exist for some reason.

If you don't have any FILEDEF statements for the HOLD files being created, the file extension is set to ftm. The APP HOLDDATA app command puts the HOLD files in the specified app directory.

Then, in another request, you would like to access the HOLD files. Performing the APP HOLDDATA app command should be enough to find the files, since ftm should be assumed, unless specfic FILEDEF's were performed.

Otherwise what's the use of the APP HOLDDATA app command?

Thanks.
September 16, 2005, 07:50 PM
Tony A
Francis,

APP HOLDDATA can be used for ON TABLE SAVE as well as 'normal' HOLD files. Useful for when you have a set file format that you keep with your other synonyms. Agreed, you have still to issue the FILEDEF but then that's always been the situation in the majority of held files, except for FOCUS format files.

Another use, I suppose, would be for when a datafile needs to be kept for FTP etc. to be read by another program in another language.

Annoying, I know, but we're used to that Wink