FIND_TPMAP

LANSA Composer

FIND_TPMAP

This activity finds the transformation map(s) linked to the specified trading partner that match the criteria specified.  Transformation maps are considered in order of the sequence (within map type) specified when the maps are linked to the trading partner.

Depending on the transformation maps linked to the trading partner and the criteria specified in the parameters to this activity, more than one matching map may be found.  Consequently, the output parameter is a list of transformation map identifiers.  If you want or intend that only one matching map be found, then you must:

a) link only the appropriate maps to the trading partner

b) ensure that the linked maps have appropriate attributes, including the applicable Data Interchange attributes

c) specify appropriate values for the activity parameters.

If more than one matching map is found, the output parameters MAPID and MAPACK will be treated as a list variable, each containing an entry for each matching transformation map that was found.  Activities that populate list variables are often followed by a LOOP processing sequence directive or other constructs to process the contents of the list.  Refer to Variables and Lists for more information about the use of list variables.

INPUT Parameters:

TRADINGPARTNER : Required

Specifies the identifier of the trading partner whose linked transformation maps are to be considered.  If you are using this activity inside a processing sequence loop that is controlled by the *TRADINGPARTNERS built-in variable list, then you should usually specify the *TRADINGPARTNER built-in variable for this parameter.  You may also use the *TRADINGPARTNER built-in variable if, in your processing sequence, you have previously explicitly set its value.  Otherwise, you should specify a variable or literal that contains the required trading partner ID.

PRODTEST : Optional

Specifies whether the transformation map must be linked to the trading partner for production (P) or test (T) transactions in order to be considered.  If not specified, then the selection of matching linked transformation map is not affected by that attribute.

MAPTYPE : Optional

Specifies the transformation map type code value that is to be matched against the type of transformation maps linked to the trading partner.  If not specified, then the selection of matching linked transformation map is not affected by that attribute.

DOCTYPE : Optional

Specifies the transaction document type identifier that is to be matched against the transaction document types associated with transformation maps linked to the trading partner.  If not specified, then the selection of matching linked transformation map is not affected by that attribute.

DIRECTION : Optional

Specifies the map direction that is to be matched against the map direction associated with transformation maps linked to the trading partner.  You should specify 'I' for inbound maps or 'O' for outbound maps.  If not specified, then the selection of matching linked transformation map is not affected by that attribute.

STANDARD : Optional

Specifies the document standard "match agency" value that is to be matched against that specified for the document standard associated with transformation maps linked to the trading partner (for example, you would specify 'X' for X12 maps).  If not specified, then the selection of matching linked transformation map is not affected by that attribute.

VERSION : Optional

Specifies the document standard "match version" value that is to be matched against that specified for the document standard associated with transformation maps linked to the trading partner (for example, you would specify '004010' for X12 version 004010 maps).  If not specified, then the selection of matching linked transformation map is not affected by that attribute.

TRANSACTIONID : Optional

Specifies the map transaction ID that is to be matched against the map transaction ID associated with transformation maps linked to the trading partner.  For example, you might specify '850' for maps that process X12 transaction 850.  If not specified, then the selection of matching linked transformation map is not affected by that attribute.

VERSION : Optional

Specifies the map standard version that is to be matched against the map standard version associated with transformation maps linked to the trading partner.  If not specified, then the selection of matching linked transformation map is not affected by that attribute.

OUTPUT Parameters:

MAPCOUNT

Upon completion, this variable will contain a count of the number of matching transformation maps found.  (This will be the same as the number of items in the MAPID list).

MAPID

Upon successful completion, this parameter will contain a list of the identifiers (names) of transformation maps linked to the specified trading partner that match the specified criteria.  In many cases, you might expect one matching map (but this is subject to appropriate entry of map attributes and activity parameter values).  In such cases, you simply refer to the first (and assumed to be the only) entry in the list.  In other cases, you may expect more than one matching linked transformation map.  In that event, you should process the resulting list in this parameter using a LOOP directive in the processing sequence.

Note that you can assign the value(s) contained in this parameter to the *TRANSFORM built-in variable.  You can then directly access further attributes of the map using the supported qualified forms of the *TRANSFORM built-in variable.

MAPACK

Upon successful completion, this parameter will contain a list of the "acknowledgement required" flags corresponding to the matching transformation maps identified in the MAPID parameter list.  This value (Y/N) comes from the "Linked Transformation Maps" definition for the trading partner and transformation map and specifies whether the transaction processed by the transformation map for the trading partner requires an acknowledgement to be sent.