PRCDR_RFRNTL_INTGRTY

This procedure applies the set difference on keys (FRGN_VRBL, PRMRY_VRBL) of two (input) datasets (FRGN_CB, PRMRY_CB) and stores the resulting dataset in Result (RSLT).

Procedure ID

PRCDR_RFRNTL_INTGRTY

Description

Procedure to calculate referential integrity

Natural language

This procedure applies the set difference on keys (FRGN_VRBL, PRMRY_VRBL) of two (input) datasets (FRGN_CB, PRMRY_CB) and stores the resulting dataset in Result (RSLT).

Expression

define procedure PRCDR_RFRNTL_INTGRTY (input FRGN_CB as dataset, input FRGN_VRBL as string, input PRMRY_CB as dataset, input PRMRY_VRBL as string, input VLDTN_ID as string, output RSLT as dataset) {

FRGN_IDS := FRGN_CB [keep (FRGN_VRBL), rename (FGN_VRBL as “ID”)];
PRMRY_IDS := PRMRY_CB [keep (PRMRY_VRBL), rename (PRMRY_VRBL as “ID”)];
RSLT := setdiff (FRGN_IDS, PRMRY_IDS);
RSLT := RSLT [rename (ID as “FRGN_IDS”, VLDTN_ID role Measure)];

}