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 are the best practices to process the large data sets in sas programming? : Sas-administrator

0 Answers  


1.What is the difference between _NULL_ , _ALL_, and _N_? 2.What are the uses of _NULL_ using in Data Steps? Can we _NULL_ in Proc Steps also? 3.How do call the macro variable in Data Steps? 4.How to construct Pivot tables in Excel Using SAS?

3 Answers  


what is the frontend and backend of sas? Is sas is a progaming langauge or tool? on which langauge sas depends?

3 Answers  


Explain how merging helps to combine data sets.

0 Answers  


How the Excel file enter into the SAS environment without Code of Infile & Import procs,if i have no file Conversion?

3 Answers   Reddy Labs,






what are 5 ways to perform a table lookup in sas? : Sas-administrator

0 Answers  


What is the difference between where and if statement?

0 Answers  


how do i get last 10obs from a dataset when we don't know about the number of obsevations in that dataset?

7 Answers   TCS,


what is sas database server? : Sas-di

0 Answers  


Intern stastical programmer written test

0 Answers  


What makes sas stand out to be the best over other data analytics tools?

0 Answers  


How do I CREATE an external dataset with sas code? I would like to create within a sascode a non-exsistent textfile on the host. So I am not forced to create the file befor filling it.

2 Answers  


Categories