hello,
i have the following logfile. i want to extract some fields so that i get a csv that i get a csv with following structure:
for example
I`ve tried FS and RS functions, but it doesn`t work. Can you help me? Is awk the right language?
Can you Help me?
Thanks.
Logfile:
i have the following logfile. i want to extract some fields so that i get a csv that i get a csv with following structure:
Type;Table;Space;Field
for example
Insert;BSHOI.R002300T;R002900D.R002901S;INSTSCHL
I`ve tried FS and RS functions, but it doesn`t work. Can you help me? Is awk the right language?
Can you Help me?
Thanks.
Logfile:
--------------------------------------------------------------------------------
0From: 2002-09-02 06.00.00.000000
To: 2002-09-02 17.00.00.000000
0--------------------------------------------------------------------------------
Report Information:
0Work ID : #23237A.R002300T Run Number: 1 Subsystem: DB2P
Description: #23237C 2002-09-03 11.00.19
--------------------------------------------------------------------------------
0Authid: #041657
0 URID : x'069868F61443' Date : 2002-09-02 Conn Type: MA
Status : Committed Time : 07.05.46.295 Conn ID : CTL
Plan Name: A429A Auth ID: #041657 Corr ID : 0010A429A
0 ----------------------------------------------------------------------------
Type: Insert At: x'069868F61CB1' Time: 2002-09-02 07.05.46.357
Status: Committed
0 Table Name: BSHOI.R002300T DBID.OBID: (285.3)
Space Name: R002900D.R002901S DBID.PSID: (285.2)
0 Field Data: INSTSCHL KUNDENNR********** PROVKTONR* PRODART ANZBAE***
New: 900 000000153910840101 0035409800 001 15.000
0 ANZNAEW** ANZNAEZ** FILMDAT*** BILDNR ANZRATGES
New: 0.000 0.000 2002-08-29 05492 0
0 ANZRATIERT MKMABRECH MKMPVERD MKMSTORNO STRUKERMDAT
New: 0 J N 2002-09-02
0 ANLDAT**** ANLSBM AENDDAT*** AENDSBM UNTERKONTO
New: 2002-09-02 MR6522 *NULL* *NULL* 0001
0 KDNAME************************
New: *NULL*
0 BEMERKUNG***************************************************
New: *NULL*
0 Totals For: URID: x'069868F61443'
Ins: 1 Del : 0 Upd : 0
Tot: 1 Del/RI: 0 Upd/RI: 0
0 URID : x'0698690947CA' Date : 2002-09-02 Conn Type: MA
Status : Committed Time : 07.07.42.365 Conn ID : CTL
Plan Name: A429A Auth ID: #041657 Corr ID : 0022A429A
0 ----------------------------------------------------------------------------
Type: Insert At: x'069869094B3B' Time: 2002-09-02 07.07.42.369
Status: Committed
0 Table Name: BSHOI.R002300T DBID.OBID: (285.3)
Space Name: R002900D.R002901S DBID.PSID: (285.2)
0 Field Data: INSTSCHL KUNDENNR********** PROVKTONR* PRODART ANZBAE***
New: 900 000000153910920101 0035409800 001 10.000
1Date: 2002-09-03 LOG MASTER FOR DB2 - V2.3.00 Page: 2
Time: 11.19.28 Copyright BMC Software, Inc. 1995-2002
0 Detail Report, By Authid, Urid
--------------------------------------------------------------------------------
0 ANZNAEW** ANZNAEZ** FILMDAT*** BILDNR ANZRATGES
New: 0.000 0.000 2002-08-29 05494 0
0 ANZRATIERT MKMABRECH MKMPVERD MKMSTORNO STRUKERMDAT
New: 0 J N 2002-09-02
0 ANLDAT**** ANLSBM AENDDAT*** AENDSBM UNTERKONTO
New: 2002-09-02 MR6522 *NULL* *NULL* 0001
0 KDNAME************************
New: *NULL*
0 BEMERKUNG***************************************************
New: *NULL*
0 Totals For: URID: x'0698690947CA'
Ins: 1 Del : 0 Upd : 0
Tot: 1 Del/RI: 0 Upd/RI: 0
0 URID : x'0698696338E3' Date : 2002-09-02 Conn Type: MA
Status : Committed Time : 07.11.48.814 Conn ID : CTL
Plan Name: A429A Auth ID: #041657 Corr ID : 0032A429A
0 ----------------------------------------------------------------------------
Type: Insert At: x'069869633C58' Time: 2002-09-02 07.11.48.818
Status: Committed
0 Table Name: BSHOI.R002300T DBID.OBID: (285.3)
Space Name: R002900D.R002901S DBID.PSID: (285.2)
0 Field Data: INSTSCHL KUNDENNR********** PROVKTONR* PRODART ANZBAE***
New: 900 000000153910950101 0035409800 001 10.000
0 ANZNAEW** ANZNAEZ** FILMDAT*** BILDNR ANZRATGES
New: 0.000 0.000 2002-08-29 05495 0
0 ANZRATIERT MKMABRECH MKMPVERD MKMSTORNO STRUKERMDAT
New: 0 J N 2002-09-02
0 ANLDAT**** ANLSBM AENDDAT*** AENDSBM UNTERKONTO
New: 2002-09-02 MR6522 *NULL* *NULL* 0001
0 KDNAME************************
New: *NULL*
0 BEMERKUNG***************************************************
New: *NULL*
0 Totals For: URID: x'0698696338E3'
Ins: 1 Del : 0 Upd : 0
Tot: 1 Del/RI: 0 Upd/RI: 0
1Date: 2002-09-03 LOG MASTER FOR DB2 - V2.3.00 Page: 3
Time: 11.19.28 Copyright BMC Software, Inc. 1995-2002
0 Detail Report, By Authid, Urid
--------------------------------------------------------------------------------
0 URID : x'069869EEA36E' Date : 2002-09-02 Conn Type: MA
Status : Committed Time : 07.13.00.628 Conn ID : CTL
Plan Name: A429A Auth ID: #041657 Corr ID : 0010A429A
0 ----------------------------------------------------------------------------
Type: Insert At: x'069869EEBE06' Time: 2002-09-02 07.13.00.647
Status: Committed
0 Table Name: BSHOI.R002300T DBID.OBID: (285.3)
Space Name: R002900D.R002901S DBID.PSID: (285.2)
0 Field Data: INSTSCHL KUNDENNR********** PROVKTONR* PRODART ANZBAE***
New: 900 000000153911150101 0035409800 001 10.000
0 ANZNAEW** ANZNAEZ** FILMDAT*** BILDNR ANZRATGES
New: 0.000 0.000 2002-08-29 05496 0
0 ANZRATIERT MKMABRECH MKMPVERD MKMSTORNO STRUKERMDAT
New: 0 J N 2002-09-02
0 ANLDAT**** ANLSBM AENDDAT*** AENDSBM UNTERKONTO
New: 2002-09-02 MR6522 *NULL* *NULL* 0001
0 KDNAME************************
New: *NULL*
0 BEMERKUNG***************************************************
New: *NULL*
0 Totals For: URID: x'069869EEA36E'
Ins: 1 Del : 0 Upd : 0
Tot: 1 Del/RI: 0 Upd/RI: 0
0 URID : x'06986B477C4D' Date : 2002-09-02 Conn Type: MA
Status : Committed Time : 07.14.19.110 Conn ID : CTL
Plan Name: A429A Auth ID: #041657 Corr ID : 0022A429A
0 ----------------------------------------------------------------------------