Loading...
Searching...
No Matches
getdiffs.sas
Go to the documentation of this file.
1/**
2 @file getdiffs.sas
3 @brief Retrieves the diff file for viewing
4 @details
5
6 <h4> SAS Macros </h4>
7 @li mpe_getvars.sas
8 @li mpe_accesscheck.sas
9 @li mf_getattrn.sas
10 @li mp_abort.sas
11 @li mp_binarycopy.sas
12 @li mp_streamfile.sas
13
14 @version 9.2
15 @author 4GL Apps Ltd
16 @copyright 4GL Apps Ltd. This code may only be used within Data Controller
17 and may not be re-distributed or re-sold without the express permission of
18 4GL Apps Ltd.
19
20**/
21
22%mpeinit()
23%mpe_getvars(BrowserParams, BrowserParams);
24
25/* security checks */
26%let user=%mf_getuser();
27%mpe_accesscheck(&libds,outds=authEDIT,user=&user,access_level=EDIT)
28%mpe_accesscheck(&libds,outds=authAPP,user=&user,access_level=APPROVE)
29
30%macro mpestp_diffs();
31 %if %mf_getattrn(work.authEDIT,NLOBS)=0 & %mf_getattrn(work.authAPP,NLOBS)=0
32 %then %do;
33 %mp_abort(msg=%str(
34 &user not authorised to download diffs data for &stp_table)
35 ,mac=mpestp_diffs.sas);
36 %return;
37 %end;
38
39 %mp_abort(iftrue= (&syscc ne 0)
40 ,mac=&_program..sas
41 ,msg=%str(syscc=&syscc)
42 )
43
44 /* stream diffs csv to client */
45 %mp_streamfile(contenttype=EXCEL
46 ,inloc=%str(&mpelocapprovals/&TABLE/&STP_DIFFS_CSV)
47 ,outname=&STP_DIFFS_CSV
48 )
49
50%mend mpestp_diffs;
51%mpestp_diffs()
52
53
54
55%mpeterm()