comp.soft-sys.sas - The SAS statistics package.
Hi all, I have a quick question about entering title in SAS. I have very long titles, e.g., "This is an extremely very loooooooooooong title". I would like use one 'title' command to put the title in two or three lines, instead of using multiple title commands like title1 = "...", title2 = "...", title3 = "...". A similar question is that when the labels of certain charts (bar charts) are too long, if they are written in one line, they are truncated, so I also would like to write them in multiple lines. Is there anyway to do these? Thank you!!!
Dear all: Please send me notes if you know how to solve this. I have 6 variables (ULCER,SCAR,ACR,NEO, VAC, AEOT) 9 and are coded as 'Y' or 'N' , I would like it to be recoded into one variable., say REASON with 6 values corresponding to the 6 variables when ULCER,SCAR,ACR,NEO, VAC, AEOT are in ('Y') here is my code. I wander if there are some other ways to do it? marco or sql or else? thanks. data a1; set me; if ulcer in ('Y','y') then do; ae_code =1; output; end; if scar in ('Y','y') then do; ae_code =2; output; end; if acr in ('Y','y') then do; ae_code =3; output; end; if neo in ('Y','y') then do; ae_code =4; output; end; if va in ('Y','y') then do; ae_code =5; output; end; if aeot in ('Y','y') then do ae_code =6; output; end; run;
I know this must be posted before and did find some old posts regarding to this but none of them fits the data I have in hand. So I really appreciate if someone will offer help on this. Basically, the data (.txt format) I have is exported from an Access database, with semicolon as delimiter. When I open it up with text pad, each record is spreading across multiple lines and it's not even consistent. Some are in more lines than others. Below is one example of the records. 108;"ABCD";8/10/2007 0:00:00;"ABC Company 1234 maple st Santa Ana, California ";"DEF company 5678 apple rd Brea, CA";"user";"Active" I have been looking up online but with little avail. Please help if you have experience on this. Thanks.
I am trying to input a delimited file in which some (not all) observations are on multiple lines; the number of lines is unpredictable. [SAS 9.1.3 UNIX] The following example code produces the desired output: DATA OK; INFILE DATALINES DLM="#" DSD; INPUT W X A :$13. Y Z; DATALINES; 1#2#HELLO KIDDO##8 3#4#GOODBYE KIDDO#9#7 5#6#MAMA WINS### ; RUN; CORRECT OUTPUT Obs W X A Y Z 1 1 2 HELLO KIDDO . 8 2 3 4 GOODBYE KIDDO 9 7 3 5 6 MAMA WINS . . This code reads sample data that closely resembles the actual data I'm working with: DATA NOTOK; INFILE DATALINES DLM="#" DSD; INPUT W X A :$13. Y Z; DATALINES; 1#2#HELLO KIDDO##8 3#4#GOODBYE KIDDO#9#7 5#6#MAMA WINS### ; RUN; INCORRECT OUTPUT Obs W X A Y Z 1 1 2 HELLO KIDDO . 8 2 3 4 GOODBYE . 9 3 5 6 MAMA WINS . . Note that the value for A in obs 2 has 2 errors; all other values are correct. The actual raw data set includes 37 vars and 32 obs - I can fix the problem in this case by manually deleting LFs until each obs is on a single line, but I need to produce code that will handle potentially much larger files. I have tried a number of tricks but nothing even comes close to resolving the problem. I would be most grateful for any insight. Thanks, Don