Hi there!
I have an urgent problem: I have the following two data files:
FILE 1)
LINE HE94-100
* VELF 998
VELF 0 1505 1940 1505 2080 1495 2155 1550 2325 1560 2475 1605
VELF 2705 1730 2819 1770 3031 1864 3260 1920 3464 2001 3635 2075
VELF 3812 2181 4240 2383 4415 2475 4985 2840 5755 3205 6620 3495
VELF 8000 3885
* VELF 1038
VELF 0 1505 1925 1505 2115 1485 2335 1560 2495 1630 2755 1735
VELF 2968 1835 3193 1900 3470 2010 3693 2067 3871 2214 4315 2400
VELF 4610 2635 4961 2886 5266 2994 5970 3290 6520 3490 8000 3920
.....
LINE HE94-100
* VELF 998
VELF 0 1505 1940 1505 2080 1495 2155 1550 2325 1560 2475 1605
VELF 2705 1730 2819 1770 3031 1864 3260 1920 3464 2001 3635 2075
VELF 3812 2181 4240 2383 4415 2475 4985 2840 5755 3205 6620 3495
VELF 8000 3885
* VELF 1038
VELF 0 1505 1925 1505 2115 1485 2335 1560 2495 1630 2755 1735
VELF 2968 1835 3193 1900 3470 2010 3693 2067 3871 2214 4315 2400
VELF 4610 2635 4961 2886 5266 2994 5970 3290 6520 3490 8000 3920
.....
FILE 2)
HE94-10 1961 105548 7617653
HE94-10 1960 105526 7617666
HE94-10 1959 105505 7617678
HE94-10 1958 105483 7617691
HE94-10 1957 105462 7617704
HE94-10 1956 105440 7617717
HE94-10 1955 105419 7617730
HE94-10 1954 105398 7617744
HE94-10 1953 105376 7617756
HE94-10 1952 105354 7617769
HE94-10 1951 105333 7617782
HE94-10 1950 105312 7617795
which is LINENAME SPNT X Y
I need to create a new file using info from the above two to get something like:
LINE HE94-100
SPNT 998 105398 7617756
VELF 0 1505 1940 1505 2080 1495 2155 1550 2325 1560 2475 1605
VELF 2705 1730 2819 1770 3031 1864 3260 1920 3464 2001 3635 2075
VELF 3812 2181 4240 2383 4415 2475 4985 2840 5755 3205 6620 3495
VELF 8000 3885
.....
By doing the following:
1) replace * VELF by SPNT (same thing)from FILE 1
2) match the same line and same SPNT from file 2 and get the corresponding X Y
3) write the result into a new file :copy of file 1 + new X Y info added.
I hope this is clear.
Thansk a lot!
I have an urgent problem: I have the following two data files:
FILE 1)
LINE HE94-100
* VELF 998
VELF 0 1505 1940 1505 2080 1495 2155 1550 2325 1560 2475 1605
VELF 2705 1730 2819 1770 3031 1864 3260 1920 3464 2001 3635 2075
VELF 3812 2181 4240 2383 4415 2475 4985 2840 5755 3205 6620 3495
VELF 8000 3885
* VELF 1038
VELF 0 1505 1925 1505 2115 1485 2335 1560 2495 1630 2755 1735
VELF 2968 1835 3193 1900 3470 2010 3693 2067 3871 2214 4315 2400
VELF 4610 2635 4961 2886 5266 2994 5970 3290 6520 3490 8000 3920
.....
LINE HE94-100
* VELF 998
VELF 0 1505 1940 1505 2080 1495 2155 1550 2325 1560 2475 1605
VELF 2705 1730 2819 1770 3031 1864 3260 1920 3464 2001 3635 2075
VELF 3812 2181 4240 2383 4415 2475 4985 2840 5755 3205 6620 3495
VELF 8000 3885
* VELF 1038
VELF 0 1505 1925 1505 2115 1485 2335 1560 2495 1630 2755 1735
VELF 2968 1835 3193 1900 3470 2010 3693 2067 3871 2214 4315 2400
VELF 4610 2635 4961 2886 5266 2994 5970 3290 6520 3490 8000 3920
.....
FILE 2)
HE94-10 1961 105548 7617653
HE94-10 1960 105526 7617666
HE94-10 1959 105505 7617678
HE94-10 1958 105483 7617691
HE94-10 1957 105462 7617704
HE94-10 1956 105440 7617717
HE94-10 1955 105419 7617730
HE94-10 1954 105398 7617744
HE94-10 1953 105376 7617756
HE94-10 1952 105354 7617769
HE94-10 1951 105333 7617782
HE94-10 1950 105312 7617795
which is LINENAME SPNT X Y
I need to create a new file using info from the above two to get something like:
LINE HE94-100
SPNT 998 105398 7617756
VELF 0 1505 1940 1505 2080 1495 2155 1550 2325 1560 2475 1605
VELF 2705 1730 2819 1770 3031 1864 3260 1920 3464 2001 3635 2075
VELF 3812 2181 4240 2383 4415 2475 4985 2840 5755 3205 6620 3495
VELF 8000 3885
.....
By doing the following:
1) replace * VELF by SPNT (same thing)from FILE 1
2) match the same line and same SPNT from file 2 and get the corresponding X Y
3) write the result into a new file :copy of file 1 + new X Y info added.
I hope this is clear.
Thansk a lot!