Valid in: | DATA step |
Category: | File-handling |
Type: | Executable |
put 132*'_';
If you follow a quotation mark with X, SAS interprets the text string as a hexadecimal constant.
If you use single quotation (`) or double quotation marks (“) together (with no space in between them) as the string of text, SAS will output a single quotation mark ( ') or double quotation mark (“), respectively.
data _null_; input name $ 1-10 sex $ 12 age 15-16; put name sex age; datalines; Joseph M 13 Mitchel M 14 Sue Ellen F 11 ;
data _null_; input idno name $ startwght; put name 'weighs ' startwght +(-1) '.'; datalines; 032 David 180 049 Amelia 145 219 Alan 210 ;
data _null_; input salesrep : $10. tot : comma6. date : date9.; put 'Week of ' date : worddate15. salesrep : $12. 'sales were ' tot : dollar9. + (-1) '.'; datalines; Wong 15,300 12OCT2004 Hoffman 9,600 12OCT2004 ;
data _null_; input salesrep : $10. tot : comma6. date : date9.; file log delimiter=" " dsd; put 'Week of ' date ~ worddate15. salesrep ~ $12. 'sales were ' tot ~ dollar9. + (-1) '.'; datalines; Wong 15,300 12OCT2004 Hoffman 9,600 12OCT2004 ;