If reading an external file to produce an external file,
what is the shortcut to write that record without coding
every single variable on the record?
Answers were Sorted based on User's Feedback
Answer / sumit
data _null_;
infile 'path';
input;
file 'destination path';
put _infile_;
run;
Is This Answer Correct ? | 16 Yes | 2 No |
Answer / jim
filename indata 'c:\test_input.txt';
data _null_;
infile indata;
file 'c:\test_output.txt';
input;
put _infile_;
run;
Is This Answer Correct ? | 11 Yes | 2 No |
Answer / sunymuny
A PUT Statement using a Variable _all_ can be used to
achieve this task. where we wont have to mention all the
variable names for output using put statement.
Is This Answer Correct ? | 4 Yes | 4 No |
Answer / prakhar sadafal
Use the _infile_ option in the put statement
view sourceprint?
filename some 'c:cool.dat';
filename cool1 'c:cool1.dat';
data _null_;
infile some;
input some;
file cool1;
put _infile_;
run;
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / selvi
_all_ - Write all var present in Dataset including computed
variables also.
_input_- write only those variables read from input file
Is This Answer Correct ? | 0 Yes | 3 No |
Answer / nandu
data test ;
infile "Path";
input var1 var2 var3 ;
file print 'path';
put @1 var1 @10 var2 ;
run;
Is This Answer Correct ? | 0 Yes | 5 No |
what is the difference between unique key and primary key? : Sas-di
How can you limit the variables written to output dataset in data step?
What is the role of sas grid administrator? : sas-grid-administration
I have a dataset with variables empid and doj how to calculate retirement age?
what is the difference between nodup and nodupkey options? : Sas programming
Do you need to combine data sets? How should you combine data sets– MERGE or SET statements in DATA steps,PROC APPEND,PROC SQL?
what is the SAS/ACCESS and SAS/CONNECT?
9 Answers Accenture, iFlex, TCS,
what is sas? is a package or tool? give me introduction about sas?
What statement do you code to write the record to the file?
What is the function of Stop statement in a SAS Program?
There is a field containing a date. It needs to be displayed in the format “ddmonyy” if it’s before 1975,”dd mon ccyy” if it’s after 1985, and as ‘disco years’ if its between 1975 and 1985. How would you accomplish this in data step code? Using only PROC FORMAT.
What sas features do you use to check errors and data validation?