4 22 Process Parameters

LANSA for i

4.22 Process Parameters

Note: Process Parameters should never be used. They exist only for backward compatibility.

Parameters are fields that are passed into a process from an "external" source.

The "external" source can be a data entry screen, which is presented by LANSA, into which the user keys values for the parameters. It can also be a user written application program that passes the parameter values into LANSA.

Once a parameter is defined for a process it is accessible to every function within the process. Each parameter defined in a process is assigned a "symbolic" name that allows it to be easily accessed by the RDML commands associated with a function. The symbolic names have the form *UPnn where "nn" is the parameter number in the range 01 -> 10. Generally a parameter's symbolic name can be used anywhere in an RDML command that a normal field name or literal value could be used.

Some specific instances where Process Parameters cannot be used are:

  • When a function in the process uses FUNCTION OPTIONS(*DIRECT);
  • When the process must execute in Visual LANSA, because Visual LANSA functions require FUNCTION OPTIONS(*DIRECT);
  • When a function in the process is RDMLX, because RDMLX functions require FUNCTION OPTIONS(*DIRECT)

In previous versions of LANSA, parameters may have been used in the following situations:

  • To pass information into a process that is submitted to run in batch. An alternative is to use a Function and use one of the inter-function methods described below.
  • To pass information from a user application into an interactive process. An alternative is to use one of the methods for communicating between jobs described below.
  • Some specific instances where process parameters should not be used are:
  • As a quick way of obtaining information from the user. Instead use the RDML command REQUEST in the associated function to get the information. This approach is more aesthetic and more consistent.
  • As a means of exchanging information between functions. A much more powerful and flexible means of exchanging information is to use the RDML command EXCHANGE or the EXCHANGE parameter on the TRANSFER command.
  • As a means of exchanging information between separately executing jobs. Instead use a data queue, data area or system variable. Visual LANSA also provides a user defined parameter on the command line - see a description of the UDEF parameter.

For more information about the RDML commands mentioned, refer to REQUEST, EXCHANGE and TRANSFER in the Technical Reference Guide.