Hi,
I have two text files. Need to create a third text file extracting specific data from first two existing files..
Text File 1: Format contains:
SQL*Loader: Release 10.2.0.1.0 - Production on Wed Aug 4 21:06:34 2010
some text ............so on...and somwhere text like:
Record 1: Rejected - Error on table STAGE_DEN_CLM_HDR, column PAT_BRTH_DT.ORA-01861: literal does not match format string
......
......
Record 43: Rejected - Error on table STAGE_GEN_CLM_HDR, column PAT_BRTH_DT ORA-01861: literal does not match format string.
Text 2: Format contains:
214 ....0100119400831FSUBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
214....010011940789546SUBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Text 3: should contain like this.
All the Text 2 information should come in Text file3. Alsoo condition is>
I should get all the record errors in Text file 1 should appear in Text file 3.
Format should be like:
214 ....0100119400831FSUBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Rejected - Error on table STAGE_DEN_CLM_HDR, column PAT_BRTH_DT.ORA-01861: literal does not match format string
214....010011940789546SUBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Rejected - Error on table STAGE_GEN_CLM_HDR, column PAT_BRTH_DT ORA-01861: literal does not match format string.
This should work for any number of record errors in text 1.
Note: a)In Text file 2, All records start with 214 and ends with XXXXX...
b) In Text File 1, Record # is the word followed by error in record.
Request is to create a Text file3 with record failures.
Please help me on this. Hope i get some help today.
Thanks and Regards,
Shashi.