Hi All, Im downloading a file from a Server location and then attaching the file in SAS Email code. Is there any solution for attaching file directly from server ie: giving server path in attachment. when i try to give server path it says physical file doesn't exist. currently below code is working. options mprint symbolgen; /*report name*/ %let report_ext =AMSHPP.EC654350.EASTOPEN; /*paths*/ %let serverfl = /var/data/devel/serial/freight/znative/private/mbg/mbg_batch/main; %let sas_local_path = /opt/production/znative_sas/SAS_CODES/tmp/MBG_SAS/Email_Files; **output file --lst file; filename mylst sftp "&serverfl/&report_ext" host="10.193.18.29" USER='dp1201770'; filename saslst "&sas_local_path/&report_ext"; data _null_; infile mylst; file saslst; input; put _infile_; run; filename outbox email TO=(abc@gmail.com) FROM=('abinitio2linux_emailer@gmail.com') ATTACH=("%sysfunc(pathname(saslst))") /*how can i give the server path here*/ SUBJECT='Requests stuck in a non-final Status'; data _null_; file outbox; PUT 'The file is generated with pending data in the attachment'; run; data _null_; rc=fdelete('saslst'); run;
... View more