如何判斷數(shù)據(jù)集中變量是否存在伊脓?不存在,則把它做出來魁衙。
if _n_ = 1 then do;
dsid = open('cm');
if varnum(dsid,'CMDOSTXT')= 0 then CMDOSTXT = '';
if varnum(dsid,'CMDOSE')= 0 then CMDOSE = .;
if varnum(dsid,'CMENDTC')= 0 then CMENDTC = '';
?if varnum(dsid,'CMENDY')= 0 then CMENDY = .;
rc = close(dsid);
end;
drop rc dsid;