appx -e=filename
(for Export) andappx -i=filename
(for Import)
... into batch scripts or crontab entries in the same way that you'd put an entry in to run an APPX process.
You'd specify -i={filename}
and -e={filename}
arguments, instead of the -a={application}
, -d={database}
, and such.
To see this argument list, run appx -u
from the Unix command line.
(See Moving Files Between Platforms for further discussion of 'Endian' byte order conversion.)
(This part's totally up to you, so no example is provided. Think of this like recording and saving a macro in Word, for playback AND EVEN EDITING IF YOU WANT TO TWEAK IT A BIT later, except that the feature is turned on before you get into APPX and you can't turn it on and off during your APPX session.)
For example:
export APPX_SCRIPT_IN=/tmp/export.script
# Run first APPX script
export APPX_SCRIPT_IN=/appx/scripts/export.script
appx 2>&1 >/dev/null
# Run second APPX script
export APPX_SCRIPT_IN=/appx/scripts/verify.script
appx 2>&1 >/dev/null
... etc.
You may be wondering what that "appx" line is doing. OK, here's the scoop.
"2>&1" says to redirect stderr into stdout. ">/dev/null" says to throw that stdout stream away. I think that's what most people do.
However, occasionally errors get reported on that stream, so IMHO it's useful to keep it, either for a few days (in case you don't notice a problem until later) or at least until the next time the script is run.
For example, to save the stdout/stderr stream until the next run of the same script, you could use a line like:
appx 2>&1 >/tmp/export.script
If you wanted to be fancy and save these by date, so that you could store a week (or more's worth at a time), you could do something like:
appx 2>&1 >/tmp/export.script.`date +"%y%m%d.M"`
That mishmash, when executed, will resolve to a filename like
/tmp/export.script.990527.0322
... which embeds the date and time of the APPX script's START of execution, into the filename.
Of course, if you do this, you'll be creating a new file in /tmp each time you run the cron entry, so be warned that you'll have to create some sort of UNIX shellscript to remove these when you no longer want them around, or remember to delete them periodically, so that /tmp doesn't fill up.