Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Append Problem
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Append Problem
 Login/Join
 
Silver Member
posted
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 *
END

This message has been edited. Last edited by: Kerry,


WebFocus 762 AS400 / DB2
 
Posts: 34 | Location: Winnipeg, MB | Registered: January 23, 2008Reply With QuoteReport This Post
Expert
posted Hide Post
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Guru
posted Hide Post
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
 
Posts: 301 | Location: Galveston, Texas | Registered: July 07, 2004Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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,
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Append Problem

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.