getxlmaps.sas
Go to the documentation of this file.
1 /**
2  @file getxlmaps.sas
3  @brief Returns a list of rules and other info for a specific xlmap_id
4 
5  <h4> Service Inputs </h4>
6 
7  <h5> getxlmaps_in </h5>
8 
9  |XLMAP_ID|
10  |---|
11  |Sample|
12 
13  <h4> Service Outputs </h4>
14 
15  <h5> xlmaprules </h5>
16 
17  Filtered output of the dc.MPE_XLMAP_RULES table
18 
19  |XLMAP_ID|XLMAP_RANGE_ID|XLMAP_SHEET|XLMAP_START|XLMAP_FINISH|
20  |---|---|---|---|---|
21  |Sample|Range1|Sheet1|ABSOLUTE A1| |
22  |Sample|Range2|Sheet1|RELATIVE R[2]C[2]|ABSOLUTE H11|
23 
24  <h5> xlmapinfo </h5>
25  Extra info for a map id
26 
27  |TARGET_DS|
28  |---|
29  |DCXXX.MPE_XLMAP_DATA|
30 
31  <h4> SAS Macros </h4>
32  @li mp_abort.sas
33  @li mpeinit.sas
34 
35  @version 9.3
36  @author 4GL Apps Ltd
37  @copyright 4GL Apps Ltd. This code may only be used within Data Controller
38  and may not be re-distributed or re-sold without the express permission of
39  4GL Apps Ltd.
40 
41 **/
42 
43 %mpeinit()
44 
45 data _null_;
46  set work.getxlmaps_in;
47  putlog (_all_)(=);
48  call symputx('xlmap_id',xlmap_id);
49 run;
50 
51 proc sql noprint;
52 create table work.xlmaprules as
53  select xlmap_id
54  ,XLMAP_RANGE_ID
55  ,XLMAP_SHEET
56  ,XLMAP_START
57  ,XLMAP_FINISH
58  from &mpelib..MPE_XLMAP_RULES
59  where &dc_dttmtfmt. lt tx_to and xlmap_id="&xlmap_id"
60  order by xlmap_sheet, xlmap_range_id;
61 
62 %global target_ds;
63 select XLMAP_TARGETLIBDS into: target_ds
64  from &mpelib..MPE_XLMAP_INFO
65  where &dc_dttmtfmt. lt tx_to and xlmap_id="&xlmap_id";
66 
67 %mp_abort(iftrue= (&syscc ne 0)
68  ,mac=&_program..sas
69  ,msg=%str(syscc=&syscc)
70 )
71 
72 data work.xlmapinfo;
73  target_ds=coalescec("&target_ds","&mpelib..MPE_XLMAP_DATA");
74  output;
75  stop;
76 run;
77 
78 %webout(OPEN)
79 %webout(OBJ,xlmaprules)
80 %webout(OBJ,xlmapinfo)
81 %webout(CLOSE)
82