Sponsored Content
Top Forums Shell Programming and Scripting Help identifying transactions with no detail lines Post 302422550 by rookie12 on Tuesday 18th of May 2010 05:45:38 PM
Old 05-18-2010
CPU & Memory 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:

Code:
THEAD000000000200000000
TDETL0000000003000000Good
TTAIL0000000004000000

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:

Code:
THEAD000000000200000000
TTAIL0000000003000000

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!
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Getting detail out of a log file...

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)
Discussion started by: Cameron
3 Replies

2. UNIX for Advanced & Expert Users

what does metaroot in detail?

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)
Discussion started by: hugo_perez
3 Replies

3. Cybersecurity

Check login detail

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)
Discussion started by: jjoy
2 Replies

4. Shell Programming and Scripting

Append transaction header lines to same transaction's detail lines

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)
Discussion started by: rookie12
3 Replies

5. Shell Programming and Scripting

Script to take count of transactions

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)
Discussion started by: Siddheshk
0 Replies

6. UNIX for Advanced & Expert Users

Need to get the time difference for all the transactions in a day

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)
Discussion started by: samjna
5 Replies

7. Solaris

Tape Drive Detail

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)
Discussion started by: tharmendran
2 Replies
asadmin-freeze-transaction-service(1AS) 			   User Commands			   asadmin-freeze-transaction-service(1AS)

NAME
asadmin-freeze-transaction-service, freeze-transaction-service - freezes the transaction subsystem SYNOPSIS
freeze-transaction-service --user admin_user [--password admin_password][--host localhost] [--port 4848][--secure|-s] [--passwordfile file- name] [--terse=false] [--echo=false] [--interactive=true] Freezes the transaction subsystem during which time all the inflight transactions are suspended. Invoke this command before rolling back any inflight transactions. Invoking this command on an already frozen transaction subsystem has no effect. This command is supported in remote mode only. OPTIONS
--user authorized domain application server administrative username. --password password to administer the domain application server. --host machine name where the domain application server is running. --port port number of the domain application server listening for administration requests. --secure if true, uses SSL/TLS to communicate with the domain application server. --passwordfile file containing the domain application server password. --terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well- formatted data for consumption by a script. Default is false. --echo setting to true will echo the command line statement on the standard output. Default is false. --interactive if set to true (default), only the required password options are prompted. Example 1: Using freeze-transaction-service asadmin> freeze-transaction-service --user admin --password adminadmin EXIT STATUS
0 command executed successfully 1 error in executing the command asadmin-unfreeze-transaction-service(1AS), asadmin-rollback-transaction(1AS) J2EE 1.4 SDK March 2004 asadmin-freeze-transaction-service(1AS)
All times are GMT -4. The time now is 01:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy