SAS认证考试(官方练习题集和校正答案)

上传人:仙*** 文档编号:31939427 上传时间:2021-10-13 格式:DOC 页数:52 大小:93.50KB
收藏 版权申诉 举报 下载
SAS认证考试(官方练习题集和校正答案)_第1页
第1页 / 共52页
SAS认证考试(官方练习题集和校正答案)_第2页
第2页 / 共52页
SAS认证考试(官方练习题集和校正答案)_第3页
第3页 / 共52页
资源描述:

《SAS认证考试(官方练习题集和校正答案)》由会员分享,可在线阅读,更多相关《SAS认证考试(官方练习题集和校正答案)(52页珍藏版)》请在装配图网上搜索。

1、聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁

2、袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅

3、螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿

4、羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃

5、螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈

6、肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅

7、袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿

8、螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃

9、羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇

10、螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂

11、肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆

12、袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀

13、肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇

14、羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀羁蕿袆聿羀艿虿羅罿莁袅袁肈蒃蚇螇肇薆蒀肅肆芅蚆肁肆蒈葿羇肅薀螄袃肄芀薇蝿肃莂螂肈肂蒄薅羄膁薇螁袀膀芆薃螆膀荿蝿螂腿薁薂肀膈芀袇羆膇莃蚀袂膆蒅袅螈膅薇蚈肇芄芇蒁羃芄荿蚇衿芃蒂葿袅节芁螅螁芁莄薈肀芀蒆螃羆艿薈薆袁芈芈螁

15、螇莈莀薄肆莇蒃螀羂莆蚅薃羈莅莄袈袄羂蒇蚁螀 1. A raw data file is listedbelow.The following program issubmitted using this file asinput:data work.family;infile file-specification;<insert INPUTstatement here>run;Which INPUT statementcorrectly reads the values forthe variable Birthdate asSAS date values?a. input rela

16、tion$ first_name$ birthdate date9.;b. input relation$ first_name$ birthdatemmddyy8.;c. input relation$ first_name$ birthdate :date9.;d. input relation$ first_name$ birthdate :mmddyy8.;Correct answer:d An informat is used to translate the calendar date to a SAS date value. The date values are in the

17、form of two-digit values for month-day-year, so the MMDDYY8. informat must be used. When using an informat with list input, the colon-formatmodifier is required to correctly associate the informat with thevariable name.You can learn about2.informats in Reading Date and Time Values the colon-format m

18、odifier in Reading Free-Format Data.A raw data file is listed below.The following SAS program is submitted using the raw data file above as input: data employeestats; <insert INFILE statement here> input name $ age weight; run; The following output is desired:Which of the following INFILE stat

19、ements completes the program and accesses the data correctly? a. infile file-specification pad; b. infile file-specification dsd; c. infile file-specification dlm=,; d. infile file-specification missover; Correct answer: b The PAD option specifies that SAS pad variable length records with blanks. Th

20、e MISSOVER option prevents SAS from reading past the end of the line when reading free formatted data. The DLM= option specifies the comma as the delimiter; however, consecutive delimiters are treated as one by default. 3.The DSD option correctly reads the data with commas as delimiters and two cons

21、ecutive commas indicating a missing value like those in this raw data file. You can learn about the PAD option in Reading Raw Data in Fixed Fields the MISSOVER option in Creating Multiple Observations from a Single Record the DLM= option and the DSD option in Reading Free-Format Data.The following p

22、rogram is submitted: data numrecords; infile cards dlm=,; input agent1 $ agent2 $ agent3 $; cards; jones,brownjones,spencer,brown ; run; What is the value for the variable named Agent2 in the second observation? a. Brown b. Spencer c. (missing character value) d. There is no value because only one o

23、bservation iscreated. Correct answer:d The CARDS statement enables you to read instream data. Any number of consecutive commas are considered to be a single delimiter as a result of the DLM= option, and the length of each variable defaults to 8 bytes. Therefore, the values jones, brownjon, and spenc

24、er are assigned to Agent1, Agent2, and Agent3, respectively, for the first observation. The rest of the data on the record is not read by the INPUT statement and is not output to the data set. You can learn about4.the CARDS statement in Creating SAS Data Sets from Raw Data the default length of vari

25、ables in Reading Free-Format Data.A raw data file is listed below.The following program is submitted using this file as input: data work.houses; infile file-specification; <insert INPUT statement here> run; Which one of the following INPUT statements reads the raw data file correctly? a. input

26、 1 style $8. +1 sqfeet 4. +1 bedrooms 1. 20 baths 3. street 16. 40 price dollar8; b. input 1 style $8 +1 sqfeet 4. +1 bedrooms 1. 20 baths 3. street $16 40 price dollar8.; c. input 1 style $8. +1 sqfeet 4. +1 bedrooms 1. 20 baths 3. street $16. 40 price dollar8.; d. input 1 style $8. +1 sqfeet 4. +1

27、 bedrooms 1. 20 baths 3 street 16. 40 price dollar8.; Correct answer: c 5.Formatted input requires periods as part of the informat name. The period is missing from the variables Style and Street in Answer b, the variable Baths in Answer d, and the variable Price in Answer a (which is also missing a

28、dollar sign to read the variable Street as a character value). You can learn about formatted input and informats in Reading Raw Data in Fixed Fields.The following SAS program is submitted at the start of a new SAS session: libname sasdata SAS-data-library; data sasdata.sales; set sasdata.salesdata;

29、profit=expenses-revenues; run; proc print data=sales; run; The SAS data set Sasdata.Salesdata has ten observations. Which one of the following explains why a report fails to generate? a. The DATA step fails execution. b. The SAS data set Sales does not exist. c. The SAS data set Sales has no observa

30、tions. d.The PRINT procedure contains a syntax error. Correct answer:b The DATA step creates a permanent SAS data set,Sasdata.Salesdata. The PRINT procedure is printing a temporary SAS data set, Sales, that is stored in the Worklibrary. At the beginning of the SAS session, Work.Sales does not exist.

31、You can learn about creating permanent data sets with the DATA step inCreating SAS Data Sets from Raw Data 6. 7. temporary data sets in Basic Concepts. Which action assigns a reference named SALES to a permanent SAS data library? a. Issuing the command: libref SALES SAS-data-library b. Issuing the c

32、ommand: libname SALES SAS-data-library c. Submitting the statement: libref SALES SAS-data-library; d. Submitting the statement: libname SALES SAS-data-library; Correct answer:d The LIBNAME statement assigns a reference known as a libref to a permanent SAS data library. The LIBNAME command opens the

33、LIBNAME window. You can learn about the LIBNAME statement in Referencing Files and Setting Options. The following SAS program is submitted:data newstaff;set staff;<insert WHERE statement here>run;Which one of the following WHERE statements completes the program and selects only observations wi

34、th a Hire_date of February 23, 2000?a. where hire_date=23feb2000d;b. where hire_date=23feb2000;c. where hire_date=02/23/2000d;d.where hire_date=02/23/2000;Correct answer:a 8. 9. A SAS date constant must take the form of one- or two-digit day, three-digit month, and two- or four-digit year, enclosed

35、in quotation marks and followed by a d (ddmmmyy<yy>d).You can learn about SAS date constants in Creating SAS Data Sets from Raw Data.Which one of the following SAS date formats displays the SAS date value for January 16, 2002 in the form of 16/01/2002? a. DATE10. b. DDMMYY10. c. WEEKDATE10. d.

36、DDMMYYYY10. Correct answer:b The requested output is in day-month-year order and is 10 bytes long, so DDMMYY10. is the correct format. Although WEEKDATE10. is a valid SAS format, it does not display the SAS date value as shown in the question above. DDMMYYYY10. is not a valid SAS date format, and th

37、e DATEw. format cannot accept a length of 10. You can learn about the DDMMYY10. format in Creating List Reports the WEEKDATE10. format in Reading Date and Time Values.Which one of the following displays the contents of an externalfile from within a SAS session? a. the LIST procedure b. the PRINT pro

38、cedurec. the FSLIST procedured. the VIEWTABLE windowCorrect answer:c 10. The PRINT procedure and VIEWTABLE window display the values in SAS data sets. The FSLIST procedure displays the values in external files. There is no LIST procedure in SAS. You can learn about the PRINT procedure in Creating Li

39、st Reports the VIEWTABLE window in Referencing Files and Setting Options.The SAS data set Sashelp.Prdsale contains the variablesRegion and Salary with 4 observations per Region. Sashelp.Prdsale is sorted primarily by Region and within Region by Salary in descending order. The following program is su

40、bmitted:data one;set sashelp.prdsale;retain temp;by region descending salary;if first.region thendo;temp=salary;output;end;if last.region thendo;range=salary-temp;output;end;run;For each region, what is the number of observation(s) written to the output data set?a. 0b. 1c. 2 d. 4Correct answer:c 11.

41、 The expression first.region is true once for each region group. The expression last.region is true once for each region group. Therefore, each OUTPUT statement executes once for a total of 2 observations in the output data set. You can learn about the FIRST.variable expression and theOUTPUT stateme

42、nt in Reading SAS Data Sets. The following SAS program is submitted:proc contents data=sasuser.houses;run;The exhibit below contains partial output produced by the CONTENTS procedure. Which of the following describes the Sasuser.Houses data set? a. The data set is sorted but not indexed.b. The data

43、set is both sorted and indexed.c. The data set is not sorted but is indexed. 12.d. The data set is neither sorted nor indexed. Correct answer:d The exhibit above shows partial output from the CONTENTS procedure, In the top right-hand column of the output, you see that Indexes has a value of 0, which

44、 indicates that no indexes exist for this data set. Also, Sorted has a value of NO, which indicates that the data is not sorted. You can learn about the CONTENTS procedure in Referencing Files and Setting Options.The following SAS program is submitted: proc sort data=work.test; by fname descending s

45、alary; run; Which one of the following represents how the observations are sorted? a. The data set Work.Test is stored in ascending order by both Fname and Salary values. b. The data set Work.Test is stored in descending order by both Fname and Salary values. c. The data set Work.Test is stored in d

46、escending order by Fname and ascending order by Salary values. d. The data set Work.Test is stored in ascending order by Fname and in descending order by Salaryvalues. Correct answer:d The DESCENDING keyword is placed before the variable name it modifies in the BY statement, so the correct descripti

47、on is in descending order by Salary value within ascending Fname values.You can learn about the SORT procedure and the DESCENDING keyword in Creating List Reports. 13. 14. The following SAS program is submitted: data names; title=EDU; if title=EDU then Division=Education; else if title=HR then Divis

48、ion=Human Resources; else Division=Unknown; run; Which one of the following represents the value of the variable Division in the output data set? a. Educatio b. Education c. Human Re d. Human ResourcesCorrect answer:b The length of the variable Division is set to 9 when the DATA step compiles. Since

49、 the value of the variable Title is EDU, the first IF condition is true; therefore, the value of the variable Division is Education. You can learn about the length of a variable in Understanding DATA Step Processing IF-THEN statements in Creating and Managing Variables. Which one of the following SA

50、S programs creates a variablenamed City with a value of Chicago? a. data work.airports;AirportCode=ord;if AirportCode=ORD City=Chicago; run;b. data work.airports;AirportCode=ORD; 15.if AirportCode=ORD City=Chicago; run; c. data work.airports; AirportCode=ORD; if AirportCode=ORD then City=Chicago; ru

51、n; d. data work.airports; AirportCode=ORD; if AirportCode=ORD; then City=Chicago; run;Correct answer: c The correct syntax for an IF-THEN statement is: IF expression THEN statement; In this example, the variable City is assigned a value of Chicago only if the expression AirportCode=ORD is true.You c

52、an learn about IF-THEN statements in Creating and Managing Variables.The following SAS program is submitted: data work.building; code=DAL523; code=SANFRAN604; code=HOUS731; length code $ 20; run; Which one of the following is the length of the code variable? a. 6 b. 7 c. 10 d.20 Correct answer:a The

53、 DATA step first goes through a compilation phase, then an execution phase. The length of a variable is set during the compilation phase and is based on the first time the variable is 16.encountered. In this case, the variable code is set to the length of the text string DAL523 which is 6 characters

54、 long. The next assignment statements are ignored during compilation. The LENGTH statement is also ignored since the length has already been established, but a note will be written to the log. You can learn about the compilation phase of the DATA step in Understanding DATA Step Processing the LENGTH

55、 statement in Creating and Managing Variables.Which of the following statements creates a numeric variable named IDnumber with a value of 4198? a. IDnumber=4198; b. IDnumber=4198; c. length IDnumber=8; d.length IDnumber $ 8; Correct answer:a The first reference to the SAS variable in the DATA step s

56、ets the name, type, and length of the variable in the program data vector (PDV) and in the output SAS data set. The assignment statement IDnumber=4198; is the first reference and creates a numeric variable named IDnumber with a default storage length of 8 bytes.You can learn about creating variables

57、 in the DATA step inUnderstanding DATA Step Processing numeric variables in Basic Concepts. 17. 18. The following program is submitted: data fltaten; input jobcode $ salary name $; cards; FLAT1 70000 Bob FLAT2 60000 Joe FLAT3 30000 Ann ; run; data desc; set fltaten; if salary>60000 then descripti

58、on=Over 60; else description=Under 60; run; What is value of the variable named description when the value for salary is 30000? a. Under 6 b. Under 60 c. Over 60 d. (missing character value) Correct answer:a The variable description is being created by the IF-THEN/ELSE statement during compilation.

59、The first occurrence of the variable description is on the IF statement, and since it is assigned the value Over 60, the length of the variable is 7. Therefore, for the salary value of 30000, description has the value of Under 6 (the 0 is truncated.) You can learn about the compilation phase of the

60、DATA step in Understanding DATA Step Processing IF-THEN/ELSE statements in Creating and Managing Variables.A raw data file is listed below.The following program is submitted:data all_sales; 19. infile file-specification; input receipts; <insert statement(s) here> run; Which statement(s) complete(s) the program and produce(s) a running total of theReceipts variable? a. total+receipts; b.total 0; sum total;

展开阅读全文
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!