- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
i am struggling to shift zip month and amount please help
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Please update your post as answered in that case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
There's several ways to do something like this, the most easiest and basic is data step and PUT statements.
Going into ODS objects lets you add headers, formatting and control a lot of other options but is way more work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
And this is likely the best way to operationalize something like this...so is this homework or a real problem?
https://support.sas.com/resources/papers/proceedings16/2240-2016.pdf
And this is the way you would most likely do it for a basic homework assignment. FYI - change the path (home/fkhurshed/Demo1) to one that works for you to run it all and see the files and output.
data report;
set sashelp.class;
newfile = catt("/home/fkhurshed/Demo1/", name, ".txt");
file temp filevar=newfile;
put "This is a report for " Name;
put Name "is " age " and weighs: " Weight;
*double space;
put;
put;
put "End of Report for:" Name "," sex;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I was having issues with the column width.
But i figured it out thanks for the reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Are you having trouble reading in the .DAT file?
The code in your photograph does not look correct. Do you really have a numeric variables named FIRST and LAST? Also is NAME supposed by numeric the way it is first used in the INPUT statement? Or is NAME character like it is used in the second place it is used n your INPUT statement?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Please update your post as answered in that case.