The action sets a time for each value in the local structure _dstRec
- the column with the serial number _dstRecCol, according to
the time of a value in corresponding column _srcRec^DateTimeCol. The structures
_dstRec and _srcRec
must have the same number of rows.
The action represents a substitution for the
following loop:
RECORD (SD.Def) _srcRec
RECORD (SD.Def) _dstRec
BEGIN
REDIM _srcRec[10]
REDIM _dstRec[10]
; Activity of SETCOLTIME action
IF _srcRec\DIM # _dstRec\DIM THEN
; The error _ERR_RANGE_ERROR
END
ENDIF
INT _row
_row := 1
DO_LOOP
EXIT_LOOP _row > _srcRec\DIM
IF ! _srcRec[_row]^TimeCol\VLD THEN
; Error
END
ENDIF
_dstRec[_row]^ValueCol := _dstRec[_row]^ValueCol TIME _srcRec[_row]^TimeCol
_row := _row + 1
END_LOOP
; End of the action
END
The type of the column TimeCol used in the example must be Absolute
time.
Example
The following example executes the loop described above using the
action SETCOLTIME. It assumes, that the serial number of
the column ValueColje is
2.