Description
MergeValidate - step 2: Validation of the SharedSet data
Parameters
icSharedSetTypeCode | input | character | |
icMasterSharedSetCode | input | character | |
icRedundantSharedSetCode | input | character | |
ilIsReportDetails | input | logical | |
ilIsReportChangedElements | input | logical | Report those elements which can be merged, but which contains differences in non-mandatory fields (primary it is used for replication) |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program6/bsharedsetmerge.p)
/* =================================================================================================== */
/* Method : MergetValidateInit */
/* Step 1 */
/* Desc : This method validates whether two shared sets are compatible for merging or not */
/* --------------------------------------------------------------------------------------------------- */
/* Params: (I) SharedSetyTypeCode Shared set type of merged shared set */
/* (I) MasterSharedSetCode Code of master shared set */
/* (I) RedundantSharedSetCode Code of redundant shared set */
/* (I) IsReportDetails Should be reported details about validation (if not memory safe*/
/* (I) IsReportChangedElements Report those elements which can be merged, but which contains */
/* differences in non-mandatory fields (primary it is used for */
/* trigerring of Mfg replication to synchronize data) */
/* =================================================================================================== */
assign oiReturnStatus = -98.
/* =================================================================================================== */
/* Default output values */
/* =================================================================================================== */
empty temp-table tSharedSetMergeValRes.
empty temp-table tSharedSetMergeValResDet.
empty temp-table tSharedSetMergeValResMis.
empty temp-table tSharedSetMergeChangedElem.
/* =================================================================================================== */
/* Following variables are stored in the component (instance dependant) */
/* - viSharedSetMergeSharedSetType */
/* =================================================================================================== */
assign vcSharedSetMergeSharedSetType = icSharedSetTypeCode
vcMasterSharedSetCode = icMasterSharedSetCode
vcRedundantSharedSetCode = icRedundantSharedSetCode
vlIsReportDetails = ilIsReportDetails
vlIsReportChangedElements = ilIsReportChangedElements.
/* =================================================================================================== */
/* Normalize input parameters */
/* =================================================================================================== */
<M-35 run MergeValidateNormalize
(input-output vcSharedSetMergeSharedSetType (bcSharedSetTypeCode),
input-output vcMasterSharedSetCode (bcMasterSharedSetCode),
input-output vcRedundantSharedSetCode (bcRedundantSharedSetCode),
input-output ilIsReportDetails (blIsReportDetails),
output viFcReturnSuper (oiReturnStatus)) in BSharedSetMerge>
if viFcReturnSuper <> 0 then assign oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0 then return.
/* =================================================================================================== */
/* Validate input parameters */
/* =================================================================================================== */
<M-23 run MergeValidateValidateInput
(input vcSharedSetMergeSharedSetType (icSharedSetTypeCode),
input vcMasterSharedSetCode (icMasterSharedSetCode),
input vcRedundantSharedSetCode (icRedundantSharedSetCode),
output viMasterSharedSetId (oiMasterSharedSetId),
output viRedundantSharedSetId (oiRedundantSharedSetId),
output viFcReturnSuper (oiReturnStatus)) in BSharedSetMerge>
if viFcReturnSuper <> 0 then assign oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0 then return.
/* =================================================================================================== */
/* Read rules for validatation of shared set compatibility */
/* =================================================================================================== */
<M-39 run GetValidationRulesForSSType
(input vcSharedSetMergeSharedSetType (icSharedSetTypeCode),
output viFcReturnSuper (oiReturnStatus)) in BSharedSetMerge>
if viFcReturnSuper <> 0 then assign oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0 then return.
/* =================================================================================================== */
/* Finish initial of validation */
/* =================================================================================================== */
if oiReturnStatus = -98 then assign oiReturnStatus = 0.