Im having problem when adding data to a hold file. When I have the APP HOLD it's giving me just half of the data I wanted but with out the APP HOLD it's giving me the full list. I need the APP HOLD in my application.
Here is the sample fex
APP HOLD X
TABLE FILE CAR PRINT CAR BY COUNTRY BY MODEL WHERE COUNTRY EQ 'W GERMANY' ON TABLE HOLD AS HCAR END -RUN
FILEDEF HCAR DISK HCAR.FTM (APPEND -RUN
TABLE FILE CAR PRINT CAR BY COUNTRY BY MODEL WHERE COUNTRY EQ 'ITALY' ON TABLE HOLD AS HCAR END -RUN
TABLE FILE HCAR PRINT * ENDThis message has been edited. Last edited by: Kerry,
WebFocus 762 AS400 / DB2
January 25, 2011, 01:21 PM
Francis Mariani
APP HOLD X saves the HOLD files in application X.
The FILEDEF is not pointing to the same location as the APP HOLD X command - the FILEDEF will save the file in the WebFOCUS temporary folder.
You're creating one HCAR file in the APP folder and the other in the temp folder. The final TABLE FILE reads the FILEDEF file only.
I would create two files and then use the MORE command to read them both:
APP HOLD BASEAPP
TABLE FILE CAR
PRINT
CAR
BY COUNTRY
BY MODEL
WHERE COUNTRY EQ 'W GERMANY'
ON TABLE HOLD AS FMHCAR1
END
-RUN
TABLE FILE CAR
PRINT
CAR
BY COUNTRY
BY MODEL
WHERE COUNTRY EQ 'ITALY'
ON TABLE HOLD AS FMHCAR2
END
-RUN
TABLE FILE FMHCAR1
PRINT *
MORE
FILE FMHCAR2
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
January 25, 2011, 01:28 PM
Glenda
Try this.
FILEDEF CARDAT DISK cardat.ftm (APPEND
-*
TABLE FILE CAR
PRINT
CAR
BY COUNTRY
BY MODEL
WHERE COUNTRY EQ 'W GERMANY'
ON TABLE HOLD AS CARDAT FORMAT ALPHA
END
-*
TABLE FILE CAR
PRINT
CAR
BY COUNTRY
BY MODEL
WHERE COUNTRY EQ 'ITALY'
ON TABLE HOLD AS CARDAT FORMAT ALPHA
END
-*
TABLE FILE CARDAT
PRINT *
END
Glenda
In FOCUS Since 1990 Production 8.2 Windows
January 25, 2011, 01:48 PM
j.gross
If you throw in a couple of "? FILEDEF" commands, you'll see that the first and second HOLDs write to different locations:
0 NUMBER OF RECORDS IN TABLE= 7 LINES= 7
Lname Device Lrecl Recfm Append Filename
============================================================
HCAR DISK 52 F D:\ibi\apps\x\hcar.ftm
HOLDMAST DISK 0 V D:\ibi\apps\x\holdmast.mas
0 NUMBER OF RECORDS IN TABLE= 4 LINES= 4
Lname Device Lrecl Recfm Append Filename
============================================================
HOLDMAST DISK 0 V D:\ibi\apps\x\holdmast.mas
HCAR DISK 52 F APP D:\ibi\DevStudio76\srv76\wfs\edatemp\ts000001\HCAR.FTM
The unqualified file-spec in your FILEDEF was taken to refer to the "current" directory. You need to provide explicit application folder qualification in your FILEDEF.
I would issue one before each of the Table requests:
APP FI HCAR DISK x/HCAR.FTM APP FI HCAR DISK x/HCAR.FTM (APPEND
(I recall a time when HOLD would ignore FILEDEF, in order to ensure that the foctemp and master wind up on the same location. Apparently that is no longer true.)This message has been edited. Last edited by: j.gross,