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 / pratik

proc import
datafile='D:\Dropbox\SAS\testfile1.txt'
out=data_imported dbms=dlm replace;
getnames=NO;
run;

proc export
data=data_imported
outfile='D:\Dropbox\SAS\testfile2.txt' replace;
run;

Is This Answer Correct ?    7 Yes 0 No

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

Answer / learning sas

FILENAME EXTERNAL1 'PATH';
FILENAME EXTERNAL2 'PATH';
Proc import DATAFILE=EXTERNAL1
OUT=XYZ REPLACE;
GETNAMES=YES;
RUN;
DATA _NULL_;
FILE EXTERNAL2;
SET XYZ;
PUT _ALL_;
RUN;

Is This Answer Correct ?    4 Yes 0 No

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

Answer / sas developer

DATA _NULL_; 
INFILE 'C:FILESINPUT.TXT' MISSOVER TRUNCOVER; 
INPUT BLOCK $100.; /* This is length of the record. Change to suit your file*/
FILE 'C:FILESOUTPUT.TXT';
PUT BLOCK;
RUN;

Is This Answer Correct ?    1 Yes 0 No

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

Answer / harshit

use proc export

Is This Answer Correct ?    1 Yes 5 No

Post New Answer

More SAS Interview Questions

what is SAS OPTIMIZATION?

0 Answers  


How substr function works in sas?

0 Answers  


How would you identify a macro variable? : sas-macro

0 Answers  


how do you derive descriptive statistics?

1 Answers   Accenture, Quintiles,


what is the difference between informat$8. $char8.

3 Answers   SAS,






What are the joins,types of joins and thier functions?

7 Answers   SAS,


What versions of SAS have you used (on which platforms)?

0 Answers   Quintiles,


What SAS statements would you code to read an external raw data file to a DATA step?

10 Answers   NIIT,


Hot to suppress characters from a given string?

4 Answers   CTS,


explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di

0 Answers  


What is the difference between verification and validation?

9 Answers   Oracle,


· What are some good SAS programming practices for processing very large data sets?

6 Answers   Quintiles,


Categories