If you are using a gzipped file (format), you can use the same SAS syntax to uncompress the data file, except that you supply a different UNIX decompression command to SAS: FILENAME indata PIPE 'gunzip -c data.gz' LRECL=192; DATA temp1; INFILE indata; INPUT specification of data input; Consult the Helpdesk at (512) 475-9400 for more information on the compression programs available.
If the statement cannot be executed, SAS sends the statement to the log file along with an error message describing why the command could not be used.
Examination of log files following submission of command files is the best way to find mistakes in a comand file.
Note that the "zcat" is specified in lowercase because it is a UNIX system command (UNIX is a case sensitive operating system).
Note that the LRECL=192 command is needed to define the file length of the compressed data file.
You must create the command file using a text editor program, just as with your text data file.
As mentioned, the command file can also contain the data.CLASS: SAS programming, PROC SQL can also be used to create new datasets from existing data.To create a new dataset in the WORK library called class_new, which contains all the variables and observations from SASHELP.How do I read dates into a SAS data set from a data file having two columns for years, two columns for the month, and two columns for the date--all adjacent to one another?Your data arrangement is already consistent with that needed to use one of the SAS date informats. SAS log files A text data file is a document that contains your data in text form.Thus in the DATA step's INPUT statement, you need only associate the six date columns with the SAS date informat of the form: INPUT birthday yymmdd6. You entered the data from some text editor into this file.