SetGVM

Use this procedure/function to update the contents of a GVM variable. You can also use this procedure to create a GVM variable.

Syntax

SetGVM (Name, Data, Instance, Type, Size)

Parameter

Description

Name

Enter a string which contains the name of the GVM variable.

Data

Enter the data you want to store in the GVM variable.

Instance

Enter the instance number of the GVM variable. The default is one (1)

Type

Indicate the type of GVM variable to create. You can choose from these options:

C - Character array
S - Short
L - Long
F - Float
D - Double
Q - Long double

Size

Enter the number of bytes to reserve when creating a GVM variable. This parameter is not used if the GVM already exists.

The system returns a one (1) if successful or a zero (0) if not.

Note You can use this function to set a reserved GVM value, but be aware of how that reserved GVM is used. Some reserved GVM values should not be modified, such as NA_OFFSET and POL_OFFSET. Additionally, keep in mind that reserved GVM values may be changed by subsequent rule processing.

Example

Here are some examples:

Procedure

Result

Explanation

If (HaveGVM(‘Company’)) then;

SetGVM(‘Company’, ‘My Company’)

End

1 or 0

If the variable exist; then set the GVM, Company, to the string My Company.

If (HaveGVM(‘My Variable’) = 0) then;

SetGVM(‘My Variable’,‘My Data’,, ‘C’, 50)

End

1 or 0

If the GVM variable, My Variable, does not exist; then create one that is a character array with a size of 50 plus store My Data in it.

See also