Sage 100

 View Only
  • 1.  Multiple segment files

    Posted 10-17-2024 15:43

    Have a client with a hosed AR_InvoiceHistoryDetail file and it's got 3 segments.  I have never been able to get *UFAR to work on a segmented file. Is there some trick to make it do so?  And if you just ran it on the first segment, would it break a "link" to the other 2 segments? (.001, .002)



    ------------------------------
    Beth Bowers
    (269) 358-0989
    ------------------------------


  • 2.  RE: Multiple segment files

    Posted 10-18-2024 10:25

    Looks like you will be a pioneer using the test company.  Please report back



    ------------------------------
    Jeff Schwenk
    Owner
    Bottomline Software, Inc.
    Waynesboro VA
    (540) 221-4444
    ------------------------------



  • 3.  RE: Multiple segment files

    Posted 10-18-2024 10:28

    I'm bringing in the big guns (David Speck)



    ------------------------------
    Beth Bowers
    (269) 358-0989
    ------------------------------



  • 4.  RE: Multiple segment files

    Posted 10-18-2024 11:32

    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)
    ------------------------------