project BLF > class BNumber > method ValMaxYear
validation procedure
Description
Year must not be greater than 9999.
Parameters
iiTargetField | input | integer | Value of the business field to validate. |
icTargetFieldName | input | character | Name of the business field to validate. |
icRowid | input | character | Contents of field tc_Rowid, if the target field is a field of a component temp-table. |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
BLF
program code (program1/bnumber.p)
oiReturnStatus = -98.
if iiTargetField > 9999
then do:
assign vcNumbrMsg = trim(substitute(#T-2'The maximum value for the year (&1) is 9999.':200(503)t-2#, trim(string(iiTargetField)) ))
oiReturnStatus = -1.
<M-1 run SetMessage
(input vcNumbrMsg (icMessage),
input '':U (icArguments),
input icTargetFieldName (icFieldName),
input string(iiTargetField) (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input tNumbr.tc_Rowid (icRowid),
input 'BLF-127':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BNumber>
end.
if oiReturnStatus = -98
then oiReturnStatus = 0.