LOAD_PSVSET

LANSA Composer

LOAD_PSVSET

This activity will load processing sequence variables from one or more PSV sets (processing sequence variables sets) contained in the specified PSV file.

Because this is an iterator activity, the processing logic nested beneath the LOAD_PSVSET activity is repeated for each PSV set loaded.  In some valid usage scenarios for this activity, the process may only expect to load one PSV set - for example when loading a PSV file that was created using the SAVE_PSVSET activity.  In that instance it is the process designer's choice whether or not to nest the associated processing directives beneath this activity.

There is no inherent limit to the number of PSV sets that can be loaded or the number of processing sequence variables loaded from each PSV set.  However, the activity is not intended for routine processing of large volumes of data and performance may suffer if you attempt to do so.

The PSV files processed by this activity may contain one or more PSV sets (<psvSet> element).  PSV files created by the SAVE_PSVSET activity will always contain a single PSV set (<psvSet> element).  However, PSV files created by other means (for example, as the output from a Transformation Map) may contain more than one PSV set (processing sequence variables set).

For more information about PSV files, refer to the following.

Saving, Loading and Transforming Processing Sequence Variables

NOTE:  This activity does not clear any processing sequence variables or variable lists before loading them from the PSV file.  This is particularly important for variable lists.  If your processing sequence already contains a list named &my_list containing 30 entries, and a list of the same name is loaded from the PSV file with 15 entries, the resulting list will still contain 30 entries - the LOAD_PSVSET activity will replace the values of only the first fifteen entries in this instance.  You will need to use the CLEARLIST activity if you wish to ensure that any loaded variable lists contain ONLY the entries loaded from the PSV file.  If you are using the iterator capability of this activity (to load multiple PSV sets), then the CLEARLIST activity would typically need to be repeated at the end of each iteration.

INPUT Parameters:

PSVFILEPATH : Required

This parameter must specify the path and file name of the PSV file to be read.

PSVSELECT : Optional

If the PSV file read by this activity contains more than one PSV set (<psvSet> element), this parameter may be used to select a single PSV set (processing sequence variables set) to be loaded.  To do this, you may specify the special value '*FIRST' to select the first processing sequence variables set in the PSV file or you may specify an id value to be matched against the value of the id= attribute of the <psvSet> element.  If you specify an id, the match is case-sensitive.  If this parameter is not specified or the default value of '*ALL' is used, then the activity will iterate for each processing sequence variables set present in the PSV file.

OUTPUT Parameters:

PSVINDEX:

For each iteration, this output parameter will contain the index of the current PSV set in the PSV file.  If you specify an id value for the PSVSELECT parameter, the returned index may not necessarily be 1 (one) if the selected PSV set was not the first in the file.

PSVSETID:

For each iteration, this output parameter will contain the value of the id= attribute of the <psvSet> element for the current PSV set.

PSVCOMMENT:

For each iteration, this output parameter will contain the value of the comment= attribute of the <psvSet> element for the current PSV set.