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     Appending multiple tables to HOLD files.
Go
New
Search
Notify
Tools
Reply
  
Appending multiple tables to HOLD files.
 Login/Join
 
Gold member
posted
I'm using WebFOCUS 4.3.6 and would like to have multiple table requests save/append to the same HOLD file. Is this possible? I'm a newbie, so forgive me if this is an obvious capability.
 
Posts: 50 | Registered: March 26, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
sure, a great question and a cool technique. make sure your hold files have the same fieldnames. it helps (less agro) if they're identical in layout but not necessary for this technique. the fieldnames must be ident in format.
TABLE FILE CAR
..do stuff..
ON TABLE HOLD AS H1
END
TABLE FILE MYCAR
..do the same stuff..
ON TABLE HOLD AS H2
END
...continue for as many holds as you need.
...now...
TABLE FILE H1
..do some cool stuff using fieldnames common
..to all your Hn files
ON TABLE HOLD AS HFINAL
MORE
FILE H2
MORE
FILE H3
MORE
FILE H4
....as many as you need.
END
Your file called HFINAL will contain all your merged stuff;

Now, if the hold files are focus files (ON TABLE HOLD AS H1 FORMAT FOCUS) and they are identical structure, then
USE
H1 AS H1
H2 AS H1
H3 AS H1
H4 AS H1
...etc
END
TABLE FILE H1
..do stuff

got it??
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Gold member
posted Hide Post
Thank you. I got it. I thought there might be another way using a FILEDEF for my HOLD file or something else where I wouldn't have to use the MORE command. So WebFOCUS will always overwrite a HOLD file? There is no directive to change this behavior to append?
 
Posts: 50 | Registered: March 26, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Ah..i detect a mainframe brain behind this question...I bet you're thinking about that filedef append thing we used to do in cms or was it tso? I looked it up and hot dog, it works.
FILEDEF APPND DISK D:\IBI\APPS\APPND.FTM
FILEDEF HOLDMAST DIR D:\IBI\APPS\
TABLE FILE CAR
PRINT COUNTRY IF COUNTRY IS 'FRANCE'
ON TABLE HOLD AS APPND FORMAT ALPHA
END
-RUN
FILEDEF APPND DISK D:\IBI\APPS\APPND.FTM (APPEND
TABLE FILE CAR
PRINT COUNTRY IF COUNTRY IS 'ENGLAND'
ON TABLE SAVE AS APPND
END
TABLE FILE APPND
PRINT *
END

in answer to your pm, the (APPEND is required syntax. it says i'm going to append to the existing file. without it, you would overwrite the existing file. Here's the link to the ibi support site that explains it.
http://documentation.informationbuilders.com/masterinde.../wf_user/08app20.htm

this is a great question, and a technique i need to use, just hadn't been motivated to go research it. thanks for the push.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Appending multiple tables to HOLD files.

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