- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 03-06-2022 12:10 AM
(1108 views)
length mob DQ_6 $20.;
Does this mean putting both mob and DQ_6 into format of length 20 ?
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Length will limit the number of characters stored. If another format is not defined those variables will default to a $20 display format. Character variables typically default to the length. Numeric variables default to BEST, usually Best12. and has nothing to do with the length.
A Format assignment can override that default format at any point.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The $20 applies to both of the variables preceding it.
It's not exactly a format (which is usually intended to tell SAS how to display a value) - as a LENGTH statement, it tells SAS to store the data in mob and in DQ_6 as strings of length 20 characters.
--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set
Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets
--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set
Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets
--------------------------