Focal Point
Overwrite FOCUS file not working with APP FI allocate

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

August 20, 2007, 01:22 PM
ShawnS
Overwrite FOCUS file not working with APP FI allocate
How can you overwrite a FOCUS file on the data server without issuing modify (MODIFY FILE...) commands?
I am simply issuing an ON TABLE HOLD AS ... FORMAT FOCUS.
When I setup the files (FOC and MAS) I used the APP HOLDMETA and HOLDDATA commands, however without those I cannot overwrite the focus file.
In this example I first create the file issuing the APP HOLDMETA/DATA commands and loda file with france. Then I comment out the APP HOLDMETA/HOLDDATA commands and run again with different criteria. The program runs and appears to have worked as I hope, but the original data is still intact.

Here is my code:

-*APP HOLDDATA bitemp
-*APP HOLDMETA bitemp
-* above commented after initial run.
-*
APP FI AA_WRITE bitemp
TABLE FILE CAR
PRINT *
WHERE COUNTRY EQ 'FRANCE'
ON TABLE HOLD AS AA_WRITE FORMAT FOCUS
END

I am guessing this has to do with the internal modify that happens behind the scenes. Is there a way to make this work without those APP HOLD commands? I don't want to dirty up my application directories with other junk.

Thanks


wf 767 running on w2k3 srvr
August 20, 2007, 01:40 PM
Darin Lee
Seems like I recall a recent post about being able to access files created with the app hold commands in subsequent requests. I don't recall the outcome, however. In any case you can include a USE statement in your fex (or user/server profile) that points fex to the right FOC files. But that's still adding some "other junk". Try searching the forum for APP HOLD / APP FI/ APP HOLDDATA


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
August 20, 2007, 02:32 PM
ShawnS
Using the FOCUS file in a subsequent requests is my main objective. This works with the APP commands, however in a new month when I go to "step on" this focus file I cannot. I can if I issue the "modify file" commands, but I'd rather not do that.


wf 767 running on w2k3 srvr
August 20, 2007, 04:24 PM
Francis Mariani
If bitemp is in the App Path:

Program 1
APP HOLDDATA bitemp
APP HOLDMETA bitemp
-RUN

TABLE FILE CAR
PRINT *
WHERE COUNTRY EQ 'FRANCE'
ON TABLE HOLD AS AA_WRITE FORMAT FOCUS
END
-RUN


Program 2
USE bitemp/AA_WRITE.FOC
END
-RUN

TABLE FILE CAR
PRINT *
WHERE COUNTRY EQ 'ENGLAND'
ON TABLE HOLD AS AA_WRITE FORMAT FOCUS
END
-RUN


Program 3
TABLE FILE AA_WRITE
PRINT *
END


If bitemp is not in the App Path:

Program 1
APP HOLDDATA bitemp
APP HOLDMETA bitemp
-RUN

TABLE FILE CAR
PRINT *
WHERE COUNTRY EQ 'FRANCE'
ON TABLE HOLD AS AA_WRITE FORMAT FOCUS
END
-RUN


Program 2
USE bitemp/AA_WRITE.FOC
END
-RUN

TABLE FILE CAR
PRINT *
WHERE COUNTRY EQ 'ENGLAND'
ON TABLE HOLD AS AA_WRITE FORMAT FOCUS
END
-RUN


Program 3
APP HOLDMETA bitemp
-RUN

TABLE FILE AA_WRITE
PRINT *
END



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
August 20, 2007, 05:40 PM
ShawnS
The HOLDMETA and HOLDDATA work... But I don't want to use them because of the many intermediate hold files created within my procedure fill up my application folder.
What I am realling looking to find out is why doesn't the following work:

APP FI myhold appPath/myhold.foc
TABLE FILE CAR
PRINT *
WHERE COUNTRY EQ 'FRANCE'
ON TABLE HOLD AS MYHOLD FORMAT FOCUS
END

when the following does work?

APP FI myhold appPath/myhold.ftm
TABLE FILE CAR
PRINT *
WHERE COUNTRY EQ 'FRANCE'
ON TABLE HOLD AS MYHOLD
END

(what I mean by work is the results are saved into the hold files)

Thanks


wf 767 running on w2k3 srvr
August 20, 2007, 05:51 PM
Francis Mariani
quote:
APP FI myhold appPath/myhold.foc


is not valid for FOCUS databases.

Check this out:

Controlling the APP Environment


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
August 20, 2007, 06:33 PM
ShawnS
Thanks the USE worked...

USE app/name.foc
END


wf 767 running on w2k3 srvr