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 and what are the functions? : Sas-administrator

0 Answers  


what techniques and/or procs do you use for tables? : Sas programming

0 Answers  


Why is SAS considered self-documenting?

1 Answers   Quintiles,


what do the mod and int function do? What do the pad and dim functions do? : Sas programming

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,


How would you code a macro statement to produce information on the sas log? This statement can be coded anywhere? : sas-macro

0 Answers  


how to delete the duplicate columns permanently in SQL

2 Answers   Satyam,


Please write codes to merge two datasets and keep every record in the first dataset.

1 Answers  


what is p-value

3 Answers   Accenture, Quintiles, Sristek,


What is the order of application for output data set options, input data set options and SAS statements?

0 Answers   Quintiles,


what does .. meant in sas macros

3 Answers   D&B,


Differentiate between sas functions and sas procedures.

0 Answers  


Categories