- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
data np_summary_update; set pg1.np_summary; keep Reg ParkName DayVisits OtherLodging Acres SqMiles Camping; SqMiles=Acres*.0015625; Camping=sum(OtherCamping,TentCampers, RVCampers,BackcountryCampers); format SqMiles comma6. Camping comma10.; run; data np_summary_update; set pg1.np_summary; keep SqMiles Camping Reg ParkName DayVisits OtherLodging Acres ; *Add assignment statements; SqMiles=Acres *.0015625; Camping =sum(OtherCamping,TentCampers,RVCampers,BackcountryCampers); format SqMiles comma. Camping comma. run;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Welcome to the community.
Two things to get the best results:
1. To make the most of this community, learn how to use the tools.
For example, use the running man icon to post code. Your code is illegible as is.
2. To make the most of SAS, always refer to the documentation.
In this case, see https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/leforinforref/p0sad1pg4gsni3n1gbjue9fxzyhq.ht...
You'll see that if you omit to specify the length for this format, a value of 6 is used. Hence the identical displayed values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Welcome to the community.
Two things to get the best results:
1. To make the most of this community, learn how to use the tools.
For example, use the running man icon to post code. Your code is illegible as is.
2. To make the most of SAS, always refer to the documentation.
In this case, see https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/leforinforref/p0sad1pg4gsni3n1gbjue9fxzyhq.ht...
You'll see that if you omit to specify the length for this format, a value of 6 is used. Hence the identical displayed values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Every SAS supplied format will have the default setting for W, as in Commaw., the displayed width of the result in the format description in the help.
When you create custom formats with Proc Format you can specify a default display width as well.