Beth if you're running *UFAR from via File / Run / SYZCON then it should already recognize segmented files but if you run it externally from pvxwin32.exe you have to set some pvx system parameters first:
SET_PARAM 'MB'=1800,'VE'
RUN "*UFAR"
Also you can't just run it on the first segment as an error will occur once it tries to read the first key in one of the other segments. There is a "key tree" (similar to a Btrieve) in the base file that tells it which segment a key belong to.
Lastly, for @David Speck II, when I've had situations where UFAR failed, I was able to do a rebuild by creating a utility that works on this premise:
- In a separate company, reinitialize AR_InvoiceHistoryDetail then rename it with a .NEW extension (or anything you want) and move it to the folder where the damaged AR_InvoiceHistoryDetail.m4t and segment files are located.
- Open the base damaged M4T file only on a channel. Open the .NEW file on another channel.
- Start a loop to go from beginning to end
Do a READ RECORD or SELECT RECORD on the base damaged with an ERR=*NEXT but the trick is to do so using RNO=n instead of KEY= or another way. RNO means doing a top to bottom sequential scan on every record, instead of key scan and makes the process take significantly longer but is often the only way when a data file is very hosed up
- Do a WRITE RECORD on the .NEW file. As it grows and gets to about 1.8GB it will auto create another segment.
- Loop back and continue. Log whatever you can.
More than likely you won't get back all your records but I've used this technique to save face for customers. Good luck.
------------------------------
Alnoor Cassim
Accounting Systems, Inc. (ASI)
------------------------------