Focal Point
Advantage of appending to a file, instead of MORE

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

June 17, 2005, 06:23 AM
thangam
Advantage of appending to a file, instead of MORE
To append one hold file to other hold file, MORE Command can be used. In this case, required number of files are 2.

Or Single file can be opened in APPEND mode using FILEDEF. The o/p of two different queries with similar no of columns can be appended to the same file. In this case, only one file sufficient

Is there any advantages in the above two approach other than reducting the number of files?

Can we knwo the pros and cons of the two approaches?

Do webfocus provide this kind of information in any of the documents?
June 17, 2005, 03:41 PM
dhagen
I don't think there is an official answer to this one. It's more of a personal preference.

I personally prefer the append option rather then the MORE. I find the rules for more are too constricting, while with the append, I don't have to have the same column names and aggregation etc. The only critical thing with the append, is that the output columns must line up exactly. A small price to pay for the added flexibility (in my opinion)
June 17, 2005, 03:47 PM
N.Selph
Some thoughts on the two methods. I have used both, and each has its own pros and cons. For me, I use whichever is simplest for the particular application.

If you use MORE:
1) The two files will be sorted together by the BY fields.
2)They both have to have the same field names and data lengths.
3)If you have in either file two fields of the same name (ie one you joined on), MORE will get confused, so you will have to reDEFINE one of them. Also if the fields aren't called the same name or data length to begin with you will have to reDEFINE them. Sometimes this leads to a lot of redundant DEFINEs.
4)You can append and display the result in one step.
5)If the job is to be run on Report Caster, you can not use MORE in the last table file command (#4 comment). You need to hold the result and reTABLE it, in that case.

If you use FILEDEF (APPEND:
1) There is no data checking that fields are lining up properly (in case of different data lengths)- I have gotten some of the appended files out of register with the others.
2) You will need another step to sort them.
3) Doesn't bother Report Caster.
June 19, 2005, 12:07 AM
TexasStingray
Another option is to use the HOLD AS ??? FORMAT FOCUS [ INDEX xxxx yyyy zzzz ] then use the USE command to treate the old files as one. I have done this with 5 hold files and one nice think is that you can set indexes.