Get rule set analysis code as text
post/ruleSets/{ruleSetId}/analysisCode
Returns the analysis code directly as text in response, not contained within a JSON model, to generate rule fired reports based on the analysis request.
1/* Rule Set ppn_rs1 version 1.0 generated on Mon Jul 01 06:20:20 UTC 2024 */23DS2_OPTIONS LOGICALEXPR = STANDARD;4DS2_OPTIONS SCOND = WARNING;5DS2_OPTIONS MISSING_NOTE;67/* {PACKAGE_START} */8 package BRM_51_RuleSet_0 / inline;910 dcl package logger _logger('App.demo');11 dcl package logger logr_variableTrace('App.TableServices.DS2.Runtime.TraceVariables');1213 /* ---- RULE FIRED FLAG COUNT = 0 ---- */1415method DataGrid_addRow(package datagrid aGrid)16returns int;17 dcl int res rowCnt;18 rowCnt = 0;19 res = aGrid.rowAdd();20 if (res = 0) then21 rowCnt = aGrid.rowCount();22 return rowCnt;23end;2425method DataGrid_addRow(package datagrid aGrid, int numberOfRows)26returns int;27 dcl int res rowCnt;28 rowCnt = 0;29 res = aGrid.rowAdd(numberOfRows);30 if (res = 0) then31 rowCnt = aGrid.rowCount();32 return rowCnt;33end;3435method DataGrid_columnExists(package datagrid aGrid,36varchar(255) col_name)37returns int;38 if (aGrid.columnExists(col_name)) then do;39 return aGrid.columnIndex(col_name);40 end;41 return 0;42end;4344method DataGrid_addCharacterColumn(package datagrid aGrid,45varchar(255) col_name)46returns int;47 return aGrid.columnAddCharType(col_name);48end;4950method DataGrid_Set(package datagrid aGrid,51varchar(255) col_name,52int row_index,53varchar(32767) value)54returns int;55 return aGrid.setValue(col_name, row_index, value);56end;5758 method initRdsp();59 end;6061 method execute( in_out varchar "r_char",double "r_int",double "r_number",in_out package datagrid "r_dg_out");62 dcl double "dg_index";6364;65 if ("r_char" = 'Foundation') then do;66 if (DataGrid_columnExists("r_dg_out",'r1_char_col') = 0) then do;67 DataGrid_addCharacterColumn("r_dg_out",'r1_found_col');68 end;69 dg_index=DataGrid_AddRow(r_dg_out);70 DataGrid_Set("r_dg_out",'r1_found_col', dg_index,'1 found');71goto "end_da5a5617-ebc8-4864-a18d-fd6c29acc5be";end;72 else do;73 if (DataGrid_columnExists("r_dg_out",'r1_char_col') = 0) then do;74 DataGrid_addCharacterColumn("r_dg_out",'r1_found_col');75 end;76 dg_index=DataGrid_AddRow(r_dg_out);77 DataGrid_Set("r_dg_out",'r1_found_col', dg_index,'1 NOT found');78 end;7980 "end_da5a5617-ebc8-4864-a18d-fd6c29acc5be":8182 rule_end: /* label for rule RETURN action */83 end;8485/* {PACKAGE_END} */86 endpackage;87
Information that describes the specific execution to which the analysis code should be applicable (as specified by the scoreExecutionId) and the type of analysis that is to be performed by the code.
A request that contains hints to generate the analysis code using the scoring execution.
Example:
{"scoreExecutionId":"6f4bced9-5bbd-476c-8ef8-3378678b0702","analysisType":"ruleFiredSummary","hints":{"outputLibraryName":"PUBLIC"}}
Name | Type | Required | Description |
---|---|---|---|
scoreExecutionId | string | true | The score execution ID. |
analysisType | string<enumeration> | true | The type of analysis that needs to be done. Allowed values: ruleFiredDetailsruleFiredSummary |
hints | object | false | Hints for generating the analysis code. |
version | integer | false | This media type's schema version number. This representation is version 1. |
Status | Meaning | Description | ||
---|---|---|---|---|
200 | OK | The request succeeded. | Headers | Schema |
400 | Bad Request | The request was invalid. | Schema |