The appx utilities, found in the /tools directory below the appx engine, allow batch manipulation and recovery of AppxIO files. In the Windows environment, execute these commands from a DOS popup box. Or use the command line to perform the same functions in Unix.
Issuing in the DOS box the command ... | appx -u |
more |
Or in Unix, the command ... | appx -u | more |
-k define a new keymap -m=<[user_id:]keymap_name> override keymap ID -d=<database_id> override startup database -a=<application_id> override startup application -t=<process_type> override startup process type -p=<process_name> override startup process name -i=<flat_file_name> convert a flat file into AppxIO -e=<data_file_name> convert an AppxIO file into flatfile -v=<data_file_name> verify the integrity of AppxIO file -an=<data_file_name> analyze an AppxIO file -l=<log file name> start a license server -r (or -recover) recover damaged files (see below)
In Windows: | %APPXPATH%\..\tools\appxutil.exe -v={filename} |
In Unix: | $APPXPATH/../tools/appx -v={filename} |
In Windows: | %APPXPATH%\..\tools\appxutil.exe -an={filename} |
In Unix: | $APPXPATH/../tools/appx -an={filename} |
{filename}
. The most useful command at this prompt is ...
VERIFY KEY #ALL
which performs counts the number of records in the .dat portion of the file verifying the .dat as it goes, and verifies all Keys in the .key portion of the file. Other useful commands are:
HELP - list all available commands. DUMP HEADER - will give you info about the file, including the number of keys. COUNT REC - will give a count of the number of records that {FILENAME.dat} believes it contains. VERIFY KEY #0 - verifies the primary index, and gives # of records. VERIFY KEY #1 - verifies the alt index #1, and gives # of records. VERIFY KEY #2 - verifies the alt index #2, etcetera ... QUIT - exit the "-an=" utility.If the file doesn't pass #ALL verification, but does pass COUNT REC verification, then it means that the *.dat portion of the file is probably OK, but the *.key indices are probably damaged. In this case, rename or delete the *.key file, then run 3)CreateFiles. This will recreate your indices from scratch. (For quite large files, it may be faster to use the 'recover.exe' procedure below, the 3)CreateFiles to recreate your keyfile, albeit at the cost of more designer time required to do this safely.) If the file doesn't pass COUNT REC analysis, you have a seriously damaged *.dat file. Your best bet at this point is to use the "Recover.exe" procedure below, or if necessary restore from backup.
VERIFY FREELISTIf the freelist is damaged, this command will give you an error condition to that effect. To repair the damage, execute:
VERIFY KEY #ALLIf the file passes this verification, you may safely export and re-import the file, in order to initialize its freelist. If the file doesn't pass #ALL verification, but does pass COUNT REC verification, then it means that the *.dat portion of the file is probably OK, but the *.key indices are probably damaged. In this case, rename or delete the *.key file, then run 3)CreateFiles. This will recreate your indices from scratch. It will then be safe to export and re-import the file. (For quite large files, it may be faster to use the 'recover.exe' procedure below, then 3)CreateFiles to recreate your keyfile, albeit at the cost of more designer time required to do this safely.) If the file doesn't pass COUNT REC analysis, you have a seriously damaged *.dat file. Your best bet at this point is to use the recover.exe procedure below, or if necessary restore from backup.
In Windows: | %APPXPATH%\..\appx.exe -r old.file new.file [deleted.record.file] |
In Unix: | $APPXPATH/../appx -r old.file new.file [deleted.record.file] |
APPX Recover Utility: Input Filename = C:\32\DATA\ttt\PAT\Data\bb.dat Output Filename = C:\32\DATA\ttt\PAT\Data\bx.dat
File Header Information: File Organization = 3 ( Fixed Length Records ) Record Length = 19 UnixIO Version = 2 Freelist Starting Address = 0 End of File Address = 617
Recover Completion Information: Active Records Copied = 3 Deleted Records Removed = 0 Overhead Records Removed = 0 File Errors Found = 0 New Eof Seek Location = 617 Space Allocation Reduction = 0 bytes* You MUST create a new '.key' file that matches your new '.dat' file!
su
to the appx
UserID.
2) Call up a MS-DOS Command box (or Unix Command prompt). Change directories:
cd {appx.exe.folder}\data\DDD\AAA\Data
... where ...
{appx.exe.folder} is the directory containing your 'appx.exe' engine, FILE.*
files out of the way (but keeps them around a while in case they're needed), then moves the recovered FILE.new
into place as the new FILE.dat
.
5) Go back to Database Management (or Design File Management) for your application. Run 3)Create Files
on FILE
. This creates a new FILE.key
to go along with your recovered FILE.dat
. 13)Verify Menu, 1)Integrity
to confirm that the file is OK, and that the Active Records Copied
above equals the number reported in the Verify Integrity utility.