Pass an integer value to a field

WTSupported in traditional Synergy on Windows


USupported on UNIX
VSupported on OpenVMS
xcall CVTIIV(value, field)



Passed directly or using one of the following functions: (n)

^VAL = Pass the integer by value.

^REF = Pass the integer by reference.

^XTRNL = Pass the integer by external reference. (OpenVMS only)


The variable that will be loaded with the binary value. (n)



The CVTIIV routine is not supported in Synergy/DE 9 and higher. Instead, use an integer assignment. For example,

  • xcall cvtiiv(^ref(prcnmlen),retlen) would become
retlen = ^addr(prcnmlen)
  • xcall cvtiiv(^val(numeric field), retlen) would become
retlen = numeric field
  • xcall cvtiiv(^xtrnl(SOME LITERAL), retlen) would become
retlen = ^xtrnl(SOME LITERAL)

See Moving integer data to a decimal/packed destination for more information about assigning integer values.

The CVTIIV subroutine converts an integer value to a specified field with no data type conversion. The integer must be passed by value, reference, or external reference.

The CVTIIV subroutine supports only three integer sizes:


Byte size


Word size


Longword size

Designating a size other than 1, 2, or 4 generates an “Argument specified with wrong size” error ($ERR_ARGSIZ).

You can use this routine to store the address of a field in a variable by using the ^REF function as the first argument. You can also use CVTIIV to store an externally defined constant or address by using the ^XTRNL function.


xcall cvtiiv(^ref(variable), byte_val)