comp.soft-sys.sas - The SAS statistics package.
options yearcutoff= 1920; data hosp ; input @1 ID 2. @5 ADMIT MMDDYY8. @19 DISCHRG MMDDYY8. @30 COST dollar8.; format admit dischrg mmddyy10. cost dollar8.; datalines; 78 03/23/2008 03/27/2008 12345 68 03/21/2008 03/24/2008 22345 98 04/23/2008 04/27/2008 42345 75 05/23/2008 05/27/2008 52345 56 03/02/2008 03/17/2008 62345 90 02/23/2008 02/27/2008 82345 45 04/23/2008 04/26/2008 72345 53 01/23/2008 01/27/2008 92345 67 03/23/2008 03/28/2008 11345 ; run; But when I run this program, instead of 03/23/2008, I am getting 03/23/2002 Can somebody explain why, and give me the solution. Any help or suggestion is appreciated.
Hi, Is there anyone know how to use proc import to read in a delimited file with some records having two lines? Most of the records in the file just takes one line, but 3 or 4 of them takes two lines and there is a '+' at the end of the first line to separate it from the second line. What I'm doing now is manually removing the '+' first and moving the second line to the end of the first line. Is there a way for Proc import to recognize '+' sign and read in two lines as one record? Here is an shorted example of the raw data (the real data line is much longer, having 50 variables) -->first obs: (it takes only one line in raw data) x|01|11|1901|2|x|.|2111|LOS ANGELES|CA|90007|(326) 391-2489|0 -->second obs:(it takes two lines in raw data, and using '+' sign to separate the lines; -->first line: xxxx|01|01|1901|1|xxx|.|2555|LOS ANGELES|CA|90007|(326) 391-276+ -->second line: 3|0 Any help will be appreciated.
Hi there, filename xx pipe "dir/b %sysfunc(pathname(WORK))\*.*"; data _null_; infile xx; input; put _infile_; run; The above doesn't work, and I believe the reason is that the directory name has spaces in it. On DOS window, I can type in dir/b "C:\WINNT\Temp\SAS Temporary Files\_TD2032\*.*" to get the list of the files, but how I can add double quote in the pipe? Thanks Ya
Group: I have a problem reading DOS directories that contain spaces: example code: any ideas on this? %let pdriver=C:\SasDev\pgm directories\p101 programs; %let ddir=&pdriver||' '; filename DIRLIST pipe "dir &ddir /s"; data _in_; length dir_info $256; infile dirlist length=reclen; input dir_info $varying256. reclen; run;