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



If reading an external file to produce an external file, what is the shortcut to write that record ..

Answer / durga g

DATA step copies records from the input file to the output
file without creating any SAS variables:

data _null_;
infile file-specification-1;
file file-specification-2;
input;
put _infile_;
run;

Is This Answer Correct ?    6 Yes 1 No

If reading an external file to produce an external file, what is the shortcut to write that record ..

Answer / ganesh

by writing Put _all_; is the easy option to produce an
external file.

Is This Answer Correct ?    1 Yes 1 No

If reading an external file to produce an external file, what is the shortcut to write that record ..

Answer / prakash hullathi

DATA step copies records from the input file to the output
file without creating any SAS variables:

data _null_;
/*To read the external taw data file*/
infile 'file-specification-1';
input var1 var2 $ var3;
/*To write the external raw data file*/
file 'file-specification-2';
put var1 var2 var3;
run;

Is This Answer Correct ?    0 Yes 0 No

If reading an external file to produce an external file, what is the shortcut to write that record ..

Answer / jothi sankar


PUT _ALL_;

Eg:

DATA
_NULL_;
SET MYDATA; --> is got from external input file
FILE OFILE<is having output file path>;

PUT _ALL_; --> is for writing values with variables

PUT (_ALL_) (+0); --> is for writing only values

RUN;


Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More SAS Interview Questions

What do you code to create a macro? : sas-macro

0 Answers  


data study; input Subj : $3. Group : $1. Dose : $4. Weight : $8. Subgroup; x= input(Weight,5.1); datalines; 001 A Low 220 2 002 A High 90 1 003 B Low 193.6 1 004 B High 165 2 005 A Low 123.4 1 ; Why does X get truncated? X shows up as 22 instead of 220,9 instead of 90 and 19.8 instead of 198? This problem doesnt happen with the values 193.6 and 123.4. This does not happen if x is read on the 5. informat instead of the 5.1 informat

2 Answers  


What are the statements in proc sql?

0 Answers  


IS SAS COMPILER OR INTERPRETER? EXPLAIN?

3 Answers   Aon Hewitt, HSBC, SCL, TCS,


If you have a data set that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variable?

16 Answers  


Describe a time when you were really stuck on a problem and how you solved it?

0 Answers   DELL,


What data sets do you need to produce the report?

2 Answers   Novartis,


How experienced are you with customized reporting and use of Data _Null_ features?

4 Answers   Oracle,


How would you delete observations with duplicate keys?

13 Answers   Accenture,


How do i read multiple spaces in datasets?

4 Answers   Quintiles,


what is hierarchy flattening? : Sas-di

0 Answers  


How do you add a prefix to some or all variables in a dataset using a SAS macro?

2 Answers  


Categories