Dear List
I have a very large file basically it is logfile generated by sql
loader......... In the production environment this file can have one
million/ two million data. In this  file there are 4 particular lines which
i need to extract from this log file.

*Total logical records skipped:          0
Total logical records read:          4830
Total logical records rejected:        51
Total logical records discarded:     4760
*
These four lines stayed at the bottom of the. Now if I use a filehandel to
open the file and stored it contents in an array and after that I make a
search to find these 4 lines then it will take lot of times to get output.
So is there any other way where I dont need to store the file in a array and
I can directly search the file and when I find these lines I can store these
lines in some array or variables. I am pesting part of the file here.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

SQL*Loader: Release 9.2.0.1.0 - Production on Tue Feb 5 10:58:04 2008

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Control File:   FINAL.ctl
Data File:      FINAL.DAT
  Bad File:     FINAL.bad
  Discard File: FINAL.dsc
 (Allow all discards)

Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array:     64 rows, maximum of 256000 bytes
Continuation:    none specified
Path used:      Conventional

Table DIM_DIAL_DIGIT, loaded when ISO_COUNTRY_CODE = 0X54554e(character
'TUN')
Insert option in effect for this table: APPEND

   Column Name                  Position   Len  Term Encl Datatype
------------------------------ ---------- ----- ---- ----
---------------------
DIAL_DIGIT_KEY                      FIRST     *   ;  O(")
CHARACTER
BU_KEY                               NEXT     *   ;  O(")
CHARACTER
    NULL if BU_KEY = 0X4e554c4c(character 'NULL')
NOP_ID_KEY                           NEXT     *   ;  O(")
CHARACTER
SDCA_LOCATION_CODE                   NEXT     *   ;  O(")
CHARACTER
TARGET_REGION_DESC                   NEXT     *   ;  O(")
CHARACTER
TARGET_COUNTRY_CODE                  NEXT     *   ;  O(")
CHARACTER
    NULL if TARGET_COUNTRY_CODE = 0X4e554c4c(character 'NULL')
TARGET_COUNTRY_DESC                  NEXT     *   ;  O(")
CHARACTER
LDCA_NAME                            NEXT     *   ;  O(")
CHARACTER
SDCA_NAME                            NEXT     *   ;  O(")
CHARACTER
LDCC_X_COORD                         NEXT     *   ;  O(")
CHARACTER
    NULL if LDCC_X_COORD = 0X4e554c4c(character 'NULL')
LDCC_Y_COORD                         NEXT     *   ;  O(")
CHARACTER
    NULL if LDCC_Y_COORD = 0X4e554c4c(character 'NULL')
SDCC_X_COORD                         NEXT     *   ;  O(")
CHARACTER
    NULL if SDCC_X_COORD = 0X4e554c4c(character 'NULL')
SDCC_Y_COORD                         NEXT     *   ;  O(")
CHARACTER
    NULL if SDCC_Y_COORD = 0X4e554c4c(character 'NULL')
POPULATION_DATE_TIME                 NEXT     *   ;  O(") DATE MM/DD/YYYY
HH24:MI:SS
    NULL if POPULATION_DATE_TIME = 0X4e554c4c(character 'NULL')
ISO_COUNTRY_CODE                     NEXT     *   ;  O(")
CHARACTER
HOTLIST_IND                          NEXT     *   ;  O(")
CHARACTER
BLACKLIST_IND                        NEXT     *   ;  O(")
CHARACTER
UPDATE_DATE_TIME                     NEXT     *   ;  O(") DATE MM/DD/YYYY
HH24:MI:SS
    NULL if UPDATE_DATE_TIME = 0X4e554c4c(character 'NULL')
EVENT_TYPE_KEY                       NEXT     *   ;  O(")
CHARACTER
    NULL if EVENT_TYPE_KEY = 0X4e554c4c(character 'NULL')
PROVIDER_DESCRIPTION                 NEXT     *   ;  O(")
CHARACTER
DM_IND                               NEXT     *   ;  O(")
CHARACTER
DIAL_DIGIT_OPERATOR_TYPE             NEXT     *   ;  O(")
CHARACTER
CALL_DIRECTION_KEY                   NEXT     *   ;  O(")
CHARACTER
    NULL if CALL_DIRECTION_KEY = 0X4e554c4c(character 'NULL')
DIAL_DIGIT_DESCRIPTION               NEXT     *   ;  O(") CHARACTER   Record
1: Discarded - failed all WHEN clauses.
FORCE_RI_IND                         NEXT     *   ;  O(")
CHARACTER
TEST_CALL_IND                        NEXT     *   ;  O(") CHARACTER

Record 1: Discarded - failed all WHEN clauses.
Record 2: Discarded - failed all WHEN clauses.
Record 3: Discarded - failed all WHEN clauses.
Record 4: Discarded - failed all WHEN clauses.
Record 5: Discarded - failed all WHEN clauses.
Record 6: Discarded - failed all WHEN clauses.
......................................
.........................................
............................................
Record 482500: Discarded - failed all WHEN clauses.
Record 485001: Discarded - failed all WHEN clauses.
Record 485002: Discarded - failed all WHEN clauses.
Record 485003: Discarded - failed all WHEN clauses.
Record 485004: Discarded - failed all WHEN clauses.
Record 231: Rejected - Error on table DIM_DIAL_DIGIT.
ORA-00001: unique constraint (SCOTT.SYS_C003608) violated
........................................
............................................

Record 232: Rejected - Error on table DIM_DIAL_DIGIT.
ORA-00001: unique constraint (SCOTT.SYS_C003608) violated

Record 233: Rejected - Error on table DIM_DIAL_DIGIT.
ORA-00001: unique constraint (SCOTT.SYS_C003608) violated

Record 234: Rejected - Error on table DIM_DIAL_DIGIT.
ORA-00001: unique constraint (SCOTT.SYS_C003608) violated

Record 235: Rejected - Error on table DIM_DIAL_DIGIT.
ORA-00001: unique constraint (SCOTT.SYS_C003608) violated

Record 236: Rejected - Error on table DIM_DIAL_DIGIT.
ORA-00001: unique constraint (SCOTT.SYS_C003608) violated


MAXIMUM ERROR COUNT EXCEEDED - Above statistics reflect partial run.

Table DIM_DIAL_DIGIT:
  0 Rows successfully loaded.
  51 Rows not loaded due to data errors.
  4760 Rows not loaded because all WHEN clauses were failed.
  0 Rows not loaded because all fields were null.


Space allocated for bind array:                 254904 bytes(38 rows)
Read   buffer bytes: 1048576

*Total logical records skipped:          0   *--------->*
Total logical records read:          4830
Total logical records rejected:        51
Total logical records discarded:     4760  ------->  these are the four
lines i need to extract.*

Run began on Tue Feb 05 10:58:04 2008
Run ended on Tue Feb 05 10:58:04 2008

Elapsed time was:     00:00:00.28
CPU time was:         00:00:00.11

Thanks & Regards in advance
Anirban Adhikary.

Reply via email to