Help identifying transactions with no detail lines
Wondering if someone can help with my task of identifying missing detail lines in transactions.
I have a flat file that contains transaction header, transaction detail, and transaction trailer lines. These lines are identified with a 5-character line identifier "THEAD", "TDETL", and "TTAIL" at the beginning of the line. Similar to this:
How can I identify which transactions have missing TDETL lines?
In other words, a missing TDETL transaction is one where there is a THEAD and then TTAIL right after on the next line without a TDETL line in between. Here is one such example:
In those conditions, I'd like to print out the THEAD lines to a text file as well as the file name that the missing TDETL transaction was found in as I will be running this script against 1000s of files.
Is SED or GREP the proper tools to use? What would be the best way to go about this?
Last edited by vgersh99; 05-18-2010 at 06:56 PM..
Reason: code tags, please!
Just so I understand: what you're doing is looking for the line to start with "THEAD", once found save the THEAD line in variable h, reset the d variable to blank, and then go to the next line in which case you will then check that it begins with "TDETL", if it does, save the TDETL line in variable d, otherwise print the filename of the file and then variable h (which will be the THEAD line).
Is this right? Please correct me if I'm wrong or if you can explain it in better terms so that I learn.
Hi,
I am using HP Ultarium Tape drive to backup my oracle DB. Is that any command to identify the tape serial number or any other tape details that inserted into the tape drive? (2 Replies)
Hello Experts,
I need to evaluate my API performance, so need a script to get the time difference for all the transaction that has gone through my application in a day. The challenge is the multi threaded logs, so I cant just get all the Telephone Numbers and check the entering and existing... (5 Replies)
Hello All,
I have written a script which i run on admin server to display the count of transaction on rest of the service blades. here is the code
s=''
if
then
s=$1
fi
if
then
TPS=`on tswebpxmp1 snmpget -c public -v 2c 127.0.0.1:1610 1.3.6.1.4.1.12702.9.2.6.2.0 |... (0 Replies)
Hi guys, I was wondering if someone can give me a hand in helping me append transaction header line in a file at the end of the transaction detail lines.
Basically, I have a file that looks like this:
FHEAD File1
THEAD TRANS1-blah
TDETL HI1
TDETL HI2
TDETL HI3
TTAIL TRANS1-blah
THEAD... (3 Replies)
As a root user i switch to a different user say "oratest". I would like to know the details like at what time did the switch ( su - oratest ) happen.
Are there any logs to check this
Thanks. (2 Replies)
I have a problem with a submirror of the root filesystem,
in the procedure in order to unmirror the FS say:
metadetach -f d0 d20
metaroot c0t0d0s0
but, in my system the metaroot cause a segmentation fault coredump. I knew that the command modify the /etc/system and
the /etc/vfstab.
I try... (3 Replies)
I'd like to peruse a log file and from it generate another file from the first instance of "Jul 11" to the first instance of "Jul 18" within the log file. (3 Replies)