Regarding Lesson 8 colon format modifier

22 views
Skip to first unread message

Kashmira Parekh

unread,
Jul 15, 2014, 4:26:37 PM7/15/14
to anova...@googlegroups.com
Can you explain why on the second data step on the screen shot uses a colon format modifier and  also uses the width as 8.  Isnt the colon format modifier suppose to takecare of the characters in the variable?
Kashmira
Colon format modifier.docx

Anova Groups

unread,
Jul 16, 2014, 11:06:28 AM7/16/14
to anova...@googlegroups.com
if we just use dollar8. informat SAS will try to read 8 characters, and there may not be 8 characters/digit in the raw data and so SAS will move to the next line to read rest of the data. To avoid that and tell SAS to stop reading once it encounters 

Anova Groups

unread,
Jul 16, 2014, 11:08:17 AM7/16/14
to anova...@googlegroups.com
Colon modifier tells SAS to read until it finds a delimiter. In this case try to run program without : and I believe you will be get the same results as before. 

You still need to give enough length on your informat to read the whole salary value. The length of 8 is appropriate.


Reply all
Reply to author
Forward
0 new messages