feat: new getxlmaps service to return rules for a particular xlmap_id
Some checks failed
Build / Build-and-ng-test (pull_request) Failing after 13s

This commit is contained in:
zver
2024-01-01 14:50:02 +00:00
parent cc4535245c
commit 56264ecc69
2 changed files with 99 additions and 0 deletions

View File

@ -0,0 +1,56 @@
/**
@file getxlmaps.sas
@brief Returns a list of rules for a specific xlmap_id
<h4> Service Inputs </h4>
<h5> getxlmaps_in </h5>
|XLMAP_ID|
|---|
|Sample|
<h4> Service Outputs </h4>
<h5> xlmaprules </h5>
|XLMAP_ID|XLMAP_RANGE_ID|XLMAP_SHEET|XLMAP_START|XLMAP_FINISH|
|---|---|---|---|---|
|Sample|Range1|Sheet1|ABSOLUTE A1| |
|Sample|Range2|Sheet1|RELATIVE R[2]C[2]|ABSOLUTE H11|
<h4> SAS Macros </h4>
@li mp_abort.sas
@li mpeinit.sas
@version 9.3
@author 4GL Apps Ltd
@copyright 4GL Apps Ltd. This code may only be used within Data Controller
and may not be re-distributed or re-sold without the express permission of
4GL Apps Ltd.
**/
%mpeinit()
proc sql noprint;
create table work.xlmaprules as
select xlmap_id
,XLMAP_RANGE_ID
,XLMAP_SHEET
,XLMAP_START
,XLMAP_FINISH
from &mpelib..mpe_excel_map
where &dc_dttmtfmt. lt tx_to
and xlmap_id in (select xlmap_id from work.getxlmaps_in)
order by xlmap_sheet, xlmap_range_id;
%mp_abort(iftrue= (&syscc ne 0)
,mac=&_program..sas
,msg=%str(syscc=&syscc)
)
%webout(OPEN)
%webout(OBJ,xlmaprules)
%webout(CLOSE)