Hi Team,
I am Tasin. I have a query related to external raw files.
Query:- There are two external raw files. 1st file contains only the descriptor portion (Heading only) and 2nd raw file contains only data portion. How can we combined these two file into single file using data step or SQL.
I am trying to expalin the query below.
There are two external raw files (.txt).
File1.txt = It contains only Descriptor portion (Column Name)
ex- EmpId Name
File2.txt = It contains only Data portion
ex-
101 Tasin
102 Andy
103 Ted
104 Mikael
105 Senastien
Now we have to combined these two extenal raw data into single dataset.
output :-
EmpId Name
101 Tasin
102 Vijay
103 Arul
104 Arvind
105 Malaye
-------------------------------------------------------
I tried with data step as shown below.
Data Combine;
infile " path File2.txt"; /* This file contains data portion only so NO PROBLEM*/
input EmpID Name$; /* Here we write normally variables name manually. Here need to read variables from RAW File1, which contains only variables*/
run;
Problem is in INPUT statement. So here, we need to think only on INPUT statement that how can we fetch the columns from FILE1?
Please help me. My Email id = <redacted>
... View more