Read the error and its values from log file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Read the error and its values from log file
# 1  
Old 07-23-2009
Power Read the error and its values from log file


Using informatica tool am loding records from source DB to target DB. While loading some records getting rejected due to some reason. Informatica will capture those rejected records in session log file.now the session log ll be available with rejected records and the reason for the rejection as below

this is the reason for the error existing in log file

ORA-12899: value too large for column "STN"."STN_SAP_MATERIAL_ATTR"."SMA_STD_DESCR" (actual: 19, maximum: 18)
.
.
.
these are the values for the rejected fields:
2009-07-09 15:38:23 : INFO : (5439 | WRITER_1_*_1) : (IS | UDEV811_2_IS) : NDIP_DEV_811_N1 : CMN_1053 : : Rowdata: ( RowType=0(insert) Src Rowid=129406 Targ Rowid=129406
SMA_NET_WEIGHT (SMA_NET_WEIGHT: Double: ) : "0.001"
SMA_UNIT_OF_WT (SMA_UNIT_OF_WT: UniChar.3: ) : "KG"
SMA_VOLUME (SMA_VOLUMESmilieouble: ): "0.001"
SMA_VOLUMEUNIT (SMA_VOLUMEUNIT: UniChar.3: ): "M3"
SMA_EANUPC (SMA_EANUPC:UniChar.18: ): ""
SMA_IND_SECTOR (SMA_IND_SECTOR: UniChar.1 : ) : "A"
SMA_BASE_UOM (SMA_BASE_UOM: UniChar.3: ): "ST"
SMA_COMPETITOR (SMA_COMPETITOR: UniChar.10: ) : ""
)

...........unwanted details.....again above mentioned things ll come.


between both the required details , some not required data also there.

We can read the reason for the rejection using the value ORA- or the tablename mentioned in the same line.
we can jump to the row value details using the keyword Targ Rowid and from next line we can get the values for each fields and should read the values till the close bracket ")".

I have to loop through the whole session log file to get all the rejected rored with reason. and i want the rejection reason and the values in single row and next record's rejection reason and values in next line ... an so on , in new file.

shell script is preferable dude

Plz plz help me on this...
# 2  
Old 07-23-2009
Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

Proceed here:

https://www.unix.com/shell-programmin...so-urgent.html

The UNIX and Linux Forums.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Read in Multiple log files and output selected variables and values to cvs file

I have several problems with my problems: I hope you can help me. 1) the If else statement I am getting an error message. My syntax must be incorrect because the entire statement is throwing an error. For example in filew.log if these items don't exist Memsize, SASFoundation and also if... (0 Replies)
Discussion started by: dellanicholson
0 Replies

2. Shell Programming and Scripting

awk file to read values from Db2 table replacing hard coded values

Hi, I want to replace a chain of if-else statement in an old AWK file with values from Db2 table or CSV file. The part of code is below... if (start_new_rec=="true"){ exclude_user="false"; user=toupper($6); match(user, "XXXXX."); if (RSTART ==2 ) { ... (9 Replies)
Discussion started by: asandy1234
9 Replies

3. Shell Programming and Scripting

Read values from second file in awk

Hello Friends, I have written a script like the following, which finds some logs and fetchs some desired rows and then calculate average processing time of a spesific application. if then echo echo "----- There are three arguments which is expected to run this script! ... (5 Replies)
Discussion started by: EAGL€
5 Replies

4. Shell Programming and Scripting

Read record from the text file contain multiple separated values & assign those values to variables

I have a file containing multiple values, some of them are pipe separated which are to be read as separate values and some of them are single value all are these need to store in variables. I need to read this file which is an input to my script Config.txt file name, first path, second... (7 Replies)
Discussion started by: ketanraut
7 Replies

5. Shell Programming and Scripting

Read values from file.

I have a config file of this format: Company= Alpha Tech From Email = AlphaTech@Alphatech.com Pass = Passowrd To Email = abc@hotmail.com Smtp=smtp.live.com:587 I want to read these values from this file and use in a command to send email. I am trying grep but it gives full line. I just... (8 Replies)
Discussion started by: kashif.live
8 Replies

6. Shell Programming and Scripting

How to Read different values from external file?

Hi , I am new to this scripting , I am facing an issue like how to read different values from external file by using different variables, In script I supposed to declare var 1 var 2 var 3 I know how to call this variables from external file (I am using awk command by giving same... (3 Replies)
Discussion started by: chandini
3 Replies

7. Shell Programming and Scripting

Read values from a file

Hi , I have a file with the following content I need the read the year and reporting from this file and store them in variables. I understand that we can read the file delimited by'=' but not sure how to extract the values correctly. Thanks in advance Regards (3 Replies)
Discussion started by: w020637
3 Replies

8. Shell Programming and Scripting

how to read only the first two values from a file in unix

Hi, I'm new to unix.. I need to read only the first two values from a file that contains many data....My record is like this FTG_ver_num=7.0 RUN_ID=2 $$tgt_envrnmt_cd=FTG $$WRK_FLW_CD=NPL I need oly the values of ETG_ver_num and RUN_ID. i.e) output to be 7.0 and 2 The code i used... (2 Replies)
Discussion started by: raghulshekar
2 Replies

9. Shell Programming and Scripting

how do I pass or read values from file ?

Hi one & All , My Need is to Create 64 Partition and create File System in Linux. I have the Script ... for((a=0;a<=63;a++)) do fdisk /dev/cciss/c0d$a done for((a=0;a<=63;a++)) do mkfs.ext2 /dec/cciss/'c0d'$a'p1' done the moment I run the Script I get the Prompt ... Command... (1 Reply)
Discussion started by: nix-kid
1 Replies

10. UNIX for Dummies Questions & Answers

How can I read variable values from file?

Hi, I want to pratmeterze my scripts like, my confRsync file contains varibale values for 1. host 2. Destination and 3. source like this, I want to read this values from this and assing to my makeRsyn.sh file's varibales. how to do this? (1 Reply)
Discussion started by: redlotus72
1 Replies
Login or Register to Ask a Question