Rational Developer for System z

Dynamic bidirectional attributes

You can set dynamic bidirectional attributes in service flow projects. This feature enables the service requester to dynamically specify bidirectional attributes of interface messages, as part of user data.
The interface input message is described by the following structure:
************************************************
* I-F01 copy book
************************************************
      03 I-F01.
      05 IDD             PIC X(6) VALUE SPACES.
      05 FUNC            PIC X(4) VALUE SPACES.
      05 INATTR          PIC X(25) VALUE SPACES.
      05 OUTATTR         PIC X(25) VALUE SPACES.
In this example, INATTR and OUTATTR are not actual data supplied to the service; they are the bidirectional attributes of receive and reply messages. You can add this data to an existing request or create a new request that includes the attributes. Other valid names can be used in placed of INATTR and OUTATTR. You can both, either, or none of the attributes.
In order to use this metadata as a base for bidirectional conversions in the runtime environment, you must make the following modifications during the creation of the flow:
  • The set BidiAttributes property in the SFMXSD file must be set to one of the following:
    • (Receive messages) RECEIVE_MESSAGE_ATTRIBUTES
    • (Reply messages) REPLY_MESSAGE_ATTRIBUTES
  • When metadata exists for the receive message, a mapping must be created between the INATTR field of the receive message and the INATTR field of the BIDIMSG message that is created during the initialization of the bidirectional project.
  • When metadata exists for the reply message, a mapping must be created between the OUTATTR field of the receive message and the OUTATTR field of the BIDIMSG message that is created during the initialization of the bidirectional project.

BIDIMSG message file

When you create a bidirectional project, the BIDIMSG message file is created in the interface subproject. The message file includes a message with the following elements:

The initial values of INATTR and OUTATTR are based on the values that are specified in the Bidirectional Settings page of the Preferences window, You can use the flow message editor to change these values.

The INATTR and OUTATTR values are over-written dynamically, according to values supplied by the service requester in the INATTR and OUTATTR fields of the receive message.

Copy book

A separate copy book is included in the generated code. The copy book includes the following definitions:
************************************************************
* BIDIMSG copy book
************************************************************
03 BIDIMSG.
05 INATTR    PIC X(25)   VALUE 'VisualLTR'.
05 OUTATTR   PIC X(25)   VALUE 'VisualLTR'.
If mapping was done only for the receive message, the following code is generated:
MACGEN      IF INATTR OF I-F01 NOT EQUAL SPACES   AND LOW-VALUES  THEN
MACGEN         MOVE INATTR OF I-F01 TO INATTR OF  BIDIMSG
MACGEN      END-IF .
            CALL WS-BIDITRN-CALL USING BY REFERENCE   IDD OF V-F01
                  BY VALUE LENGTH OF IDD OF V-F01
MACGEN            BY CONTENT INATTR OF BIDIMSG BY VALUE LENGTH OF INATTR OF BIDIMSG
MACGEN            BY CONTENT 'VISUALLTR' BY VALUE 9
MACGEN            BY CONTENT '424' BY VALUE 3
                  BY REFERENCE BIDI-RESPONSE-CODE ,  BY REFERENCE BIDI-REASON-CODE

Feedback