Description
This method to execute consistency check in batch mode.
Parameters
icParam | input | character | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program7/bconcheckprocessor.p)
/* =================================================================================================== */
/* Method : ConCheckProcessBatch */
/* Desc : Run Consistency Check Processor from Batch processor. Input parameters are passed as */
/* pipe separated strings */
/* --------------------------------------------------------------------------------------------------- */
/* Params: (I) Params List of parameters */
/* =================================================================================================== */
assign oiReturnStatus = -98
viLocalReturn = 0.
/* =================================================================================================== */
/* Normalize input parameters */
/* =================================================================================================== */
if icParam = '':U then assign icParam = ?.
/* =================================================================================================== */
/* Validate input parameters */
/* =================================================================================================== */
if icParam = ?
then do:
assign vcMessage = #T-11'You have not entered all the mandatory values.':255(63250)T-11#
vcContext = 'icParam=&1':U
vcContext = replace(vcContext, '|':U, chr(2))
vcContext = substitute(vcContext, icParam).
<M-5 run SetMessage
(input vcMessage (icMessage),
input '':U (icArguments),
input '':U (icFieldName),
input '':U (icFieldValue),
input 'S':U (icType),
input 3 (iiSeverity),
input '':U (icRowid),
input 'qadfin-933247':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input vcContext (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BConCheckProcessor>
assign oiReturnStatus = -1.
return.
end.
/* =================================================================================================== */
/* Extract values of parameters */
/* =================================================================================================== */
assign icParam = trim(icParam,',').
assign viConCheckIDCount = num-entries(icParam,',').
empty temp-table tConCheckRef.
empty temp-table tConCheckLineRef.
empty temp-table tConCheckLineDetRef.
/* =================================================================================================== */
/* Does processing execution */
/* =================================================================================================== */
if viBConCheckID = 0 or
viBConCheckID = ?
then do:
<I-74 {bFcStartAndOpenInstance
&ADD-TO-TRANSACTION = "false"
&CLASS = "BConCheck"}>
end.
else do:
<I-22 {bFcOpenInstance
&CLASS = "BConCheck"}>
end.
do viIndex = 1 to viConCheckIDCount:
assign vcConCheckID = entry(viIndex, icParam,',').
<M-41 run ConCheckExecute
(output tConCheckRef (tApiConCheck),
output tConCheckLineRef (tApiConCheckLine),
output tConCheckLineDetRef (tApiConCheckLineDet),
input vcConCheckID (icConCheckIDList),
output viFcReturnSuper (oiReturnStatus)) in BConCheck>
end.
<I-58 {bFcCloseAndStopInstance
&CLASS = "BConCheck"}>
if viFcReturnSuper <> 0
then assign oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0 then return.
assign oiReturnStatus = viLocalReturn.