In SAS on Unix, how can I import a data file into non-interactive sessions?
SAS can import database, spreadsheet, or delimited ASCII
files using the PROC IMPORT procedure. In Unix,
PROC IMPORT assumes an X Window session; thus,
you must use the -noterminal option when running a SAS
command file with PROC IMPORT in non-interactive,
background, or batch mode.
Suppose you have a SAS command file named myimport.sas
with the lines below. It imports an external data file,
mydata.dat, from the working directory, and generates a
permanent SAS system file, mydata.sas7bdat, in the
~/sasdata directory:
To execute the file in non-interactive mode, at the Unix prompt, enter:
sas -noterminal myimport.sasFor more about statistical and mathematical software, email the UITS Stat/Math Center, visit the center's web page, or phone 812-855-4724 (IUB) or 317-278-4740 (IUPUI). The center is located in Bloomington at 410 N. Park Avenue, and is open for consultation by appointment Monday-Friday 9am-5pm.
Last modified on May 06, 2011.







