Hi mates,
I need a way to create a three positional input due the following txt file:
F 015 3 20151029 019 0100 00000000000000 20151029 102004 20151029 47,28 1530215000019
591 PAGAMENTO INCLU
019 0100 00000000000000 20151029 102155 20151029 212,50 1530215000020
. .
018 0023 00000000000000 20151029 103258 20151029 538,85 1530215000021
The first line will start with the F in the column1, 015 in the column 2 and 3 in the column3, all the other values should match for the first row, but in the third row the "019" should be at the same position of "019" in the first line.
To understant what i'm saying, the first textbox is how my raw file is in SAS, the second textbox bellow is represented on how the third row should begin:
F 015 3 20151029 019 0100 00000000000000 20151029 102004 20151029 47,28 1530215000019
591 PAGAMENTO INCLU
019 0100 00000000000000 20151029 102155 20151029 212,50 1530215000020
. .
018 0023 00000000000000 20151029 103258 20151029 538,85 1530215000021
So what i want is to read the first and the second line and print the into the first line.
The third row should begin to read or print the value at the same column of the "019" and put missing to the first 4 columns.
The final output i'm trying to make is this:
F| 015| 3| 20151029 | 019 | 0100 | 00000000000000| 20151029 |102004| 20151029| 47,28 |1530215000019| 591| PAYMENT
| | | | 019 | 0100 | 00000000000000| 20151029 |102155| 20151029| 212,50 |1530215000020| 591| PAYMENT
| | | | 018 | 0023 | 00000012344534| 20151029 |103258| 20151029| 538,85 |1530215000021| |
My code is this:
DATA TEST;
/* INFILE "/home/re43526/quickview/TI47_*.txt"*/
/* TRUNCOVER FIRSTOBS=11;*/
INPUT F1 $1-4
F2 $4-8
F3 $22-25
F4 $26-34
F5 $43-58
F6 $
F7 $
F8 $
F9 $
F10 $115-135
#2
F11 $1-4
F12 $4-50;
CARDS;
F 015 3 20151029 019 0100 00000000000000 20151029 102004 20151029 47,28 1530215000019
591 PAYMENT
019 0100 00000000000000 20151029 102155 20151029 212,50 1530215000020
. .
018 0023 00000000000000 20151029 103258 20151029 538,85 1530215000021
;
RUN;
But i'm having a lot trouble to make this.
Can you help me ?
Thanks in advance
... View more