Loading...
Searching...
No Matches
mpe_loadfail.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Updates the mpe_loads tracking table with success / failure info
4 @details
5
6 <h4> SAS Macros </h4>
7 @li mp_abort.sas
8
9 @version 9.2
10 @author 4GL Apps Ltd
11 @copyright 4GL Apps Ltd. This code may only be used within Data Controller
12 and may not be re-distributed or re-sold without the express permission of
13 4GL Apps Ltd.
14
15**/
16
17
18%macro mpe_loadfail(
19 status=FAILED - &syscc
20 ,now=%sysfunc(datetime())
21 ,approvals=
22 ,mperef=
23 ,reason_txt=
24 ,mac=mpe_loadfail.sas
25 ,dc_dttmtfmt=E8601DT26.6
26 );
27 /* do not perform duration calc in pass through */
28 %local dur;
29 data _null_;
30 now=symget('now');
31 dur=%sysfunc(datetime())-&now;
32 call symputx('dur',dur,'l');
33 run;
34 proc sql;
35 update &mpelib..mpe_loads
36 set STATUS=symget('status')
37 , duration=&dur
38 , processed_dttm=&dc_dttmtfmt.
39 , approvals = symget('approvals')
40 , reason_txt= symget('reason_txt')
41 where CSV_DIR="&mperef";
42 %let syscc=666;
43 %mp_abort(msg=%superq(status)\n%superq(reason_txt),mac=&mac)
44%mend mpe_loadfail;