How to get any kind of data in SAS? Is it possible to take
data from notepad in SAS?

Answer Posted / sas29

Data sample_accounts;
INPUT Account 1-7 OpenDate $ 9-17 StatusCode $ 21-22
CreditLimit 25-29;
CARDS;
1234670 11-Sep-04 Z 2000
1234671 12-Sep-04 3000
1234672 13-Sep-04 Z 2500
1234673 14-Sep-04 T 3200
1234674 15-Sep-04 8000
run;


method1
--------------------------
Data sample_accounts;
INFILE "C:\Mydata\sample_accounts.txt";
INPUT Account 1-7 OpenDate $ 9-17 StatusCode $ 21-22
CreditLimit 25-29;
RUN;

method 2
-----------------------------------
filename sacc "D:\Mydata\sample_accounts.txt";
Data sample_accounts;
INFILE sacc ;
INPUT Account 1-7 OpenDate $ 9-17 StatusCode $ 21-22
CreditLimit 25-29;
RUN;

method 3;
use proc import:

method 4:
use proc cimport for xpt files into sas

Is This Answer Correct ?    28 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What’s the difference between var b1 – b3 and var b1 — b3?

826


describe how to adjust the performance of data integrator? : Sas-di

563


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

616


What are SAS/ACCESS and SAS/CONNECT?

632


What are the difference between sas functions and procedures?

640






how can you put a "trace" in your program? : Sas programming

579


What function CATX syntax does?

689


What are the scrubbing procedures in sas?

573


What are the uses of sas?

707


what is sas olap server? : Sas-di

689


What do the SAS log messages "numeric values have been converted to character" mean?

888


what is SAS OPTIMIZATION?

1817


Explain the main difference between the sas procedures and functions? : Sas-administrator

539


Mention what is PROC in SAS?

603


Explain what Proc glm does?

637