Loading...
Searching...
No Matches
getsubmits.sas
Go to the documentation of this file.
1/**
2 @file getsubmits.sas
3 @brief Returns a list of staged data items that need to be approved
4 @details
5
6 <h4> SAS Macros </h4>
7 @li mp_abort.sas
8 @li mf_getuser.sas
9 @li mpeinit.sas
10
11 @version 9.2
12 @author 4GL Apps Ltd
13 @copyright 4GL Apps Ltd. This code may only be used within Data Controller
14 and may not be re-distributed or re-sold without the express permission of
15 4GL Apps Ltd.
16
17**/
18
19%mpeinit()
20
21PROC FORMAT;
22 picture yymmddhhmmss other='%0Y-%0m-%0d %0H:%0M:%0S' (datatype=datetime);
23RUN;
24
25proc sql noprint;
26create table work.fromsas (rename=(SUBMITTED_ON=SUBMITTED_ON_DTTM)) as
27 select table_id
28 ,cats(base_lib,'.',base_ds) as base_table
29 ,input_vars
30 ,input_obs
31 ,submitted_by_nm
32 ,submitted_reason_txt
33 ,'DEPRECATED' as approve_group
34 ,submit_status_cd as review_status_id
35 ,reviewed_by_nm
36 ,reviewed_on_dttm
37 ,cats(put(SUBMITTED_ON_DTTM,yymmddhhmmss.)) as SUBMITTED_ON
38 from &mpelib..mpe_submit
39 where submitted_by_nm="%mf_getuser()" and submit_status_cd='SUBMITTED'
40 order by submitted_on_dttm desc;
41
42%mp_abort(iftrue= (&syscc ne 0)
43 ,mac=&_program..sas
44 ,msg=%str(syscc=&syscc)
45)
46
47%webout(OPEN)
48%webout(OBJ,fromSAS,missing=STRING)
49%webout(CLOSE)
50