Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • When you use it in a CHANGE command to set a value for a field, you must refer to its value property:

...

         change #empno #curemp.value
  • When you want to change its value, use the SET command:

...

         set com(#curemp) value('A0070')
  • You can refer to the name without the value property in subroutines and built-in functions

...

         use builtin(reverse) with_args(#curemp) to_get(#revname)
  • The same name can be used in different events, methods, and property routines.

  • The name should not contain any prefixes reserved for LANSA such as #PRIM_, #LANSA, #SYS, #COM and #LP.

...

The following code defines a default value for the optional parameter #this_emp:

   define_map *input class(#empno) name(#this_emp) mandatory('A1234')

The following code defines that the default value for the optional parameter #this_emp is blank:

   define_map *input class(#empno) name(#this_emp) mandatory('')

You can also supply a value for non-mandatory output parameters. This value is used to initialize the variable at the beginning of the routine and the value is replaced if the parameter is supplied when the routine is invoked.

The following code initializes #mNumberOfTimes to a default of 99 and #mValid to false: 

   define_map *output class(#std_count) name(#mNumberofTimes) mandatory(99)
define_map *result class(#prim_boln) name(#mValid) mandatory(false)

Anchor
DESC
DESC
DESC

You can specify a brief description for the mapped value using the DESC parameter. It can be 40 characters long.

...