问两道SASBase题目
40.ThefollowingSASprogramissubmitted:
datawork.pieces;
dowhile(nlt6);
n+1;
end;
run;
WhatisthevalueofthevariableNintheoutputdataset?
A.5
B.6
C.7
D..(missingnumeric)
Answer:B
为什么答案选B?一开始n没有被定义啊,在dowhile里n应该是missing啊.你在n+1的时候才被赋值为0的吧……
48.GiventherawdatafileCALENDAR:
----|----10---|----20---|----30
01012000
ThefollowingSASprogramissubmitted:
datatest;
infile'calendar';
input@1datemmddyy10.;
ifdate='01012000'dthenevent='January1st';
run;
WhatisthevalueoftheEVENTvariable?
A.''(missingcharactervalue)
B..(missingnumericvalue)
C.January1st
D.Theprogramfailstoexecuteduetoerrors.
虽然mmddyy10.的读取长度过长了,但是我在SAS程序上涌datalines的方式试了一下还是能够读取的啊,为什么答案说会有错误?
邮箱: 联系方式: