Hi, firstly,there was a superfluous ']' in the code, I took it out in the post...
To understand awk, perhaps it helps to realize that awk statements in the main section implicitly work on a per line basis, so they are executed as if in a loop and are processing every line in the file.
Could you give an example of such a transaction log with 3 records?
Yes, after a second glance, I realized the extra "]" and when I took out, it just ran well.
Sure here is the sample set of records with 3 records instead of two.
and out of these, I just want the Account numbers as below and I dont want anymore details(& I just realized that now)
as these are the values that are stored in Oracle and Im just trying to create a look up file so that sqlloader can insert these records into the db.
Finally, thanks a bunch on your help.
regards,
PGonzalez.
Last edited by Scott; 09-25-2011 at 08:30 AM..
Reason: Code tags
To make it a bit more clear, SETT is the final part of the puzzle & is an abbreviation for SETTLEMENT. These three records have to looked at together and if any of these three i.e., AUTH(AUTHORIZATION), PRES(PRESENTMENT) & SETT(SETTLEMENT) are not there then it is considered as INCOMPLETE record. We report only on COMPLETE SETS and only when you find all these three transactions then we would want to see that ACCOUNT NUMBER.
So, if you can just print only the account numbers that have all these three types of records, then we are good.
I hope Im clear now and in case of questions, please feel free to revert back to me and I shall respond back right away.
Hello guys this is my first post in this forum. Since now ive been passive an ive only been looking for existing information. Now I could use specific help on a UNIX script i want to make that would:
1. Take 1-3 arguments.
2. Display the contents of its arguments, formatted as follows:... (7 Replies)
I have a file with 50,000 records in it, i have a requirement to use the same 50,000 records and add them 4 times to the same file to make a total of 200,000 records. I was wondering how to do this using ksh. Any help is greatly appreciated. (2 Replies)
i have a pipe delimited file with records spread in many lines.
i need to extract those records
1)having X in beginning of that record
2)and having at least one Y in beginning before other record begins
eg:
X|Rec1|
A|Rec1|
Y|Rec1|
X|Rec2|
Y|Rec2|
Z|Rec3|
X|Rec4|
M|Rec4|
... (4 Replies)
Hi All,
I have two files say file1 and file2.
I want to check the number of records in file1 and if its atleast 2 (i.e., 2 or greater than 2 ) then I have to check records in file2 .If records in file2 is atleast 1 (i.e. if its not empty ) i have to set some conditions .
Could you pls... (3 Replies)
I have two files one (numbers file)contains the numbers(approximately 30000) and the other file(record file) contains the records(approximately 40000)which may or may not contain the numbers from that file.
I want to seperate the records which has the field 1=(any of the number from numbers... (15 Replies)