I'm wondering if you may know of a simple file based UNIX utility that can be used to store and retrieve values on a flat file, let's say i have a file called "kru", i'd like to be able to specify a request like:
while(....)
if [ kru.fld1 = $stepid ] ; then
kru.fld2 = $rec_cnt
kru.fld3 = $status_code
krul.fld4 = $file_status
fi
done
Basically i'm trying to avoid using Oracle to manage the step by step audit values for a bunch of kshells used to automate the manual load processes for an Oracle database.
Thanks very much for any inisghts! :rolleyes:
BobK
Well seems to me that there must be a pretty straight forward string based utility that could be used as a flat file database to keep track of condition codes, record counts ect for the various steps in a script.
For example let's say step1 of my oracle build script is to check the record counts of a table. I would retrieve the count and then store it by using somehting like this: file_db.step="step1", file_db.recnt=$oracnt ect.
Before loading oracle in step2 i would first check to make sure that the file_db.recnt from step1 was 0, ie:
if [ file_db.step = "step1" && file_db.recnt = 0 ] ; then
ksh load_table.ksh
else
file_db.step =j "step2"
file_db.status=1
fi
In other words, it would like like a C structure, but wrapped by some easy to use interface.