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.
MACGEN IF IDD OF I-F01 NOT EQUAL SPACES AND
LOW-VALUES THEN
MACGEN MOVE IDD OF I-F01 TO IDD OF V-F01
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
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.
Each attribute is followed by a parameter that specifies its length.
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.
| 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 |
|
| 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 |
CIA08008E(DFHMA08008E): BIDI transformation failed. Response Code X,
Reason Code.