Focal Point
[SOLVED] How to call the hold file created in other procedure?

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

October 22, 2008, 12:43 AM
basava
[SOLVED] How to call the hold file created in other procedure?
Hi,

I am using a HOLD file which is created in the other procedure. HOLD file is in FOCUS format.
I am directly including the fex file in which i have created HOLD file (-INCLUDE fex_name).
But i am unable to access it. please help me out.

Basava
WF 7.1.4 HTML PDF EXCEL UNIX

This message has been edited. Last edited by: Kerry,
October 22, 2008, 06:51 AM
Janakiraman
HI,
I tried with EX(execute) command instead of -INCLUDE, it is working fine. Better try with EX command i.e., EX fex_name

WF Production Version: WebFOCUS 7.6.1
WF Test Version : WebFOCUS 7.6.4
Operating System : Windows xp
Output format : Excel, PDF, HTML, AHTML, PPT
October 22, 2008, 08:58 AM
linus
Post your code -- I do this exact thing constantly through out my fexes.


WF 7.7.05
HP-UX - Reporting Server, Windows 2008 - Client, MSSQL 2008, FOCUS Databases, Flat Files
HTML, Excel, PDF
October 22, 2008, 05:00 PM
Waz
Whether its an EX or -INCLUDE, it shouldn't matter.

The only real difference is that a -INCLUDE will keep and FILEDEF's, but the EX will not.

This shouldn't matter for a focus file, but a USE will still exist after the -INCLUDE. Check with the command
? USE


Once the file is created in your session it will be available.

Debugging 101

Step 1 - Are there any error messages
Stop the program after the -INCLUDE with the command
-EXIT
and check for any errors, these need to be fixed first.

Step 2 - Does the file exist
Have you done a directory listing after the -INCLUDE to see if it was created ?

Try
-RUN
! ls -al

There should be 2 files with the name you gave it, one with the extension .mas and the other .foc.

Step 3 - File Format
Is it a FOCUS file, should be a hold file qith the extension .foc. The file size should be at least 4K.

There are probably many more checks, but these should be enough to find major problems.


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!

October 23, 2008, 10:26 AM
cburtt
First: INCLUDE works with *.fex source code files only, not data.

Second: WebFOCUS procedures are executed by an 'agent'.
All simple 'hold' files are stored in the agent's private temporary disk space. This space is deleted when the agent finishes executing the process; Simple 'hold' files in this temporary working space are thereby deleted.

If you want to access a 'held' file after it's creating procedure has completed you must do either of several things. Check the manuals or DevStudio's help for more information:

1. Precede your TABLE FILE ... END with
APP HOLDMETA {applib}
APP HOLDDATA {applib}

2. Allocate the file to permanent disk space with
FILEDEF {holdname} DISK {diskpath}

3. Construct the fully qualified disk path to the file in the agent's temporary space into an &variable, then use DOS COPY commands to copy it to a permanent disk location.


WIN/2K running WF 7.6.4
Development via DevStudio 7.6.4, MRE, TextEditor.
Data is Oracle, MS-SQL.