01-02-2014 03:50 AM
IF you want to re-arrange the variables in your data set then any of the following statements can be used for that purpose: ATTRIB, ARRAY, FORMAT, INFORMAT, LENGTH, and RETAIN
But these used be used before any SET/MERGE/UPDATE statement in the DATA step.
data test ;
input a b c;
1 2 3
4 5 6
output: Obs a b c
1 1 2 3
2 4 5 6
length b 8;
Obs b a c
1 2 1 3
2 5 4 6
you can also confirm the change in position of variables through Proc contents.
01-02-2014 04:20 AM
You need to tell us what format you want your input data to be in, and what SAS environment you are using:
Some input format examples:
CSV or Tab delimited files - these are just a special case of 'raw' data files and easily managed depending on your SAS environment.
Excel - Enterprise Guide has an inport utility, otherwise you need SAS Access to PC File Formats (a separately licensed SAS product)
ODBC for SQL Server or some other relational database - the relevant SAS Access product needs to be licensed.
If you are using Enterprise Guide to access a remote SAS server you must be able to 'see' your input data from the server (using a URL) or have the data on your PC
Please be much more specific about your requirements.
Richard temporarily back in Oz