home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / o22516d1.zip / ECI.@OC / ECI.DOC
Text File  |  1992-09-16  |  54KB  |  908 lines

  1.                                             CICS OS/2 VERSION 1.20 ECI
  2.                                                        ISSUE DATE:  MARCH, 1992
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   CHAPTER 1.  EXTERNAL CALL INTERFACE (ECI)
  9.   _________________________________________
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.   WHY USE ECI?
  18.   ____________
  19.  
  20.                       When CICS OS/2 Version 1.20 is running on a system the
  21.                       External Call Interface (ECI) allows a non CICS program
  22.                       to initiate programs in CICS OS/2 Version 1.20.  This
  23.                       non-CICS program does not issue any normal CICS commands
  24.                       itself but uses ECI to request CICS OS/2 Version 1.20 to
  25.                       run a program on its behalf.  The various options
  26.                       available for calling CICS programs via ECI give the
  27.                       programmer a great deal of power.  Calls can be single or
  28.                       parallel, using Logical Units of Work (LUWs).  They can
  29.                       also be either synchronous or asynchronous.
  30.  
  31.                       The real strength of ECI is in the way the CICS program
  32.                       that is the object of the call is invoked.  In fact, to
  33.                       this called program it appears that the caller was
  34.                       another CICS program that has issued an EXEC CICS LINK
  35.                       command.  The called program is presented with a CICS
  36.                       COMMAREA containing the data passed on the ECI call, and,
  37.                       when it issues an EXEC CICS RETURN, the updated COMMAREA
  38.                       will be passed back to the calling program.
  39.  
  40.                       The invisibility of the calling program to the called
  41.                       program gives significant advantages:
  42.  
  43.                       o   When combined with the Distributed Program Link (DPL)
  44.                           function applications can call CICS programs on any
  45.                           connected CICS system.
  46.  
  47.                       o   CICS applications can be ported from host to PWS and
  48.                           exploit the graphical interfaces of the PWS with
  49.                           minimal effort.
  50.  
  51.                           You can do this by writing the applications business
  52.                           logic as a set of LINKable services and calling these
  53.                           from either BMS or, via ECI, a graphical CUA front
  54.                           end.
  55.  
  56.                       o   It is possible to write an application in which the
  57.                           business logic resides on a host CICS Application
  58.                           Owning Region (AOR) with:
  59.  
  60.                               A BMS front end for users of 3270 devices which
  61.                               transaction route from host CICS Terminal Owning
  62.                               Regions (TORs) and call the business logic
  63.                               locally.
  64.  
  65.                               A graphical front end for PWS users.  They can
  66.                               call the business logic from ECI using DPL.
  67.  
  68.  
  69.   HOW TO MAKE ECI CALLS
  70.   _____________________
  71.  
  72.                       An ECI program is a discrete program which is
  73.                       executed outside the environment of CICS OS/2 Version
  74.                       1.20.  As this program calls another program which is
  75.                       executed inside the environment of CICS OS/2 Version
  76.                       1.20, there is a separate task of writing the called
  77.                       program.  This is a standard CICS application program.
  78.  
  79.                       Calls are made via a control block - ECI-PARMS, defined
  80.                       in supplied COBOL copybook FAAECIW.CBL, or ECI_PARMS,
  81.                       defined in supplied C header file FAAECIH.H.  Data is
  82.                       exchanged in a COMMAREA, as for normal CICS inter-program
  83.                       communication.
  84.  
  85.                       The method of calling ECI for C programs is:
  86.  
  87.                           ECI_PARMS EciBlock;
  88.                                    .
  89.                                    .
  90.                                    .
  91.                           Response = FaaExternalCall(&EciBlock);
  92.  
  93.                       The method of calling ECI for COBOL programs is either:
  94.  
  95.                           CALL '_FAAEXTERNALCALL' USING ECI-PARMS.
  96.  
  97.                       or
  98.  
  99.                           CALL '_FAAECI' USING ECI-PARMS.
  100.  
  101.                       Unused fields in the control block should be filled with
  102.                       zeroes.  Often the simplest means of achieving this is to
  103.                       fill the entire control block with zeroes and then to
  104.                       initialize the specific fields which are required.
  105.  
  106.  
  107.   TYPES OF CALL
  108.   _____________
  109.  
  110.                       The type of ECI call is controlled by the setting of the
  111.                       ECI-CALL-TYPE parameter in the control block.  Calls can
  112.                       be either single or parallel, and either synchronous or
  113.                       asynchronous.  Several calls can be tied together in one
  114.                       Logical Unit of Work (LUW) by setting the ECI-EXTEND-MODE
  115.                       parameter to ECI-EXTENDED.
  116.  
  117.  
  118.   SINGLE CALLS
  119.  
  120.  
  121.                       Only one of these calls can be made at a time from a
  122.                       process.
  123.  
  124.                       These calls are retained so that programs written for
  125.                       previous releases of CICS OS/2 Version 1.20 will still
  126.                       run.  As serial calls give no advantage over parallel
  127.                       calls, it is recommended that only parallel calls be used
  128.                       for new programs.
  129.  
  130.  
  131.   Single synchronous call (ECI-SYNC-CALL)
  132.  
  133.                       The calling program makes a single call and has to wait
  134.                       for the reply to come back.  A parallel synchronous call
  135.                       can be used in exactly the same way.
  136.  
  137.  
  138.   Single asynchronous call (ECI-ASYNC-CALL)
  139.  
  140.                       Asynchronous processing is used for Presentation Manager
  141.                       programs only.  The called program returns an initial
  142.                       response code to the calling program to indicate whether
  143.                       it accepts the request.  If it accepts, the processing is
  144.                       carried out in a separate thread, and a message is posted
  145.                       to the PM window specified in ECI-WINDOW-HANDLE when it
  146.                       has finished.
  147.  
  148.  
  149.   PARALLEL CALLS
  150.  
  151.                       These calls are recommended for new programs.
  152.  
  153.                       Parallel processing of calls allows  up to 16 LUWs to be
  154.                       handled simultaneously for each session.
  155.  
  156.                       Before making the first call of a LUW, ECI-LUW-TOKEN
  157.                       should be set to zero.  When the calling program submits
  158.                       the first call ECI-LUW-TOKEN is returned with a valid
  159.                       token.  The program must use this token as input to the
  160.                       subsequent calls in the LUW to make the logical
  161.                       connection.
  162.  
  163.  
  164.   Parallel synchronous call (ECI-SYNC-PARALLEL)
  165.  
  166.                       As this is a synchronous call the calling thread is
  167.                       forced to wait for a reply before it can continue with
  168.                       another task.  The returned LUW token can then be used in
  169.                       extended calls.
  170.  
  171.  
  172.   Parallel asynchronous call (ECI-ASYNC-PARALLEL)
  173.  
  174.                       When the calling program submits the first call it receives
  175.                       a LUW token which it uses as input to the subsequent calls
  176.                       in the LUW to make the logical connection.
  177.  
  178.                       As this is an asynchronous call the LUW is immediately
  179.                       returned.  A Presentation Manager message indicating
  180.                       completion is posted later.  A second call should not be
  181.                       made within this LUW until the completion message is
  182.                       received.
  183.  
  184.  
  185.  
  186.   SAMPLE ECI PROGRAMS
  187.   ___________________
  188.  
  189.                       The two illustrative fragments of programs shown here -
  190.                       one each in C and COBOL - both perform the same function.
  191.  
  192.                       They both perform the following tasks:
  193.  
  194.                       1.  Allocate storage for the control block ECI-PARMS
  195.                           (COBOL), EciBlock (C)
  196.  
  197.                       2.  Allocate the commarea, COMMAREA (COBOL), CommArea (C)
  198.  
  199.                       3.  Fill the commarea with 0's
  200.  
  201.                       4.  Set all the components of the control block to 0
  202.  
  203.                       5.  Put the required control information into the control
  204.                           block.  The examples shown here use a call type of
  205.                           ECI-SYNC-PARALLEL, which means that several LUWs can
  206.                           be handled simultaneously.
  207.  
  208.                       6.  Make the ECI call
  209.  
  210.                       7.  Check the return code and take any necessary remedial
  211.                           action
  212.  
  213.                       8.  Save the LUW token for use in a future call in the
  214.                           same LUW.  For the future call the LUW token should
  215.                           be passed into the control block so that the calls
  216.                           can be logically tied together.
  217.  
  218.  
  219.  
  220.  
  221.   A SAMPLE ECI PROGRAM IN COBOL
  222.  
  223.  
  224.  
  225.  
  226.                 +----------------------------------------------------------+
  227.                 |                                                          |
  228.                 |         *********************************************    |
  229.                 |         * A COBOL SAMPLE PROGRAM TO SHOW USE OF ECI *    |
  230.                 |         *********************************************    |
  231.                 |          IDENTIFICATION DIVISION.                        |
  232.                 |          PROGRAM-ID. SAMPLECI.                           |
  233.                 |          ENVIRONMENT DIVISION.                           |
  234.                 |          DATA DIVISION.                                  |
  235.                 |          WORKING-STORAGE SECTION.                        |
  236.                 |                                                          |
  237.                 |            01 PROG-FINISH  PIC X(11) VALUE 'Program Fin'.|
  238.                 |            01 WS-LUW-SAVE  PIC X(4)                      |
  239.                 |            01 WS-COMMAREA  PIC X(18)                     |
  240.                 |                                                          |
  241.                 |         * Copy in the ECI call parameter block definition|
  242.                 |                                                          |
  243.                 |          COPY FAAECIW.                                   |
  244.                 |         ****************************************         |
  245.                 |          PROCEDURE DIVISION.                             |
  246.                 |         ****************************************         |
  247.                 |         * Set up the ECI call parameters                 |
  248.                 |         *                                                |
  249.                 |              MOVE LOW-VALUES TO WS-COMMAREA.             |
  250.                 |              SET ECI-SYNC-PARALLEL TO TRUE.              |
  251.                 |              MOVE 'FAADECIC' TO ECI-PROGRAM-NAME.        |
  252.                 |              MOVE 'SYSAD   ' TO ECI-USERID.              |
  253.                 |              MOVE 'SYSAD   ' TO ECI-PASSWORD.            |
  254.                 |              MOVE 'ABCD'     TO ECI-TRANSID.             |
  255.                 |              MOVE SPACES     TO ECI-ABEND-CODE.          |
  256.                 |              SET ECI-COMMAREA TO ADDRESS OF WS-COMMAREA. |
  257.                 |              MOVE 18 TO ECI-COMMAREA-LENGTH.             |
  258.                 |              MOVE 5 TO ECI-TIMEOUT.                      |
  259.                 |              SET ECI-EXTENDED TO TRUE.                   |
  260.                 |         *                                                |
  261.                 |         * Call program FAADECIC through the ECI interface|
  262.                 |         * program                                        |
  263.                 |              CALL '_FAAEXTERNALCALL' USING ECI-PARMS.    |
  264.                 |         *                                                |
  265.                 |         * General error checking                         |
  266.                 |         *                                                |
  267.                 |              MOVE RETURN-CODE TO ECI-ERROR-ID            |
  268.                 |              IF ECI-NO-ERROR                             |
  269.                 |                  MOVE ECI-LUW-TOKEN TO WS-LUW-SAVE       |
  270.                 |                                                          |
  271.                 |              ELSE                                        |
  272.                 |                              .                           |
  273.                 |                              .                           |
  274.                 |                              .                           |
  275.                 |              END-IF.                                     |
  276.                 |         * Program termination                            |
  277.                 |                                                          |
  278.                 |              DISPLAY PROG-FINISH.                        |
  279.                 |                                                          |
  280.                 |          STOP RUN.                                       |
  281.                 |                                                          |
  282.                 +-------------------------------------------------------   +
  283.                 Figure 1. A sample ECI COBOL program
  284.  
  285.  
  286.  
  287.   A SAMPLE ECI PROGRAM IN C
  288.  
  289.  
  290.                 +------------------------------------------------------------+
  291.                 |                                                            |
  292.                 |   /************************************************/       |
  293.                 |   /* A 'C' sample program to demonstrate the use  */       |
  294.                 |   /* of the ECI interface                         */       |
  295.                 |   /************************************************/       |
  296.                 |                                                            |
  297.                 |   #include <memory.h>                                      |
  298.                 |   #include <string.h>                                      |
  299.                 |   #include <faaecih.h>                                     |
  300.                 |                                                            |
  301.                 |   #define COMMAREA_SIZE 18                                 |
  302.                 |                                                            |
  303.                 |   void cdecl main()                                        |
  304.                 |   {                                                        |
  305.                 |       ECI_PARMS EciBlock;                /* ECI parameter*/|               */
  306.                 |                                          /* block        */|
  307.                 |       int       ECIRetCode;              /* Return code  */|
  308.                 |                                          /* from the ECI */|
  309.                 |                                          /* call         */|
  310.                 |       char CommArea[COMMAREA_SIZE];      /* Comm area    */|
  311.                 |                                          /* storage      */|
  312.                 |       int       ECILuwToken;             /* LUW token      |               */
  313.                 |                                                            |
  314.                 |       memset(CommArea, 0, COMMAREA_SIZE);                  |
  315.                 |       memset(&EciBlock, 0, sizeof(ECI_PARMS));             |
  316.                 |                                                            |
  317.                 |       /***********************/                            |
  318.                 |       /* Initialize EciBlock */                            |
  319.                 |       /***********************/                            |
  320.                 |                                                            |
  321.                 |       EciBlock.eci_call_type = ECI_SYNC_PARALLEL;          |
  322.                 |       memcpy(EciBlock.eci_program_name, "FAADECIC", 8)     |
  323.                 |       memcpy(EciBlock.eci_userid, "SYSAD   ", 8);          |
  324.                 |       memcpy(EciBlock.eci_password, "SYSAD   ", 8);        |
  325.                 |       memcpy(EciBlock.eci_transid, "ABCD", 4);             |
  326.                 |       EciBlock.eci_commarea = CommArea;                    |
  327.                 |       EciBlock.eci_commarea_length = COMMAREA_SIZE;        |
  328.                 |       EciBlock.eci_timeout = 5;                            |
  329.                 |       EciBlock.eci_extend_mode = ECI_EXTENDED;             |
  330.                 |                                                            |
  331.                 |       ECIRetCode = FaaExternalCall(&EciBlock);             |
  332.                 |                                                            |
  333.                 |       if (ECIRetCode != ECI_NO_ERROR)                      |
  334.                 |       {                                                    |
  335.                 |           /* An error has been encountered - take */       |
  336.                 |           /* remedial action                      */       |
  337.                 |               .                  .                         |
  338.                 |               .                  .                         |
  339.                 |       }                                                    |
  340.                 |       else                                                 |
  341.                 |       {                                                    |
  342.                 |           /* Save LUW token for reuse */                   |
  343.                 |           ECILuwToken = ECIBlock.eci_luw_token;            |
  344.                 |               .                  .                         |
  345.                 |               .                  .                         |
  346.                 |       }                                                    |
  347.                 |           .                  .                    .        |
  348.                 |           .                  .                    .        |
  349.                 |   }                                                        |
  350.                 |                                                            |
  351.                 +------------------------------------------------------------+
  352.                 Figure 2. A sample ECI C program
  353.  
  354.  
  355.  
  356.   BUILDING ECI PROGRAMS
  357.   _____________________
  358.  
  359.                       An ECI program is a standard stand-alone program written
  360.                       for OS/2.  It can be written in either C or COBOL and the
  361.                       only requirement is that it must be linked with the
  362.                       FAACLIB library.  As the FAACLIB library is independent
  363.                       of memory model for C, the ECI program itself can use any
  364.                       memory model.  ECI programs written in COBOL should use
  365.                       the large memory model.
  366.  
  367.                       COBOL programs should use the FAAECIW copybook.
  368.  
  369.                       C programs should include FAAECI.H which defines the call
  370.                       interface.
  371.  
  372.                       A program, ECIPROG, can be built from a single source
  373.                       file as:
  374.  
  375.                       FOR C PROGRAMS: CL ECIPROG.C /Link FAACLIB
  376.  
  377.                       FOR COBOL PROGRAMS: COBOL ECIPROG
  378.  
  379.                                 LINK /Nod ECIPROG,,,PCOBOL+DOSCALLS+FAACLIB;
  380.  
  381.                       ECI programs will not run in the DOS box.
  382.  
  383.                       The entry point of the ECI is ordinal 1 and is in
  384.                       FAACICS.DLL.  In languages that cannot call explicit
  385.                       entry points in a DLL, it is therefore possible to call
  386.                       the DLL when an ECI call is required.
  387.  
  388.  
  389.   EXTERNAL CALL INTERFACE (ECI)
  390.   _____________________________
  391.  
  392.                       o   ECI allows a non-CICS OS/2 application to run a CICS
  393.                           program as a subroutine
  394.  
  395.                       o   Data is exchanged in a "COMMAREA" as for normal CICS
  396.                           inter-program communication
  397.  
  398.                       o   A special asynchronous form of the interface is
  399.                           provided to give you easier access from Presentation
  400.                           Manager applications.
  401.  
  402.                       ECI is only available with OS/2 workstations.
  403.  
  404.                       Each set of extended calls ties up one free task for the
  405.                       duration of its execution.  The execution of the task
  406.                       ends either when the ECI-EXTEND-MODE parameter is set to
  407.                       one of ECI-NO-EXTEND, ECI-COMMIT or ECI-BACKOUT, or when
  408.                       the call returns ECI-ERR-TRANSACTION-ABEND.
  409.  
  410.                       This means that you must define enough free tasks in the
  411.                       System Initialization Table (SIT) to service the maximum
  412.                       expected number of calls.  Calls will continue to be
  413.                       accepted when there are no free tasks, but they cannot
  414.                       run until a free task becomes available.
  415.  
  416.  
  417.   EXTERNAL CALL PARAMETER BLOCK
  418.  
  419.                       You should fill the entire parameter block with nulls
  420.                       (0x00) before the start of each logical unit of work.
  421.  
  422.                       COBOL parameters are in uppercase and separated by
  423.                       hyphens, ("ECI-CALL-TYPE"), whereas C parameters are in
  424.                       lowercase and separated by underscores,
  425.                       ("eci_call_type").  COBOL and C defined variables are in
  426.                       uppercase,  separated by hyphens in COBOL
  427.                       ("ECI-SYNC-PARALLEL"), and separated by underscores in C
  428.                       ("ECI_SYNC_PARALLEL").  The list below gives them in
  429.                       COBOL format.
  430.  
  431.                       ECI-CALL-TYPE (SHORT)
  432.                                 A value which determines whether the call is
  433.                                 processed synchronously or asynchronously or
  434.                                 whether calls are processed singly or in
  435.                                 parallel.  Single processing of calls is
  436.                                 retained to ensure that backwards compatibility
  437.                                 is maintained.
  438.  
  439.                                 Values for this field are as follows:
  440.  
  441.                                 ECI-SYNC-CALL
  442.                                           Single synchronous call
  443.                                 ECI-ASYNC-CALL
  444.                                           Single asynchronous call
  445.                                 ECI-SYNC-PARALLEL
  446.                                           Parallel synchronous call
  447.                                 ECI-ASYNC-PARALLEL
  448.                                           Parallel asynchronous call
  449.  
  450.                       ECI-PROGRAM-NAME (CHAR8)
  451.                                 An 8 character field containing the name of the
  452.                                 program you wish CICS OS/2 Version 1.20 to
  453.                                 execute.  Unused characters should be padded
  454.                                 out with spaces.  You are normally recommended
  455.                                 to use only upper case characters in this field
  456.                                 as it is sensitive to case.
  457.  
  458.                       ECI-USERID (CHAR8)
  459.                                 An 8 character field containing a valid user
  460.                                 id.  Unused characters should be padded out
  461.                                 with spaces.
  462.  
  463.                       ECI-PASSWORD (CHAR8)
  464.                                 An 8 character field containing a valid
  465.                                 password.  Unused characters should be padded
  466.                                 out with spaces.
  467.  
  468.                       ECI-TRANSID (CHAR4)
  469.                                 A 4 character field containing the CICS OS/2
  470.                                 Version 1.20 transaction code.  If specified,
  471.                                 the program will run under this ID.
  472.  
  473.                       ECI-ABEND-CODE (CHAR4)
  474.                                 A 4 character field in which a CICS OS/2
  475.                                 Version 1.20 abend code is returned if the
  476.                                 transaction abends (synchronous calls only).
  477.                                 Unused characters are padded out with spaces.
  478.  
  479.                       ECI-COMMAREA (PVOID)
  480.                                 A pointer to an area of memory not larger than
  481.                                 32767 bytes that the called CICS program will
  482.                                 receive as its COMMAREA.  If you are making an
  483.                                 asynchronous call, this storage should not be
  484.                                 reused until the completion message has been
  485.                                 posted, as CICS will place the final contents
  486.                                 of the COMMAREA in this area.
  487.  
  488.                                 Use a null pointer and set the length,
  489.                                 specified in ECI-COMMAREA-LENGTH, to zero if no
  490.                                 COMMAREA is required
  491.  
  492.                       ECI-COMMAREA-LENGTH (SHORT)
  493.                                 The length of the above COMMAREA in bytes.  If
  494.                                 no COMMAREA is required then this should be set
  495.                                 to zero and ECI-COMMAREA should be set to a
  496.                                 null pointer.
  497.  
  498.                       ECI-TIMEOUT (SHORT)
  499.                                 A value specifying the maximum wait time in
  500.                                 seconds for CICS OS/2 Version 1.20 to respond
  501.                                 to the request.  Valid entries are in the range
  502.                                 0 to 32767 - anything larger would constitute a
  503.                                 negative value, which is not allowed.  A value
  504.                                 of 0 forces an indefinite wait.
  505.  
  506.                                 Note that when a timeout occurs control is
  507.                                 returned to the calling program, however the
  508.                                 called program will continue to run to
  509.                                 completion, when any changes will be rolled
  510.                                 back.
  511.  
  512.                       ECI-SYS-RETURN-CODE (SHORT)
  513.                                 The error number of any OS/2 system error which
  514.                                 may occur is returned in this variable.
  515.  
  516.                       ECI-EXTEND-MODE (SHORT)
  517.                                 A value which determines whether or not the
  518.                                 connection to CICS OS/2 Version 1.20 is
  519.                                 terminated at the end of this call.
  520.  
  521.                                 Values for this field are as follows:
  522.  
  523.                                 ECI-NO-EXTEND
  524.                                           Terminate connection to CICS OS/2
  525.                                           when this call is finished.  This
  526.                                           results in an automatic end of task
  527.                                           sync point for CICS resources thus
  528.                                           ending the Logical Unit of Work
  529.                                 ECI-EXTENDED
  530.                                           Retain the connection to CICS OS/2
  531.                                           when this call is finished.  This
  532.                                           enables a Logical Unit of Work to
  533.                                           span several calls.
  534.                                 ECI-CANCEL
  535.                                           Has the same effect as ECI-COMMIT.
  536.                                 ECI-COMMIT
  537.                                           Cancel a previous connection to CICS
  538.                                           OS/2.  This performs the equivalent
  539.                                           of ECI-NO-EXTEND with a no-op
  540.                                           program.  This terminates the current
  541.                                           Logical Unit of Work.
  542.                                 ECI-BACKOUT
  543.                                           Forces a transaction to roll back to
  544.                                           its original state.
  545.  
  546.                       ECI-WINDOW-HANDLE (HWND)
  547.                                 (Asynchronous calls only.)  The handle of the
  548.                                 window to which the reply message will be
  549.                                 posted.
  550.  
  551.                       ECI-MESSAGE-ID (SHORT)
  552.                                 (Asynchronous calls only.)  The message
  553.                                 identifier to be used for posting the reply
  554.                                 message.
  555.  
  556.                       ECI-MESSAGE-QUALIFIER (SHORT)
  557.                                 (Asynchronous calls only.)  An optional value
  558.                                 to allow you to identify each asynchronous call
  559.                                 if you are making more than one.
  560.  
  561.                       ECI-LUW-TOKEN (LONG)
  562.                                 (Parallel calls only.)  A value which allows
  563.                                 you to identify each parallel call if you are
  564.                                 making more than one.  It is also used to tie
  565.                                 parallel calls to one LUW.  It should initially
  566.                                 be set to zero and CICS will update it with the
  567.                                 value of a valid token on the first or only
  568.                                 call of a LUW.
  569.  
  570.                       ECI-RESERVED (CHAR6)
  571.                                 This field should be initialized to all 0's.
  572.  
  573.  
  574.   PRESENTATION MANAGER REPLY MESSAGES
  575.  
  576.                       When a program makes an asynchronous call, CICS OS/2
  577.                       Version 1.20 returns the result in a PM message window
  578.                       using the specified window handle and message id.  The
  579.                       message is divided into two parameters, as shown below:
  580.  
  581.                       MPARAM1
  582.  
  583.                                      HIGH ORDER 16 BITS  Specified message
  584.                                                          qualifier
  585.                                      LOW ORDER 16 BITS   Return code
  586.  
  587.                       MPARAM2        4-character abend code if required
  588.  
  589.  
  590.   MINIMUM SET OF INPUT PARAMETERS
  591.  
  592.                       This table shows which input parameters are necessary for
  593.                       each type of call.
  594.  
  595.             +-----------------------------------------------------------------+
  596.             | Table 1. Required parameter vs call type                        |
  597.             +--------------+----------+----------+-------------+--------------+
  598.             | PARAMETER    |   ECI-   |   ECI-   |    ECI-     |    ECI-      |
  599.             | ECI-         |SYNC-CALL |ASYNC-CALL|SYNC-PARALLEL|ASYNC-PARALLEL|
  600.             +--------------+----------+----------+-------------+--------------+
  601.             | CALL-TYPE    |   YES    |   YES    |    YES      |    YES       |
  602.             +--------------+----------+----------+-------------+--------------+
  603.             | PROGRAM-NAME |   YES    |   YES    |    YES      |    YES       |
  604.             |              |  except  |  except  |   except    |   except     |
  605.             |              |   when   |   when   |    when     |    when      |
  606.             |              |cancelling|cancelling|  cancelling | cancelling   |
  607.             |              |     or   |     or   |     or      |     or       |
  608.             |              |  backing |  backing |  backing    |  backing     |
  609.             |              |    out   |    out   |    out      |    out       |
  610.             +--------------+----------+----------+-------------+--------------+
  611.             | USERID       |   YES    |   YES    |    YES      |    YES       |
  612.             +--------------+----------+----------+-------------+--------------+
  613.             | PASSWORD     |   YES    |   YES    |    YES      |    YES       |
  614.             +--------------+----------+----------+-------------+--------------+
  615.             | TRANSID      | optional | optional |  optional   |  optional    |
  616.             +--------------+----------+----------+-------------+--------------+
  617.             | COMMAREA     | optional | optional |  optional   |  optional    |
  618.             +--------------+----------+----------+-------------+--------------+
  619.             | COMMAREA-    | optional | optional |  optional   |  optional    |
  620.             | LENGTH       |          |          |             |              |
  621.             +--------------+----------+----------+-------------+--------------+
  622.             | TIMEOUT      |   YES    |   YES    |    YES      |    YES       |
  623.             +--------------+----------+----------+-------------+--------------+
  624.             | EXTEND-MODE  |   YES    |   YES    |    YES      |    YES       |
  625.             +--------------+----------+----------+-------------+--------------+
  626.             | WINDOW-HANDLE|          |   YES    |             |    YES       |
  627.             +--------------+----------+----------+-------------+--------------+
  628.             | MESSAGE-ID   |          |   YES    |             |    YES       |
  629.             +--------------+----------+----------+-------------+--------------+
  630.             | MESSAGE-     |          | optional |             |  optional    |
  631.             | QUALIFIER    |          |          |             |              |
  632.             +--------------+----------+----------+-------------+--------------+
  633.             | LUW-TOKEN    |          |          |    YES      |    YES       |
  634.             +--------------+----------+----------+-------------+--------------+
  635.  
  636.  
  637.   EXTERNAL CALL RETURN NOTIFICATION
  638.   _________________________________
  639.  
  640.                       The possible return codes for a subroutine call to a CICS
  641.                       OS/2 Version 1.20 program are as follows:
  642.  
  643.  
  644.                       +--------------------------------------------------------+
  645.                       | Table 2. Return notification for external calls        |
  646.                       +----------------------------+---------------------------+
  647.                       | MESSAGE                    | MEANING                   |
  648.                       +----------------------------+---------------------------+
  649.                       | ECI-NO-ERROR               | The transaction finished  |
  650.                       |                            | with no errors            |
  651.                       +----------------------------+---------------------------+
  652.                       | ECI-ERR-INVALID-DATA-LENGTH| Either a positive user    |
  653.                       |                            | data length for a null    |
  654.                       |                            | user data area, or a user |
  655.                       |                            | data length of 0 for a    |
  656.                       |                            | non-null user data area   |
  657.                       +----------------------------+---------------------------+
  658.                       | ECI-ERR-INVALID-EXTEND-MODE| The ECI-EXTEND-MODE field |
  659.                       |                            | contains an invalid value |
  660.                       +----------------------------+---------------------------+
  661.                       | ECI-ERR-NO-CICS            | CICS OS/2 Version 1.20 is |
  662.                       |                            | not running               |
  663.                       +----------------------------+---------------------------+
  664.                       | ECI-ERR-CICS-DIED          | CICS OS/2 Version 1.20 is |
  665.                       |                            | no longer running This    |
  666.                       |                            | error is only possible if |
  667.                       |                            | an extended LUW was       |
  668.                       |                            | outstanding               |
  669.                       +----------------------------+---------------------------+
  670.                       | ECI-ERR-REQUEST-TIMEOUT    | CICS OS/2 Version 1.20    |
  671.                       |                            | did not accept the        |
  672.                       |                            | request within the        |
  673.                       |                            | time-out period           |
  674.                       |                            | specified                 |
  675.                       +----------------------------+---------------------------+
  676.                       | ECI-ERR-RESPONSE-TIMEOUT   | CICS OS/2 Version 1.20    |
  677.                       |                            | accepted the request but  |
  678.                       |                            | did not finish processing |
  679.                       |                            | it within the time-out    |
  680.                       |                            | period you specified      |
  681.                       +----------------------------+---------------------------+
  682.                       | ECI-ERR-TRANSACTION-ABEND  | CICS OS/2 Version 1.20    |
  683.                       |                            | accepted the request but  |
  684.                       |                            | the transaction abended.  |
  685.                       +----------------------------+---------------------------+
  686.                       | ECI-ERR-EXEC-NOT-RESIDENT  | The program tried to      |
  687.                       |                            | cancel a previous request |
  688.                       |                            | when there was none       |
  689.                       |                            | outstanding               |
  690.                       +----------------------------+---------------------------+
  691.                       | NOTE:  ECI-ERR-EXEC-NOT-RESIDENT and                   |
  692.                       | ECI-ERR-LUW-TOKEN share the same value and are         |
  693.                       | logically equivalent.                                  |
  694.                       +----------------------------+---------------------------+
  695.                       | ECI-ERR-LUW-TOKEN          | The LUW is outside the    |
  696.                       |                            | valid range or it is the  |
  697.                       |                            | wrong LUW token           |
  698.                       +----------------------------+---------------------------+
  699.                       | ECI-ERR-SYSTEM-ERROR       | An internal error         |
  700.                       |                            | occurred                  |
  701.                       +----------------------------+---------------------------+
  702.                       | ECI-ERR-NULL-WIN-HANDLE    | An asynchronous call with |
  703.                       |                            | the window handle set to  |
  704.                       |                            | 0 was specified.          |
  705.                       +----------------------------+---------------------------+
  706.                       | ECI-ERR-NULL-MESSAGE-ID    | An asynchronous call with |
  707.                       |                            | the message id set to 0   |
  708.                       |                            | was specified.            |
  709.                       +----------------------------+---------------------------+
  710.                       | ECI-ERR-THREAD-CREATE-ERROR| CICS OS/2 Version 1.20    |
  711.                       |                            | failed to create the      |
  712.                       |                            | thread to process an      |
  713.                       |                            | asynchronous call         |
  714.                       +----------------------------+---------------------------+
  715.                       | ECI-ERR-INVALID-CALL-TYPE  | The call parameter is     |
  716.                       |                            | invalid                   |
  717.                       +----------------------------+---------------------------+
  718.                       | ECI-ERR-ALREADY-ACTIVE     | Attempt to use more than  |
  719.                       |                            | one single call at one    |
  720.                       |                            | time                      |
  721.                       +----------------------------+---------------------------+
  722.                       | ECI-ERR-RESOURCE-SHORTAGE  | CICS has no space in the  |
  723.                       |                            | interval control table    |
  724.                       +----------------------------+---------------------------+
  725.                       | ECI-ERR-NO-SESSIONS        | User is trying to exceed  |
  726.                       |                            | maximum of 16 calls       |
  727.                       |                            | within 1 process          |
  728.                       +----------------------------+---------------------------+
  729.  
  730.  
  731.  
  732.   CHAPTER 2.  TRACE POINT INFORMATION
  733.   ___________________________________
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.   STANDARD TRACE POINTS AND MESSAGES
  742.   __________________________________
  743.  
  744.                       The following table lists the standard ECI trace points,
  745.                       grouped according to the module they reside in.
  746.                       For each trace point, the following information is given:
  747.  
  748.                       TYPE      Each trace point belongs to one of these
  749.                                 categories:
  750.  
  751.                                 MN        Entry to a major routine
  752.                                 MX        Exit from a major routine
  753.                                 MV        Event in a major routine
  754.                                 MO        Error in a major routine
  755.  
  756.                                 RN        Entry to a routine
  757.                                 RX        Exit from a routine
  758.                                 RV        Event in a routine
  759.                                 RO        Error in a routine
  760.  
  761.                                 SN        Entry to a section
  762.                                 SX        Exit from a section
  763.                                 SV        Event in a section
  764.                                 SO        Error in a section
  765.  
  766.                                 The following two types of trace point are
  767.                                 listed whenever trace is set to active in the
  768.                                 CTRA screen.
  769.  
  770.                                 TV        Basic Event (also referred to as
  771.                                           Trace Event)
  772.                                 TO        Basic Error (also referred to as
  773.                                           Trace Error)
  774.  
  775.                       POINT     This identifies the trace point.  To give the
  776.                                 full name of a trace point, add the module
  777.                                 number in front of this identifier.  For
  778.                                 example, the full name of the first point in
  779.                                 the table is "01A01", the second point is
  780.                                 "01A02", and so on.
  781.  
  782.                       ENTRY DESCRIPTION
  783.                                 This briefly describes the trace point.
  784.  
  785.                       FIELDS A AND B
  786.                                 This gives the data in fields A and B of the
  787.                                 trace.  Not all trace points generate data for
  788.                                 these fields.  If the same data is indicated
  789.                                 for both fields, (as for "01F01", for example)
  790.                                 bytes 1 - 4 of the data are given in Field A,
  791.                                 bytes 5 - 8 in Field B.
  792.  
  793.   +---------------------------------------------------------------------------+
  794.   | Table 3. FAA trace points.  See above for an explanation of the table     |
  795.   |          structure.                                                       |
  796.   +----------+---------------------+---------------------+--------------------+
  797.   | TYPE     | ENTRY DESCRIPTION   | FIELD A             | FIELD B            |
  798.   | POINT    |                     |                     |                    |
  799.   +----------+---------------------+---------------------+--------------------+
  800.   | 91       | FAACESFE            | ECI front end       |                    |
  801.   +----------+---------------------+---------------------+--------------------+
  802.   | MN F01   | Entry to FAACESFE   | Extend mode, Call   | Timeout, Commarea  |
  803.   |          |                     | type                | length             |
  804.   +----------+---------------------+---------------------+--------------------+
  805.   | RV F02   | Event               ▌ Program name        | Program name       |
  806.   +----------+---------------------+---------------------+--------------------+
  807.   | RV F03   | Event               | Timeout, Luw token  | Transid            |
  808.   +----------+---------------------+---------------------+--------------------+
  809.   | RV F04   | Event               | Userid              | Userid             |
  810.   +----------+---------------------+---------------------+--------------------+
  811.   | RV F05   | Event - Front end   | Low values          | Low values         |
  812.   |          | initialisation start|                     |                    |
  813.   +----------+---------------------+---------------------+--------------------+
  814.   | RO F06   | Error registering   | Return code         | Low values         |
  815.   |          | the exit handler    |                     |                    |
  816.   +----------+---------------------+---------------------+--------------------+
  817.   | RO F07   | Error allocating    | Return code         | Low values         |
  818.   |          | transfer area       |                     |                    |
  819.   +----------+---------------------+---------------------+--------------------+
  820.   | RO F08   | Error accessing     | Return code         | Low values         |
  821.   |          | global infoseg      |                     |                    |
  822.   +----------+---------------------+---------------------+--------------------+
  823.   | RV F09   | Event - Front end   | Return code         | Low values         |
  824.   |          | initialisation      |                     |                    |
  825.   |          | complete            |                     |                    |
  826.   +----------+---------------------+---------------------+--------------------+
  827.   | RV F10   | Event - Synch call  | Return code         | Low values         |
  828.   |          | semaphore wakeup    |                     |                    |
  829.   +----------+---------------------+---------------------+--------------------+
  830.   | RV F11   | Event - abend code  | Return code         | Abend code         |
  831.   |          | /return code returned                     |                    |
  832.   +----------+---------------------+---------------------+--------------------+
  833.   | MX F12   | Exit from ECI       | Return code         | Abend code         |
  834.   +----------+---------------------+---------------------+--------------------+
  835.   | RN F21   | Start               | Low values          | Low values         |
  836.   |          | initialization of   |                     |                    |
  837.   |          | worker thread       |                     |                    |
  838.   +----------+---------------------+---------------------+--------------------+
  839.   | RV F22   | Worker thread       | Low values          | Low values         |
  840.   |          | initialization      |                     |                    |
  841.   |          | complete            |                     |                    |
  842.   +----------+---------------------+---------------------+--------------------+
  843.   | RV F23   | Recalculated        | Timeout for         | Low values         |
  844.   |          | timeout             | MuxSemWait          |                    |
  845.   +----------+---------------------+---------------------+--------------------+
  846.   | RV F24   | Worker thread       | Return code from    | Index of cleared   |
  847.   |          | initialization      | async MuxSemWait    | semaphore          |
  848.   |          | complete            |                     |                    |
  849.   +----------+---------------------+---------------------+--------------------+
  850.   | RV F25   | New async call to   | Low values          | Low values         |
  851.   |          | wait on             |                     |                    |
  852.   +----------+---------------------+---------------------+--------------------+
  853.   | RN F30   | Entry to add to ICE | Low values          | Low values         |
  854.   +----------+---------------------+---------------------+--------------------+
  855.   | RX F31   | Exit from add to ICE| Return code         | Low values         |
  856.   +----------+---------------------+---------------------+--------------------+
  857.   | RN F40   | Entry to call       | Element in work     | Absolute timeout   |
  858.   |          | submission          | table               |                    |
  859.   +----------+---------------------+---------------------+--------------------+
  860.   | RX F41   | Exit from call      | Return code         | Low values         |
  861.   |          | submission          |                     |                    |
  862.   +----------+---------------------+---------------------+--------------------+
  863.   | RN F50   | Entry to table      | Low values          | Low values         |
  864.   |          | search              |                     |                    |
  865.   +----------+---------------------+---------------------+--------------------+
  866.   | RX F51   | Exit from table     | Return code         | Index to table     |
  867.   |          | search              |                     | entry              |
  868.   +----------+---------------------+---------------------+--------------------+
  869.   | 91       | FAAECPBE            | ECI back end        |                    |
  870.   +----------+---------------------+---------------------+--------------------+
  871.   | MN B01   | Entry to FAAECPBE   | Low values          | Low values         |
  872.   +----------+---------------------+---------------------+--------------------+
  873.   | MX B02   | Error accessing     | Return code         | Low values         |
  874.   |          | transfer area       |                     |                    |
  875.   +----------+---------------------+---------------------+--------------------+
  876.   | RV B03   | Accessed transfer   | Call type           | Extend mode        |
  877.   |          | area                |                     |                    |
  878.   +----------+---------------------+---------------------+--------------------+
  879.   | RV B04   | Front end timed out | Low values          | Low values         |
  880.   +----------+---------------------+---------------------+--------------------+
  881.   | RO B05   | Signon abended      | Abend code          | Low values         |
  882.   +----------+---------------------+---------------------+--------------------+
  883.   | RV B06   | Rollback transaction| Return code         | Low values         |
  884.   +----------+---------------------+---------------------+--------------------+
  885.   | RV B07   | Synchpoint trnscton | Low values          | Low values         |
  886.   +----------+---------------------+---------------------+--------------------+
  887.   | RV B08   | Synchpoint failed   | Abend code          | Low values         |
  888.   +----------+---------------------+---------------------+--------------------+
  889.   | MX B09   | Exit from FAAECPBE  | Low values          | Low values         |
  890.   +----------+---------------------+---------------------+--------------------+
  891.   | SV B10   | Program to call     | Program name        | Program name       |
  892.   +----------+---------------------+---------------------+--------------------+
  893.   | TYPE     | ENTRY DESCRIPTION   | FIELD A             | FIELD B            |
  894.   | POINT    |                     |                     |                    |
  895.   +----------+---------------------+---------------------+--------------------+
  896.   | RV B11   | Commit or backout   | Low values          | Low values         |
  897.   +----------+---------------------+---------------------+--------------------+
  898.   | RO B12   | Error accessing     | Return code         | Low values         |
  899.   |          | commarea            |                     |                    |
  900.   +----------+---------------------+---------------------+--------------------+
  901.   | RO B13   | Transaction abend   | Return code         | Low values         |
  902.   +----------+---------------------+---------------------+--------------------+
  903.   | RV B14   | Starting extend     | Low values          | Low values         |
  904.   |          | mode processing     |                     |                    |
  905.   +----------+---------------------+---------------------+--------------------+
  906.   | RV B15   | Semaphore woken up  | Return code         | Index              |
  907.   +----------+---------------------+---------------------+--------------------+
  908.