I'm trying to create an output like below: HEADER 02032023,,,,,,,,,,, x,y,d,d,....(data) TRAILER 00000100,,,,,,,,,, Description - this is a csv comma delimited file (to be exported to server) with two custom rows added at the export step. HEADER and TRAILER are two literals and 02032023 is a date stored in a macro(ext_dt) and 000000100 should be the count of rows in a csv file. I'm a fairly new user of sas so could someone please assist in writing the best logic for creating the above output. Note: I don't have the row count stored in any variable at this stage. And I don't need to display the actual header row in the final csv file (that has column headings etc) I've tried the below code but it's not creating the required output unfortunately data _null_; file "&server./ouput2.csv" ; set class nobs=nobs end=last; if _n_ = 1 then do; put Header &ext_dt; end; put; if last then do; put TRAILER &nobs; end; run; Thanks v much
... View more