Rational Developer for System z, Version 7.6

Bidirectional runtime support

Bidirectional transformations for runtime code is performed in the CICS® Service Flow Runtime environment. The FEJBDTRN module, which is supplied with the Rational® Developer for System z® host code, is used. This module can be copied into any library that is allocated as PDSE; it appears in the CICS startup job DFHRPL list. The FEJBDTRN module is called when bidirectional conversions are needed in generated code, such as when mapping is generated between fields in messages that have different bidirectional attributes.

For Hebrew flows, you also can use the stand-alone FEJBDTRE version of the bidirectional conversion routine. FEJBDTRE can be copied into any library in the DFHRPL list (either PDS or PDSE). Functionally there is no difference between FEJBDTRN and FEJBDTRE. In order to generate a CICS Service Flow Runtime flow with calls to FEJBDRE, you must change the default bidirectional module that is specified in the Preferences window.

There are two major differences in bidirectional support of HATS and CICS Service Flow Runtime environments:
  • Bidirectional keystrokes are supported in HATS, but not in CICS Service Flow Runtime terminal flows. In order to generate the same flow for CICS and HATS environments, bidirectional keystrokes are removed from the created terminal flow. The keystrokes are then reintroduced when the HATS runtime environment is generated.
  • For CICS Service Flow Runtime environments, bidirectional conversions for interface messages are done inside the generated flow. In the HATS runtime environment, these conversions are done externally during creation of the HATS Web service, as part of bidirectional support in HATS.
For additional information about HATS and CICS, see the following topics:

FEJBDTRN module

The FEJBDTRN call is generated after the MOVE is generated, according to the following mapping:
MACGEN     IF IDD OF I-F01 NOT EQUAL SPACES AND
                  LOW-VALUES THEN
MACGEN      MOVE IDD OF I-F01 TO IDD OF V-F01
Here is an example of the call:
CALL WS-BIDITRN-CALL USING BY REFERENCE
            IDD OF V-F01 BY VALUE LENGTH OF IDD OF V-F01
            BY CONTENT INATTR OF BIDIMSG BY VALUE LENGTH OF INATTR OF BIDIMSG
            BY CONTENT 'VISUALLTR' BY VALUE 9
            BY CONTENT '424' BY VALUE 3
            BY REFERENCE BIDI-RESPONSE-CODE
            BY REFERENCE BIDI-REASON-CODE 

Attributes

Bidirectional attributes can appear explicitly. If the attributes are supplied as a part of a receive message, the attributes appear in the BIDIMSG structure that appears in the BIDIMSG copy book. These attributes are derived from the bidirectional attributes in the corresponding SFMXSD files.

The following values are valid for bidirectional attributes:
  • VISUAL
  • LOGICAL
  • LTR
  • RTL
  • SYMSWAP
  • NUMSWAP

Each attribute is followed by a parameter that specifies its length.

Codes and errors

After the FEJBDTRN call, several MOVE statements for error processing are generated, as shown in the following example:
IF BIDI-RESPONSE-CODE NOT EQUAL
            BIDI-NORMAL-RESPONSE
      MOVE +9 TO ERROR-IND
      MOVE BIDI-RESPONSE-CODE TO EDC-BIDITRN-RESP
      MOVE BIDI-REASON-CODE TO EDC-BIDITRN-REAS
      MOVE IDD OF V-F01 TO EDC-BIDITRN-DATA
      MOVE LENGTH OF IDD OF V-F01 TO EDC-BIDITRN-DATALEN
      MOVE INATTR OF BIDIMSG TO EDC-BIDITRN-INATTR
      MOVE LENGTH OF INATTR OF BIDIMSG TO EDC-BIDITRN-INATTRLEN
      MOVE 'VISUALLTR' TO EDC-BIDITRN-OUTATTR
      MOVE 9 TO EDC-BIDITRN-OUTATTRLEN
      MOVE '424' TO EDC-BIDITRN-CODEPAGE
      MOVE 3 TO EDC-BIDITRN-CODEPAGELEN
      MOVE BIDITRN-ERRMSG TO WS-ERR-MESSAGE
      MOVE BIDI-ERROR-CODE TO WS-ERR-CODE

      PERFORM POST-NAVIGATOR-ERROR-RTN
            THRU POST-NAVIGATOR-ERROR-EXIT
      PERFORM 9010-NAVIGATOR-RETURN
END-IF.

The following table outlines the BIDITRN response and reason codes. For each possible failure point within BIDITRN, there must be a response code; this needs to be propagated through the stack to the calling program. Essentially, the response code indicates the location of the failure within BIDITRN. The reason code provides details of why BIDITRN failed, at the location given by BIDITRN.

Table 1. BIDITRN responses and reason codes
Response Code Meaning Reason Code(s)
0 Success 0
1 BIDITRN inbuffer malloc failed errno values for the malloc call
2 BIDITRN codePag malloc failed errno values for the malloc call
3 BIDITRN input_attr malloc failed errno values for the malloc call
4 BIDITRN output_attr malloc failed errno values for the malloc call
5 BIDI attribute string invalid
  1. Duplicate reference of attribute
  2. No Test Type provided
  3. No Orientation Provided
  4. Other
6 BIDI attribute string format bidi_attr malloc failed errno values for the malloc call
7 BIDI attribute string format uppercase_attr malloc failed errno values for the malloc call
8 BIDITransform outbuffer malloc failed errno values for the malloc call
9 BIDITransform layout malloc failed errno values for the malloc call
10 BIDITransform inShape malloc failed errno values for the malloc call
11 BIDITransform outShape malloc failed errno values for the malloc call
12 BIDITransform set_desc malloc failed errno values for the malloc call
13 BIDITransform m_create_layout failed errno values for the malloc call
If there is an error in the BIDITRN routine, a CICS Service Flow Runtime error message notifies the runtime user. See the following example:
CIA08008E(DFHMA08008E): BIDI transformation failed. Response Code X,
         Reason Code.

HATS Web services considerations

After you export a HATS macro, you can specify bidirectional attributes for the HATS Integration Object that is created from the HATS Macro. You then can use these attributes to specify default bidirectional attributes for HATS Web services. You also can modify these attributes to specify the format of bidirectional data that is sent to or received from HATS Web services.
The following bidirectional attributes are supported:
Text Type
Specifies the format is which data is send to or received from HATS Web services. You can select Visual or Logical.
Text Orientation
Specifies the orientation of data that is sent to or received from HATS Web services. You can select LTR (left-to-right) or RTL (right-to-left).

CICS Service Flow Runtime considerations

In order to generate code that can operate in a CICS runtime environment, you must configure the generated properties file. Use the generation properties editor to change the host code page to a bidirectional value, such as 420 or 424.

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)