buccaneers
Programmer
Hello Gurus,
I have one question if i may ask.
Using awk/nawk
can one write a report such that one position the output within output file. Here is what i am trying to do. I have following files :-
tbldef containing following lines
Curr_Dt datetime Not Null
Pcr_ID string(15) Not Null
Tran_ID string(15) Not Null
Unts_No integer Not Null
Prcg_ID integer Not Null
Pcr_Nme string(30) Not Null
Wav_Ind string(1) Not Null
Flx_Ind string(1) Not Null
Rt_Cd string(2) Null
St_flag string(1) null
tbldat containing
5/31/2004 1:00:00.000 PM~~999999999 ~~1 ~~10~~25~~Test~~Y~~N~~CC~1
5/31/2004 1:30:50.000 PM~~999999991 ~~4 ~~45~~10~~Test1~~N~~N~~BB~0
5/31/2004 1:35:45.000 PM~~999999292 ~~2 ~~30~~15~~Test2~~N~~Y~~AA~1
I want the output to be written in the format specified as
Curr_Dt : 5/31/2004 1:00:00.000 PM : 5/31/2004 1:30:50.000 PM : 5/31/2004 1:35:45.000 PM
Pcr_ID : 999999999 : 999999991 : 999999292
Tran_ID : 1 : 4 : 2
Unts_No : 10 : 45 : 30
Prcg_ID : 25 : 10 : 15
Pcr_Nme : Test : Test1 : Test2
Wav_Ind : Y : N : N
Flx_Ind : N : N : Y
Rt_Cd : CC : BB : AA
St_flag : 1 : 0 : 1
NOTE :- You may not be able to see the fixed length between the field name and ":" cause of HTML formatiing. Pls copy it to notepad or any test editor for the output that is expected.
Is it possible with awk. If so how ? i have been breaking my head over it to noavail.
TIA
I have one question if i may ask.
Using awk/nawk
can one write a report such that one position the output within output file. Here is what i am trying to do. I have following files :-
tbldef containing following lines
Curr_Dt datetime Not Null
Pcr_ID string(15) Not Null
Tran_ID string(15) Not Null
Unts_No integer Not Null
Prcg_ID integer Not Null
Pcr_Nme string(30) Not Null
Wav_Ind string(1) Not Null
Flx_Ind string(1) Not Null
Rt_Cd string(2) Null
St_flag string(1) null
tbldat containing
5/31/2004 1:00:00.000 PM~~999999999 ~~1 ~~10~~25~~Test~~Y~~N~~CC~1
5/31/2004 1:30:50.000 PM~~999999991 ~~4 ~~45~~10~~Test1~~N~~N~~BB~0
5/31/2004 1:35:45.000 PM~~999999292 ~~2 ~~30~~15~~Test2~~N~~Y~~AA~1
I want the output to be written in the format specified as
Curr_Dt : 5/31/2004 1:00:00.000 PM : 5/31/2004 1:30:50.000 PM : 5/31/2004 1:35:45.000 PM
Pcr_ID : 999999999 : 999999991 : 999999292
Tran_ID : 1 : 4 : 2
Unts_No : 10 : 45 : 30
Prcg_ID : 25 : 10 : 15
Pcr_Nme : Test : Test1 : Test2
Wav_Ind : Y : N : N
Flx_Ind : N : N : Y
Rt_Cd : CC : BB : AA
St_flag : 1 : 0 : 1
NOTE :- You may not be able to see the fixed length between the field name and ":" cause of HTML formatiing. Pls copy it to notepad or any test editor for the output that is expected.
Is it possible with awk. If so how ? i have been breaking my head over it to noavail.
TIA