I have a user-defined format that I want to apply to CAS in-memory data. I've defined the format as: proc format casfmtlib="casformat"; picture ymdhms other='%0Y-%0m-%0d %0H:%0M:%0S' (datatype=datetime); run; When I run that, the log shows: 80 proc format casfmtlib="casformat"; NOTE: Both CAS based formats and catalog-based formats will be written. The CAS based formats will be written to the session MCCOFFERSESS. 81 picture ymdhms other='%0Y-%0m-%0d %0H:%0M:%0S' (datatype=datetime); NOTE: Format library CASFORMAT added. Format search update using parameter APPEND completed. NOTE: Format YMDHMS has been output. When I subsequently try to apply the format in a proc cas block, I get a Warning in the log: "WARNING: The function failed to execute." I'm trying to apply the format using then "putn" function: print putn(start_date, 'ymdhms.'); Any advice would be greatly appreciated. The full proc cas step is: proc cas; table.fileInfo status=rc result=info / caslib="my_cas" , path="my_log_link_visit_action.sashdat" , rowcount=true ; run; if (info.FileInfo[1,5] > 0) then do; table.loadTable status=rc result=r / caslib="my_cas" , path="my_log_link_visit_action.sashdat" , casout={ caslib="my_cas" , name="my_log_link_visit_action" , replace=true } ; end; run; if (rc.severity = 0) then do; simple.summary result=daterange / table={ caslib="my_cas" , name="my_log_link_visit_action" } , inputs={ {name="server_time"} } , subSet={"MAX"} ; start_date = daterange.Summary[1,2]; if (intck('dtday', daterange.Summary[1,2], datetime()) > 30) then end_date = intnx('dtday', daterange.Summary[1,2], 30); else end_date = datetime(); print '>>>>> ' putn(start_date, 'YMDHMS.'); print '>>>>> ' end_date; end; run; quit;
... View more