Code is libname mydata '/sas/prod/datamarts/rel/data/trans/'; data trans.loss; %let data_set = trans.loss; %let id = %sysfunc(open(trans.loss)); %let create_date = %sysfunc(attrn(&dsid,crdte)); %let dt = %sysfunc(datepart(&create_date),yymmdd10.); %let close_flag = %sysfunc(close(&id)); But I get the following error; 31 %let create_date = %sysfunc(attrn(&dsid,crdte),yyyymm.); SYMBOLGEN: Macro variable DSID resolves to 0 WARNING: Argument 1 to function ATTRN referenced by the %SYSFUNC or %QSYSFUNC macro function is out of range. NOTE: Mathematical operations could not be performed during %SYSFUNC function execution. The result of the operations have been set to a missing value. Any idea why it can't interpret crdte as a date? Thanks!
... View more