home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 14 Text / 14-Text.zip / dtsv010.zip / dtsos2.txt
Text File  |  2002-01-12  |  71KB  |  1,540 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.                 ______________________________________________
  15.  
  16.  
  17.                         Distributed Transaction System
  18.  
  19.                                DTS OS/2 Gateway
  20.  
  21.                                  Release 010
  22.  
  23.                 ______________________________________________
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.                            U S E R ' S    G U I D E
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.                                 First Edition    
  45.                                 January 1990
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.                                                              
  60.  
  61.  
  62.  
  63.                                                   
  64.                          (c) Copyright DIGITAL 1990
  65.                              All Rights Reserved
  66.  DTS OS/2 Gateway (c) User's guide    Contents                               I
  67.  _______________________________________________________________________________
  68.  
  69.  
  70.  
  71.          Contents
  72.          --------
  73.  
  74.  
  75.          1. General ...............................................   1-1
  76.  
  77.                Example DTS network ................................   1-2
  78.  
  79.          2. YFIAPPC ...............................................   2-1
  80.  
  81.                General ............................................   2-1
  82.                YFIAPPC's calling model ............................   2-2
  83.                YFIAPPC's parameters ...............................   2-3
  84.                Input parameter area's contents ....................   2-4
  85.                Output parameter area's contents ...................   2-7
  86.                Programming rules ..................................   2-8
  87.  
  88.          3. Subroutine called by DTS ..............................   3-1
  89.  
  90.                General ............................................   3-1
  91.                Subroutine's calling model .........................   3-1
  92.                Subroutine's parameters ............................   3-2
  93.                Parameters .........................................   3-3
  94.                Programming rules ..................................   3-4
  95.  
  96.          4. Testing programs ......................................   4-1
  97.  
  98.                General ............................................   4-1
  99.  
  100.          5. DTS system management and parameterisation ............   5-1
  101.  
  102.                General ............................................   5-1
  103.                DTS parameters for remote nodes ....................   5-2
  104.                DTS parameters for spooling ........................   5-3
  105.                DTS parameters for local subroutines ...............   5-3
  106.                DTS parameters for trace ...........................   5-3
  107.  
  108.          6. DTS architecture and internal structure ...............   6-1
  109.  
  110.                Layered architecture ...............................   6-1
  111.                Message compression ................................   6-2
  112.                Routing of the subroutine call .....................   6-3
  113.                Recovery implementation ............................   6-5
  114.                DTS OS/2 GW environment ............................   6-6
  115.  
  116.          7. Installation ..........................................   7-1
  117.  
  118.                Installation from diskette .........................   7-1
  119.  DTS OS/2 Gateway (c) User's guide    General                              1-1
  120.  _______________________________________________________________________________
  121.  
  122.  
  123.  
  124.          1. General
  125.          ----------
  126.  
  127.          DTS is a general purpose transaction link which makes it
  128.          possible for a subroutine in computer B to be called from
  129.          computer A. DTS implements the Remote Procedure Call (RPC).
  130.  
  131.          In practise this has been arranged so that program YFIAPPC is
  132.          always called in computer A. YFIAPPC is sent parameters
  133.          informing it of, amongst other things, the actual subroutine's
  134.          program name and the computer node name. After this the
  135.          DTS system contacts computer B and makes the subroutine call.
  136.  
  137.          A maximum of 32,000 bytes can be sent to the subprogram in
  138.          computer B. The subprogram can return a maximum of 32,000
  139.          bytes to the calling program.
  140.  
  141.          The subroutine call can be made in three different ways.
  142.  
  143.          1. 'Real-time call', the calling program waits until
  144.              subprogram execution has been completed. The calling
  145.              program also immediately receives the subroutine's
  146.              possible output parameters for its own use.
  147.  
  148.          2. 'On-line' call, as real-time, but if the connection does
  149.              not immediately succeed, so the subroutine call is stored
  150.              in the buffer and is made right away when the connection
  151.              comes back into use. The calling program is able to
  152.              continue immediately after the subroutine call has been
  153.              executed or buffered. With this function, however, the
  154.              subroutine cannot return any parameters to the main program
  155.              because the main program execution may have completed
  156.              prior to the subroutine even having started.
  157.  
  158.          3. 'Batch' as before, but the call is not even attempted
  159.              immediately but is only written to file and executed later
  160.              after the time interval set in the DTS parameters.
  161.  
  162.          A recovery mechanism has been built into the system which
  163.          ensures that no subprogram calls can possibly disappear
  164.          or be duplicated in an error situation. The system carries out
  165.          its own locks in both computers and is able to manage recovery
  166.          even if the computers are rendered inoperative or
  167.          communications lines are disconnected during message
  168.          transmission.
  169.  
  170.          DTS OS/2 Gateway supports both SNA LU6.2 and DECnet/OSI 
  171.          protocols and can routing transactions between DECnet/SNA
  172.          networks.
  173.  
  174.          At this time the DTS system has been completely built for
  175.          VAX/VMS, OS/2 PC:s, IBM/CICS and AS400.
  176.  DTS OS/2 Gateway (c) User's guide    General                              1-2
  177.  _______________________________________________________________________________
  178.  
  179.  
  180.  
  181.          Example DTS Network
  182.          -------------------
  183.  
  184.          Each computer in this network can call any other computer via DTS.
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.                                           +---------------+
  192.          +-------+    +-------+           !               !
  193.          !OS/2 PC!    ! AS400 !           !               !
  194.          !       !    !       !           !  IBM          !
  195.          !DTS    !    ! DTS   !           !  Mainframe    !
  196.          +-------+    +-------+           !               !      +-------+
  197.             !            !                !  CICS         ! APPC !OS/2 PC!
  198.        APPC !            ! APPC           !               !------!       !
  199.             !  ......... !                !  DTS          !      !DTS    !
  200.             !..         .!                !               !      +-------+
  201.             !             .               !               !
  202.            .  TOKEN RING  .               !               !
  203.            .             .                +---------------+
  204.             ..         ..                         !
  205.               .........                           !
  206.                 !                                 !
  207.                 !                                 !
  208.            APPC !                            APPC !
  209.                 !                                 !
  210.             +-------+                        +----------+
  211.             !OS/2 PC!                        !Digital   +
  212.             !DTS    ! SNA PU 2.1             !DECnet/SNA! SNA PU 2
  213.             !Gateway!                        !Gateway   !
  214.             +-------+                        +----------+
  215.                 !                                 !
  216.                 !                                 !
  217.                 ! DECnet/OSI                      ! DECnet/OSI
  218.                 !                                 !  
  219.                 !                                 !  
  220.                 !                     Ethernet    !  
  221.        +-------------+--------------------+-------+---------------+---------+
  222.                      !                    !                       !
  223.                      !                    !                       !
  224.           DECnet/OSI !         DECnet/OSI !            DECnet/OSI !
  225.                      !                    !                       !
  226.                      !                    !                       !
  227.                  +-------+         +-------------+         +-------------+
  228.                  !OS/2 PC!         !             !         !             !
  229.                  !       !         ! Digital VAX !         ! Digital VAX !
  230.                  !DTS    !         !             !         !             !
  231.                  +-------+         ! DTS         !         ! DTS         !
  232.                                    !             !         !             !
  233.                                    +-------------+         +-------------+
  234.  
  235.  DTS OS/2 Gateway (c) User's guide    YFIAPPC                              2-1
  236.  _______________________________________________________________________________
  237.  
  238.  
  239.  
  240.          2. YFIAPPC
  241.          ----------
  242.  
  243.          Instructions/documentation for DTS client service YFIAPPC.
  244.  
  245.  
  246.  
  247.          General
  248.          -------
  249.  
  250.          YFIAPPC is a DTS function, which uses the LU6.2/APPC or DECnet/OSI
  251.          protocol or both to communicate with other computers. YFIAPPC
  252.          makes it possible to call, for example, a subroutine in VAX or IBM,
  253.          from an OS/2 computer.
  254.  
  255.          Maximum message length is 32,000 bytes. Message data can be
  256.          in either character or binary form. Both character and
  257.          binary forms cannot be in the same message or used
  258.          at the same time if there are different character
  259.          representations in the two communicating computers
  260.          e.g. ASCII/EBCDIC. DTS carries out any needed
  261.          character conversion.
  262.  
  263.  DTS OS/2 Gateway (c) User's guide    YFIAPPC                              2-2
  264.  _______________________________________________________________________________
  265.  
  266.  
  267.  
  268.  
  269.          YFIAPPC calling model/function definition.
  270.          ------------------------------------------
  271.  
  272.          void YFIAPPC (InputMSG, InpLength, OutputMSG, OutLength)
  273.  
  274.          unsigned char  *InputMSG;
  275.          unsigned short *InpLength;
  276.          unsigned char  *OutputMSG;
  277.          unsigned short *OutLength;
  278.  
  279.  
  280.  
  281.          InputMSG  Pointer of user input data area, message to be send.
  282.                    DTS not change the contents of user message, so after
  283.                    YFIAPPC call this area is unchanged except first 39
  284.                    bytes (DTS header). Exception is function code 04,
  285.                    then input area is unknown after call.
  286.  
  287.          InpLenght Pointer of length variable which indicates the length
  288.                    of input message in user area. Length is 2 bytes binary
  289.                    number. User set this.
  290.  
  291.          OutputMSG Pointer of user output data area. DTS puts the received
  292.                    message to this area. Area must be so big that there are
  293.                    enough room for the biggest message (max 32000 bytes). 
  294.  
  295.          OutLength Pointer of length variable which indicates the length
  296.                    of received message in out_area. Length is 2 bytes binary
  297.                    number.
  298.  
  299.       
  300.          All pointers are far pointers (32 bit addressing). User must set all
  301.          parameters except out_length before YFIAPPC call. DTS set the right
  302.          value to out_length. Look also example program YFIA.C.
  303.      
  304.  
  305.  
  306.          YFIAPPC's Calling example in OS/2
  307.          ---------------------------------
  308.  
  309.          YFIAPPC is function, written in C language, which is located in
  310.          DTS.DLL dynamic link library. DTS.LIB has produced with IMPLIB
  311.          utility from DTS.DLL.
  312.  
  313.          unsigned char  IMSG[32000];
  314.          unsigned short ILength;
  315.          unsigned char  OMSG[32000];
  316.          unsigned short OLength;
  317.          ...
  318.  
  319.          YFIAPPC(IMSG, &ILength, OMSG, &OLength);
  320.  
  321.  
  322.  
  323.  
  324.          Look also an example program YFIA.C in installation kit.
  325.  DTS OS/2 Gateway (c) User's guide    YFIAPPC                              2-3
  326.  _______________________________________________________________________________
  327.  
  328.  
  329.  
  330.          YFIAPPC's parameters
  331.          --------------------
  332.  
  333.          The parameters are at the beginning of the message, the input
  334.          parameter area is the message's first 39 bytes = DTS header.
  335.          The only output parameters are the return code and
  336.          the possible response data. The return code is in the first
  337.          2 bytes of the output area. The application program does not
  338.          have to set parameter fields other than those marked with
  339.          asterisk (*) characters. After YFIAPPC's call the application
  340.          program can also investigate the parameters set by DTS
  341.          if necessary.
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.                            YFIAPPC's input parameter area
  350.                            ------------------------------
  351.                          1 Timestamp
  352.                            YDDDHHMMSSXX      char (12)
  353.                          2 Status            char  (1)
  354.                          3 Sender            char  (8)
  355.                       *  4 Receiver          char  (8)
  356.                       *  5 Function code     char  (2)
  357.                       *  6 Handler ID        char  (8)
  358.                       *  7 Message           char  (*)
  359.  
  360.          (Handler ID = logical name of the remote subroutine)
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.                            YFIAPPC's output parameter area
  368.                            -------------------------------
  369.                          8 Return code       char  (2)
  370.                          9 Message           char  (*)
  371.  
  372.  
  373.  
  374.  
  375.  DTS OS/2 Gateway (c) User's guide    YFIAPPC                              2-4
  376.  _______________________________________________________________________________
  377.  
  378.  
  379.  
  380.          Contents of the input parameter area
  381.          ------------------------------------
  382.  
  383.  
  384.          1 Timestamp YDDDHHMMSSXX
  385.          ------------------------
  386.  
  387.          When YFIAPPC is called by a certain message for the first time,
  388.          YFIAPPC always places in this field the year, day and clock
  389.          time. XX contains hundredths of a second. This together with
  390.          the sender is the message's ID for its whole lifetime.
  391.          DTS ensures that the timestamp is unique for every
  392.          different message, even if the messages are processed
  393.          in exactly the same hundredths of a second.
  394.  
  395.  
  396.          2 Status
  397.          --------
  398.          YFIAPPC records its own status code here which is intended for
  399.          its own internal use. Possible values are:
  400.  
  401.                         0  Default value which is placed when the
  402.                            message comes for the first time to
  403.                            YFIAPPC.
  404.  
  405.                         1  Message is being processed. When YFIAPPC
  406.                            is called with a function code which has
  407.                            a recovery characteristic specified and
  408.                            when connecting to another computer the
  409.                            message does not transmit successfully
  410.                            due to computer error or similar.
  411.                            The message will be written on disk with
  412.                            status = 1 which indicates that the message
  413.                            has already been sent once and has not been
  414.                            transmitted successfully.
  415.  
  416.  
  417.          3 Sender
  418.          --------
  419.          YFIAPPC puts the identifier of the sending computer here.
  420.  
  421.  
  422.          4 Receiver (*)
  423.          --------------
  424.          The receiving computer's identifier is set by the application
  425.          program. The computer node in question has to be set for DTS.
  426.  
  427.  
  428.  DTS OS/2 Gateway (c) User's guide    YFIAPPC                              2-5
  429.  _______________________________________________________________________________
  430.  
  431.  
  432.          5 Function code (*)
  433.          -------------------
  434.          YFIAPPC's function code. The function code is a 2 bytes long
  435.          code which defines the DTS function to be carried out.
  436.          Both bytes of the code XY are independent of each other.
  437.          The different codes are described below:
  438.  
  439.                        X=0  Character conversion is needed and it is
  440.                             done to the message in the DTS.
  441.  
  442.                        X=1  Character conversion is not done to
  443.                             the message in the DTS.
  444.  
  445.                        X=2  The message is compressed in the sending
  446.                             computer, decompression takes place in the
  447.                             receiving computer and character
  448.                             conversiona are also done in the DTS.
  449.  
  450.                        Y=1  Message is sent and the response is required
  451.                             in real time.
  452.  
  453.                        Y=2  Message is sent on-line, in other words
  454.                             an attempt to send is made immediately.
  455.                             However, if the transmission does not succeed
  456.                             the message is filed for a later attempt.
  457.                             The calling program receives a 00 return code
  458.                             immediately when the transmission has
  459.                             succeeded or a 01 return code when the
  460.                             message is recorded successfully on file.
  461.  
  462.                        Y=3  The message is filed for later sending.
  463.                             The calling program receives a 00 return
  464.                             code right away when the message has been
  465.                             recorded on file.
  466.  
  467.                        Y=4  All the messages which have been recorded
  468.                             for later sending are sent. The messages
  469.                             are deleted from this file when the later
  470.                             transmission succeeds. If the transmission
  471.                             fails due to a logic error (e.g. the
  472.                             parameter defined handler or subroutine does
  473.                             not exist) then the message is written to
  474.                             the error log and is deleted from the earlier
  475.                             file. Return code 00 is given if all the
  476.                             messages recorded for later transmission have
  477.                             either been successfully sent or have been
  478.                             transferred to the error log. DTS calls
  479.                             itself with this function code at the
  480.                             intervals set in the DTS parameters,
  481.                             this code has not been intended for use 
  482.                             by applications.
  483.  
  484.          The following combinations of functions have been reserved
  485.          for use by applications: 01,02,03,11,12,13,21,22,23.
  486.  DTS OS/2 Gateway (c) User's guide    YFIAPPC                              2-6
  487.  _______________________________________________________________________________
  488.  
  489.  
  490.  
  491.          6 Handler's ID (*)
  492.          -------------------
  493.          The logical name of the remote message handler which corresponds
  494.          to a specified physical program module. Based on this a quite
  495.          specific subroutine is initiated in the other computer to which
  496.          the message is sent.
  497.  
  498.          7 Message (*)
  499.          --------------
  500.          Data which is sent to the subroutine in the other computer
  501.          in addition to the previously described parameters.
  502.  
  503.  
  504.  
  505.  DTS OS/2 Gateway (c) User's guide    YFIAPPC                              2-7
  506.  _______________________________________________________________________________
  507.  
  508.  
  509.  
  510.          Contents of the output parameter area
  511.          -------------------------------------
  512.  
  513.  
  514.          8 Return code
  515.          --------------
  516.          YFIAPPC's own return code which reports the success of the
  517.          data transfer. This return code is in no way associated with
  518.          the return code which is given by the possible message handler
  519.          which is message data to YFIAPPC. Possible values:
  520.  
  521.                         00  Completed successfully
  522.  
  523.                         01  Completed successfully,
  524.                             the on-line message has been sent with
  525.                             function code 02 but the line has not
  526.                             functioned. The message has been written
  527.                             to the file to be saved for later
  528.                             transmission.
  529.  
  530.                         10  Unknown receiver node.
  531.  
  532.                         11  Receiver node environment variable not ok
  533.  
  534.                         12  Spooling environment variables not ok  
  535.  
  536.                         20  Message handler is unrecognised in the
  537.                             receiving computer.
  538.  
  539.                         30  Data communications error, link fails.
  540.  
  541.                         31  Communications Manager not loaded  
  542.  
  543.                         32  Error in character conversion -CONVERT-  
  544.  
  545.                         33  APPC not started in Communications Manager  
  546.  
  547.                         34  DECnet error: xxxxxx...                     
  548.  
  549.                         40  Input parameter errors,
  550.                             e.g.  unknown function code.
  551.  
  552.                         60  A message buffer has been emptied with
  553.                             function code 04, but all the messages were
  554.                             not sent because the data communcations links
  555.                             did not function. The messages will be sent
  556.                             as soon as the link becomes operational.
  557.  
  558.                         70  Protected resource, the subroutine call
  559.                             with the given parameters is not allowed
  560.                             in the other computer.
  561.  
  562.                         90  Not enough memory available -DosAllocSeg-  
  563.  
  564.                         91  DTS not correctly installed, DTS_LOG ???  
  565.  
  566.          9 Message
  567.          ----------
  568.          The response data which is returned from the called subroutine
  569.          in the other computer.
  570.  DTS OS/2 Gateway (c) User's guide    YFIAPPC                              2-8
  571.  _______________________________________________________________________________
  572.  
  573.  
  574.          Programming rules
  575.          -----------------
  576.  
  577.          - Operation codes x1 should not be used in other than
  578.            'non updating ' operations. In other words when, for example,
  579.            another system's database is read, so the codes in question
  580.            stay in place.
  581.  
  582.          - Function codes x2 and x3 are intended for updating operations,
  583.            when these codes are used DTS guarantees that the
  584.            subroutine call is performed successfully just once in the
  585.            required computer. DTS also ensures that the calls are
  586.            performed in the exact sequence as they were created in the
  587.            sending system.
  588.            (timestamp order).
  589.  
  590.          - Although DTS message length (subroutine parameter area)
  591.            is a maximum of 32,000 bytes, it is not all at the disposal
  592.            of the application. DTS needs the first 39 bytes for its
  593.            own header, but in addition, for example, routing might demand
  594.            another 39 bytes. DTS looks after this sort of extra header
  595.            itself and the user is not even aware of it. The user has to
  596.            be aware not to send, however, the absolute maximum length.
  597.            If the application sends a maximum of only 31,800 bytes, then
  598.            one can be sure that all possible headers will be accomodated.
  599.  
  600.          - If some application transfers a large amount of data to
  601.            another system through DTS e.g. copying a file, then the
  602.            application should send the data in as large blocks as
  603.            possible. This is a lot more efficient than sending
  604.            data in small blocks. Every YFIAPPC call loads the machine
  605.            to the same degree almost regardless of the quantity of data.
  606.            If, for example, 1 Megabyte of information is transferred
  607.            to another computer in 30,000 byte chunks, 34 YFIAPPC
  608.            calls are needed. If the same quantity of information
  609.            is transferred in 1,000 byte chunks, 1,000 calls are
  610.            required. The latter method is approximately 30 times
  611.            heavier on resources.
  612.  
  613.          - When the messages are taken from spool to the other DTS
  614.            system if some logical error occurs which is the sort not
  615.            worth sending again, the message is transferred to the
  616.            DTS_ERROR file. This sort of 'error caller' can be located
  617.            with the normal DIR command. The logical error could be such
  618.            that a subroutine is called which does not exist in the other
  619.            system or its calling has not been permitted.
  620.                                
  621.  DTS OS/2 Gateway (c) User's guide    Subroutine called by DTS             3-1
  622.  _______________________________________________________________________________
  623.  
  624.  
  625.  
  626.          3. Subroutine called by DTS
  627.          ---------------------------
  628.  
  629.          Rules/documentation on how DTS transfers an external incoming
  630.          call to a user subroutine. The calling method and how the
  631.          subroutine has to be coded is described here.
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.          General
  639.          -------
  640.  
  641.          The application subroutine which is called by DTS can be coded
  642.          in any of the programming languages which supports the OS/2
  643.          runtime dynamic linking. Each user subroutine, which are called
  644.          from remote system via DTS, must be in some Dynamic Link Library
  645.          (.DLL). The DLL must locate in some of the LIBPATH directory (Look
  646.          Your CONFIG.SYS LIBPATH variable). DTS use the OS/2 runtime
  647.          dynamic link, when it calls user subroutines, so it is not
  648.          necessary to link those sobroutines with DTS. However DTS 
  649.          must know the DLL name where the called subroutine is. We
  650.          use the environment variables to tell this to DTS.
  651.  
  652.  
  653.  
  654.  
  655.  
  656.          Calling model of the subroutine 
  657.          -------------------------------
  658.  
  659.          Format is same than YFIAPPC, but subroutine must use the PASCAL
  660.          calling conventions, so the format is
  661.  
  662.          void far pascal XXX (&inp_area, &inp_length, &out_area, &out_length)
  663.  
  664.          DTS reserves all areas, user subroutine input parameters are in 
  665.          inp_area and total length of them in inp_length. User subroutine
  666.          must put its output parameters to out_area and length of them in
  667.          out_length. User subroutine must set out_length atleast 2, because
  668.          DTS needs itself those 2 bytes, so user can not use the first 2
  669.          bytes in out_area. Look also some example program in DTSEXSUB.C
  670.          file.
  671.    
  672.  
  673.  
  674.  
  675.  DTS OS/2 Gateway (c) User's guide    Subroutine called by DTS             3-2
  676.  _______________________________________________________________________________
  677.  
  678.  
  679.  
  680.          The subroutine's parameters
  681.          ---------------------------
  682.  
  683.          The parameters of the subroutine is of exactly the same form
  684.          as in the earlier described YFIAPPC. The subroutine
  685.          has to set the parameters marked here with an '*', the other
  686.          parameters cannot be changed by the subroutine.
  687.  
  688.  
  689.  
  690.  
  691.                     Subroutine's parameters
  692.                     ------------------------
  693.                   1 Input parameter area address 
  694.                   2 Input message length         
  695.                   3 Output parameter area address
  696.                *  4 Output message length        
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.          1 Input parameter area address
  704.          ------------------------------
  705.          DTS has put here the memory address of the first byte of its
  706.          transferred parameter area. The area pointer is the far     
  707.          pointer.
  708.  
  709.  
  710.          2 Input parameter area length
  711.          -----------------------------
  712.          DTS has placed the total length of its transferred parameter
  713.          area here.
  714.  
  715.  
  716.          3 Output parameter area address
  717.          -------------------------------    
  718.          DTS has put here the memory address of the first byte of its
  719.          reserved user output area. The area pointer is the far     
  720.          pointer and max user msg lenght is 32000 bytes.
  721.  
  722.  
  723.          4 Output parameter area length  (*)
  724.          -----------------------------------
  725.          The user's subroutine records the total length of its output
  726.          message here. The output length is always at least 2 bytes
  727.          in other words the length of the return code.
  728.  DTS OS/2 Gateway (c) User's guide    Subroutine called by DTS             3-3
  729.  _______________________________________________________________________________
  730.  
  731.  
  732.  
  733.          Parameters
  734.          ----------
  735.  
  736.          The input parameter area which is given to the user's subroutine
  737.          is the same as the sending application program made in the
  738.          other system. At the beginning of the parameter area is also
  739.          the 39 byte DTS header prior to the application data. The
  740.          subroutine can take advantage of the header information if it
  741.          wants to know which computer node made the call. The DTS header
  742.          has been described in connection with YFIAPPC.
  743.  
  744.          The subroutine's input parameter area
  745.  
  746.  
  747.           __________________________________________....___________
  748.          !                !                                        !
  749.          ! DTS Header     !      Application's own data            !
  750.          !________________!________________________....____________!
  751.          !
  752.          !    39 bytes       recommended max 31,800 bytes
  753.          !<--------------> <-------------------------------------->
  754.          !
  755.          !                    max 32,000 bytes
  756.          !<------------------------------------------------------->
  757.          !
  758.          V
  759.          Input area's address 
  760.  
  761.  
  762.  
  763.  
  764.  
  765.          The output parameter area has its two first bytes for the
  766.          DTS return code and the remainder is available for use by the
  767.          application. Please note, however, that the first two bytes
  768.          of the area it has reserved have to be left unused.
  769.  
  770.  
  771.          The subroutine's output parameter area
  772.  
  773.  
  774.           ______________________________________....___________
  775.          ! DTS return-!                                        !
  776.          ! code space !      Application's own data            !
  777.          !____________!________________________....____________!
  778.          !
  779.          !  2 bytes       recommended max 31,800 bytes
  780.          !<----------> <-------------------------------------->
  781.          !
  782.          !                    max 32,000 bytes
  783.          !<--------------------------------------------------->
  784.          !
  785.          V
  786.          Output area's address
  787.  
  788.  
  789.  DTS OS/2 Gateway (c) User's guide    Subroutine called by DTS             3-4
  790.  _______________________________________________________________________________
  791.  
  792.  
  793.          Programming rules
  794.          -----------------
  795.  
  796.  
  797.          - DTS guarantees recovery from error situations when remaining
  798.            inside the basic OS/2 task. If one wants to start a new OS/2
  799.            task from the subroutine, the application programmer has to
  800.            take care of recovery him/herself inside this new task.
  801.  
  802.          - The subroutine's execution time (wallclock time) should be
  803.            as short as possible, preferably only a few seconds, a
  804.            maximum of approximately 5 minutes. The reason for this
  805.            is that the communication conversation to the other computer
  806.            is active continuously and is reserved during the execution
  807.            of the subroutine.
  808.  
  809.          - The subroutine should not intentionally go into an crash.
  810.            DTS repeats the transmission after the call's parameterised
  811.            time interval after a possible crash. If the subroutine
  812.            continually crashes it will terminate all message traffic to
  813.            the node in question because DTS wants to perform the calls
  814.            in time sequence. No call which is created later from the
  815.            node in question will come through until the crashed call
  816.            in question has been successfully executed. This rule
  817.            applies to messages sent with x2 and x3 function codes.
  818.  
  819.          - When a subroutine has been intiated from a second system
  820.            the initiated subroutine can call YFIAPPC again and by means
  821.            this means call a third system's subroutine. It is, however,
  822.            worth carefully examining whether the call in question is
  823.            required synchronously (function codes x1 and x2). If the
  824.            call is synchronous so the subroutine's original initiator
  825.            in the first system also waits for the third system's
  826.            subroutine's termination (because the second system also
  827.            waits). DTS completely supports this type of operation, but
  828.            from the standpoint of resource utilisation it is better if
  829.            the second system calls the third asynchronously
  830.            (function code x3).
  831.  
  832.          - It is very important, that user own subroutines release all
  833.            resources what they have reserved. So, if subroutine opens
  834.            a file it must also close it. The DTS Back_End server is a one
  835.            simple process, and all subroutine calls are processed under
  836.            that same process.
  837.      
  838.  DTS OS/2 Gateway (c) User's guide    Testing programs                     4-1
  839.  _______________________________________________________________________________
  840.  
  841.  
  842.  
  843.          4. Testing programs
  844.          -------------------
  845.  
  846.  
  847.  
  848.          General
  849.          -------
  850.  
  851.  
  852.          DTS has two transactions for application program testing;
  853.          YFIA.C and LU62LOOP.C. YFIA/LU62LOOP is intended for testing any 
  854.          application program or for testing DTS itself.
  855.  
  856.          If you like to debug Your Back_End programs (and of course You like
  857.          to do that !) You must link that subroutine with some test program
  858.          which calls normally your subroutine. You can modify YFIA program
  859.          easily for that purposes, just replace the YFIAPPC call to your
  860.          own subroutine call. Remember that subroutine call uses the Pascal
  861.          calling convention !
  862.  
  863.          You can use also DTS trace utility to look and record all incoming
  864.          and outgoing messages to disk. You must set the DTS_TRACE 
  865.          environment variable in the CONFIG.SYS and boot your PC
  866.          before trace is activated.
  867.  
  868.          It is also possible to use Communications Manager trace or DECnet
  869.          utilities like NCP.
  870.  
  871.  DTS OS/2 Gateway (c) User's guide    Management and parameterisation      5-1
  872.  _______________________________________________________________________________
  873.  
  874.  
  875.  
  876.          5. DTS system management and parameterisation
  877.          ---------------------------------------------
  878.  
  879.  
  880.          General
  881.          -------
  882.  
  883.  
  884.          When DTS is once installed and parameterised, it need not
  885.          generally be touched again, only when the system is changed.
  886.          These sort of changes can be, for example, when adding new
  887.          application programs or new nodes. So that covers
  888.          the production side. However, on the test side where programs
  889.          are developed, it is even more worth operating with DTS. DTS
  890.          provides a number of tools for program testing such as trace
  891.          for the saving of arriving subroutine calls for analysis etc.
  892.          use of these in program testing saves a lot of time and trouble.
  893.  
  894.  
  895.          DTS usually recovers from all error situations under its own
  896.          control. DTS does not require operator action when, for
  897.          example, there is a break in the line connection, in this
  898.          case DTS automatically starts to spool messages which would
  899.          otherwise be transmitted over the disconnected line. When the
  900.          line connection is re-established DTS automatically transmits
  901.          all the spooled messages from the system where they were
  902.          created and spooled.
  903.  
  904.  
  905.          If one of the LU6.2 pipes is corrupted because a remote PU
  906.          connection goes inoperative in the middle of a conversation,
  907.          DTS guarantees recovery, but is not necessarily able to get
  908.          the data traffic started again. Then the LU in question is
  909.          in some error situation when looking at it with NCCF. If
  910.          the LU is corrupted it has to be INACTivated and ACTivated with
  911.          NCCF, if NetView is available this process can be automated.
  912.          Anyhow when LU is again operational then DTS starts to use
  913.          it again with no need for any other action.
  914.  
  915.  
  916.          All DTS system parameters are OS/2 environment variables and
  917.          must set in CONFIG.SYS file. There are example DTS configuration
  918.          file DTS.CFG in installation kit.
  919.  
  920.  DTS OS/2 Gateway (c) User's guide    Management and parameterisation      5-2
  921.  _______________________________________________________________________________
  922.  
  923.  
  924.  
  925.          DTS parameters for remote nodes
  926.          -------------------------------
  927.  
  928.  
  929.          Parameters for DTS remote node. There can be any number of           
  930.          remote node definitions, your communication manager and/or DECnet    
  931.          configuration must be compatible with these. Format:                 
  932.                                                                               
  933.          DTS_ND_AAAAAAAA= BBBBBBBB CCCCCCCC D EEEEEEEE FFFFFFFF GGGGGGGG XX TT
  934.                                                                               
  935.          AAAAAAAA    DTS remote node name                                     
  936.          BBBBBBBB    Local DTS node name                                      
  937.          CCCCCCCC    DTS routing node name or '-' character if no routing     
  938.          D           Automatic data Compress (Y=Yes, N=No)                    
  939.          EEEEEEEE    Remote LU alias name (APPC) or DECnet node name (DECnet) 
  940.          FFFFFFFF    Local LU alias name (APPC) or string DECnet (DECnet)     
  941.          GGGGGGGG    Name of mode entry (APPC) or - (DECnet)                  
  942.          XX          Allocate type (Wait,Free,Immediate) and syncronizing     
  943.                      level (0=no,1=commit) or count of remote objects(DECnet) 
  944.          TTTTTTTT... Remote transaction (APPC) or object (DECnet) name,       
  945.                      max 14 characters.                                       
  946.                                                                               
  947.                                                                               
  948.          Examples:                                                            
  949.     
  950.     Remote DTS       Local    Routing  C Remote   Local    Mode     AS Tran or
  951.     Node             Node     Node     P LU/Node  LU Alias Entry    NR Object
  952.     ---------------  -------- -------- - -------- -------- -------- -- --------
  953. SET DTS_ND_ANT001  = PS/2     TINFOCIC Y TINFOCIC PBR04    PSLU62   W1 YLUX
  954. SET DTS_ND_DEMOCICS= PS/2     TINFOCIC Y TINFOCIC PBR04    PSLU62   W1 YLUX
  955. SET DTS_ND_FINN01  = PS/2     TINFOCIC Y TINFOCIC PBR04    PSLU62   W1 YLUX
  956. SET DTS_ND_FINN01_C= PS/2     TINFOCIC Y TINFOCIC PBR04    PSLU62   W1 YLUX
  957. SET DTS_ND_FINN02  = PS/2     TINFOCIC Y TINFOCIC PBR04    PSLU62   W1 YLUX
  958. SET DTS_ND_HAM001  = PS/2     TINFOCIC Y TINFOCIC PBR04    PSLU62   W1 YLUX
  959. SET DTS_ND_LON001  = PS/2     TINFOCIC Y TINFOCIC PBR04    PSLU62   W1 YLUX
  960. SET DTS_ND_MEMOAPI = PS/2     -        Y TINFOCIC PBR04    PSLU62   W1 YLUX
  961. SET DTS_ND_NYC001  = PS/2     TINFOCIC Y TINFOCIC PBR04    PSLU62   W1 YLUX
  962. SET DTS_ND_PS/2    = PS/2     TINFOCIC Y TINFOCIC PBR04    PSLU62   W1 YLUX
  963. SET DTS_ND_TFPCICS = PS/2     TINFOCIC Y TINFOCIC PBR04    PSLU62   W1 YLUX
  964. SET DTS_ND_TINFOCIC= PS/2     -        Y TINFOCIC PBR04    PSLU62   W1 YLUX
  965. SET DTS_ND_TYCICS  = PS/2     TINFOCIC Y TINFOCIC PBR04    PSLU62   W1 YLUX
  966. SET DTS_ND_HSKPRF  = OS2DTS   -        Y HSKSWB   DECnet   -        01 YLUX
  967. SET DTS_ND_HSKSWB  = OS2DTS   -        Y HSKSWB   DECnet   -        01 YLUX
  968. SET DTS_ND_OS2DTS  = OS2DTS   -        Y OS2DTS   DECnet   -        02 YLUX
  969.  
  970.  
  971.  DTS OS/2 Gateway (c) User's guide    Management and parameterisation      5-3
  972.  _______________________________________________________________________________
  973.  
  974.  
  975.  
  976.          DTS parameters for spooling     
  977.          ---------------------------
  978.  
  979.          Parameters for DTS spooling. There are 4 paramaters which You must   
  980.          set:                                                                 
  981.                                                                               
  982.          Path of spool directory   DTS_SPOOL=path                             
  983.          Path of error directory   DTS_ERROR=path                             
  984.          Path of log   directory   DTS_LOG  =path                             
  985.          Spool send retry interval DTS_INTERVAL=HHMMSS                        
  986.                                                                               
  987.                                                                               
  988.          Examples:                                                 
  989.                                                                               
  990.          SET      DTS_SPOOL=C:\DTS\SPOOL\*.*       
  991.          SET      DTS_ERROR=C:\DTS\ERROR\*.*       
  992.          SET      DTS_LOG  =C:\DTS\LOG\*.*         
  993.          SET      DTS_INTERVAL=000030              
  994.                                                                               
  995.  
  996.  
  997.          DTS parameters for local subroutines
  998.          ------------------------------------
  999.  
  1000.          Local subroutines which are called from remote computers (message    
  1001.          handlers). Each subroutine must located in some dynamic link         
  1002.          library. DTS reads these environment variables to find and load      
  1003.          correct DLL. There can be any number of User subroutines and         
  1004.          User DLLs. Several subroutines can also be in the same DLL.          
  1005.                                                                               
  1006.          Format:  DTS_PG_XXXXXXXX=YYYYYYYY                                    
  1007.                                                                               
  1008.          XXXXXXXX = Subroutine logical name, Handler id, 8 characters         
  1009.          YYYYYYYY = DLL name, must be in LIBPATH dir, max 8 characters        
  1010.                                                                               
  1011.  
  1012.          Add Your own DLL and subroutines to this list:                       
  1013.                                                                               
  1014.          SET      DTS_PG_ECHO    =DTSEXSUB    
  1015.          SET      DTS_PG_PBRCRASH=DTSEXSUB    
  1016.          SET      DTS_PG_ROUTER  =DTSEXSUB    
  1017.          SET      DTS_PG_DTSFSRV =DTSEXSUB
  1018.  
  1019.  
  1020.          DTS parameters for trace
  1021.          ------------------------
  1022.  
  1023.          Optional DTS TRACE service: You can activate DTS internal trace     
  1024.          defining environment variable DTS_TRACE, format:                    
  1025.                                                                              
  1026.          DTS_TRACE=path   , path points to trace directory, which must exist 
  1027.                                                                              
  1028.  
  1029.          Example:                                                            
  1030.                                                                              
  1031.          SET      DTS_TRACE=C:\DTS\TRACE\*.*    
  1032.                                                                              
  1033.          If You define this environment variable, then DTS writes each       
  1034.          incoming and outgoing message to trace directory. This option       
  1035.          is for temporary test use only, don't use it permanently.           
  1036.  DTS OS/2 Gateway (c) User's guide    Architecture and internal structure  6-1
  1037.  _______________________________________________________________________________
  1038.  
  1039.  
  1040.  
  1041.          6. DTS architecture and internal structure
  1042.          ------------------------------------------
  1043.  
  1044.  
  1045.          Layered architecture
  1046.          --------------------
  1047.  
  1048.          DTS has been structured in layers so that the system consists
  1049.          of four different logical layers each of which perform their
  1050.          own operations.
  1051.  
  1052.  
  1053.  
  1054.             DTS / COMPUTER   A                     DTS / COMPUTER   B
  1055.  
  1056.          +----------------------+               +----------------------+
  1057.          !                      !               !                      !
  1058.          !  Application program !       4       !  Application program !
  1059.          !                      ! A           A !                      !
  1060.          +----------------------+ !           ! +----------------------+
  1061.                                   !           !
  1062.          +----------------------+ !           ! +----------------------+
  1063.          !  DTS applic. server  ! !           ! !  DTS applic. server  !
  1064.          !  Security, Spooling, ! !     3     ! !  Security, Spooling, !
  1065.          !  Recovery ...        ! !           ! !  Recovery ...        !
  1066.          +----------------------+ !           ! +----------------------+
  1067.                                   !           !
  1068.          +----------------------+ !           ! +----------------------+
  1069.          !  DTS protocol server ! !           ! !  DTS protocol server !
  1070.          !  SNA LU6.2 or        ! !     2     ! !  SNA LU6.2 or        !
  1071.          !  DECnet/OSI          ! !           ! !  DECnet/OSI          !
  1072.          +----------------------+ !           ! +----------------------+
  1073.                                   !           !
  1074.          +----------------------+ !           ! +----------------------+
  1075.          !  Communication inter.! V           V !  Communication inter.!
  1076.          !  IBM Comm mgr and/or ! <---- 1 ----> !  IBM Comm mgr and/or !
  1077.          !  DECnet OS/2         !               !  DECnet OS/2         !
  1078.          +----------------------+               +----------------------+
  1079.  
  1080.  
  1081.  
  1082.          Level 1: Communications interface which is used in the
  1083.                   conversation with a second party. This level is,
  1084.                   DECnet OS/2 and/or IBM OS/2 EE communications      
  1085.                   manager                             
  1086.  
  1087.          Level 2: DTS' protocol server, which converses with the lower
  1088.                   level in commands of the required protocol. This
  1089.                   level uses APPC or DECnet/OSI verbs, for example,
  1090.                   taking care of remote system synchronisation,
  1091.                   packing of data etc..
  1092.  
  1093.          Level 3: DTS' application program server. Looks after recovery,
  1094.                   security, spooling, routing etc. matters which are
  1095.                   protocol independent.
  1096.  
  1097.          Level 4: Application program which calls or is called by DTS.
  1098.  DTS OS/2 Gateway (c) User's guide    Architecture and internal structure  6-2
  1099.  _______________________________________________________________________________
  1100.  
  1101.  
  1102.  
  1103.          Message compression
  1104.          -------------------
  1105.  
  1106.          Data packing can be a chosen characteristic. If the function
  1107.          code's first byte is '2' then the packing is done/undone.
  1108.  
  1109.          Data packing can also be specified by the receiver in other
  1110.          words by the remote node. This node's parameter data can then
  1111.          specify the data packing. If it is done this way then DTS
  1112.          immediately changes the first byte of all '0' starting
  1113.          function codes to '2' at the beginning of the YFIAPPC call.  '
  1114.  
  1115.          Compression takes place for character-form data, compression
  1116.          is done just before DATA transmission or immediately when DATA
  1117.          is received. Messages are ALWAYS in uncompressed form in the
  1118.          logs and other temporary storage places for the messages.
  1119.  
  1120.          Compression starts from the message's 40th byte and ends at the
  1121.          last, the message header is not compressed. The whole of the
  1122.          return message is compressed.
  1123.  
  1124.          Every byte which consecutively repeats 4...255 times in the
  1125.          message is compressed to a 3 byte long repeater indicator. If
  1126.          the same byte repeats over 255 times consecutively then more
  1127.          consecutive byte indicators are set.
  1128.  
  1129.          Every HEX FF byte is compressed into a 3 byte repeater indicator
  1130.          even though it would only be one HEX FF byte.
  1131.  
  1132.  
  1133.          Repeater indicator
  1134.          ------------------
  1135.  
  1136.          FF xx yy       FF = Repeater indicator character, in other words
  1137.                              (HEX FF) character which reports that this
  1138.                              is a repeating byte.
  1139.  
  1140.                         xx = Repeating byte in ASCII/EBCDIC form.
  1141.  
  1142.                         yy = Number of times repeated in binary form
  1143.                              (8 bytes).
  1144.  
  1145.  
  1146.  
  1147.          Example:
  1148.          --------
  1149.  
  1150.          Uncompressed character queue (HEX)
  1151.  
  1152.          F0F0F140404040404040FF9492F0F0F0F0F0F0F0F0F0F0F0A7A6
  1153.  
  1154.  
  1155.          Same character compressed (HEX)
  1156.  
  1157.          F0F0F1FF4007FFFF019492FFF00BA7A6
  1158.  DTS OS/2 Gateway (c) User's guide    Architecture and internal structure  6-3
  1159.  _______________________________________________________________________________
  1160.  
  1161.  
  1162.  
  1163.          Routing of the subroutine call
  1164.          ------------------------------
  1165.  
  1166.          DTS OS/2 routes the subroutine call to the required system
  1167.          without the OS/2 calling program knowing anything about the
  1168.          matter. DTS OS/2 uses YFIROUTE subroutine for the automatic
  1169.          routing which can also make a call externally direct. This
  1170.          makes it possible for external systems to call for routing
  1171.          services from DTS OS/2. In the event of this the viewing
  1172.          of the routing depends on the implementation of the completely
  1173.          external system. Routing of the OS/2 applications is never
  1174.          viewed at all, it occurs automatically without the application
  1175.          needing to have any knowledge of the matter whatsoever.
  1176.  
  1177.          YFIROUTE is the program which routes the subroutine call to
  1178.          other DTS systems, to other computers. YFIROUTE's 'handler
  1179.          name' is ROUTER. YFIROUTE's parameter area is DTS standard,
  1180.          in other words the first 39 bytes are the YLUX header.
  1181.          The end of the parameters are given as such to YFIAPPC, which
  1182.          YFIROUTE calls. In other words the following 39 bytes are also
  1183.          a YLUX header. YFIROUTE returns the data which comes back from
  1184.          YFIAPPC to YFIROUTE's original caller. In addition to
  1185.          this the original YFIAPPC return code comes at the beginning of
  1186.          the message. In other words the first 4 bytes in the returning
  1187.          message are the YFIAPPC return codes.
  1188.  
  1189.  
  1190.          Input parameter area
  1191.  
  1192.                ____________________________________________________
  1193.               !             !                                      !
  1194.               !  YLUX       !   YFIAPPC's parameter area/ DTS 2    !
  1195.               !  Header     !______________________________________!
  1196.               !             !  YLUX       !  3rd DTS system's      !
  1197.               !             !  Header     !  Handler's inp.param.  !
  1198.               !_____________!_____________!________________________!
  1199.  
  1200.               1            39            78                    32000
  1201.  
  1202.  
  1203.               Input parameter area's minimum length is thus
  1204.               78 bytes. Maximum 32,000 bytes.
  1205.  
  1206.  
  1207.          Output parameter area
  1208.  
  1209.                ____________________________________________________
  1210.               !             !             !                        !
  1211.               !  YFIAPPC    !  YFIAPPC    !  Handler's output      !
  1212.               !  Ret code   !  Ret code   !  parameters            !
  1213.               !             !             !                        !
  1214.               !  DTS 1/2    !  DTS 2/3    !  DTS 3                 !
  1215.               !_____________!_____________!________________________!
  1216.  
  1217.               1             2             4                    32000
  1218.  
  1219.               Output parameter area's minimum length is thus
  1220.               4 bytes. Maximum 32,000 bytes.
  1221.  DTS OS/2 Gateway (c) User's guide    Architecture and internal structure  6-4
  1222.  _______________________________________________________________________________
  1223.  
  1224.  
  1225.  
  1226.          Diagram of the routing
  1227.          ----------------------
  1228.  
  1229.          In this case there are 3 DTS systems each of which are in
  1230.          different computers. They do not need to be this way, routing
  1231.          always occurs between DTS systems, not necessarily between
  1232.          computers. In other words if the same computer has more than one
  1233.          DTS system which can communicate with each other so they can
  1234.          also route messages to each other within the same computer.
  1235.          There can also be more than one routing node (see diagram DTS 2)
  1236.          The number of routing nodes has no limit and the message may
  1237.          flow through any number of computers before reaching its
  1238.          final destination.
  1239.  
  1240.  
  1241.  
  1242.  
  1243.                 +----------+
  1244.                /Computer A/!
  1245.               +----------+ !
  1246.               !          ! !
  1247.               !  _____   ! !                   DTS 1 calls DTS 2's
  1248.               ! ! DTS !--------------+         ROUTER and gives it
  1249.               ! !__1__!<-----------+ !         parameters.
  1250.               !          !/        ! !
  1251.               +----------+         ! !
  1252.                                    ! !
  1253.                                    ! !
  1254.                                    ! !
  1255.                                    ! !                    +----------+
  1256.                                    ! !                   /Computer B/!
  1257.                                    ! !                  +----------+ !
  1258.                                    ! !                  !          ! !
  1259.                                    ! !                  !  _____   ! !
  1260.                                    ! +------------------->! DTS !----------+
  1261.                                    +----------------------!__2__!<-------+ !
  1262.                                                         !          !/    ! !
  1263.                                                         +----------+     ! !
  1264.                                                                          ! !
  1265.                                                                          ! !
  1266.                                                                          ! !
  1267.                                              DTS 2's ROUTER calls DTS 3  ! !
  1268.                                              with the given parameters   ! !
  1269.                              +----------+                                ! !
  1270.                             /Computer C/!                                ! !
  1271.                            +----------+ !                                ! !
  1272.                            !          ! !                                ! !
  1273.                            !  _____   ! !                                ! !
  1274.                            ! ! DTS !-------------------------------------+ !
  1275.                            ! !__3__!<--------------------------------------+
  1276.                            !          !/
  1277.                            +----------+
  1278.  
  1279.  
  1280.                      DTS 3 executes the subroutine which was requested
  1281.                      by the original DTS 1 function.
  1282.                      DTS 3 returns the reply message to DTS 2
  1283.                      which again returns it to DTS 1.
  1284.  DTS OS/2 Gateway (c) User's guide    Architecture and internal structure  6-5
  1285.  _______________________________________________________________________________
  1286.  
  1287.  
  1288.  
  1289.          Recovery implementation
  1290.          -----------------------
  1291.  
  1292.          When YFIAPPC operates in real time with the x1 function code
  1293.          there is no recovery mechanism. The user receives as a return
  1294.          code information about the failure of an operation. 
  1295.  
  1296.          At the receiving end always when something is done with
  1297.          x2,x4 function codes, the message header is recorded on the
  1298.          log at the receiving end after the message handler's call.
  1299.          If the line is disconnected suddenly or the receiving end's
  1300.          program fails, then STATUS = 1 was updated in the message
  1301.          at the sending end, which meant that the message was sent
  1302.          at least one time to the subroutine in the other computer.
  1303.  
  1304.          Always when the message buffer is undone with function code
  1305.          x4, then at the receiving end if the message STATUS =1 the log
  1306.          is checked to find if the message header is there. If found,
  1307.          then the message has already been handled one time so the
  1308.          subroutine will not be called again, and control only returns
  1309.          back to the calling program. (return code= 00).
  1310.  
  1311.  
  1312.          Computer A                                    Computer B
  1313.          +------------+
  1314.          !Application !                            +---------+
  1315.          !Program     !                            !         V
  1316.          !            !                            !   +------------+
  1317.          !CALL YFIAPPC!---------+                  !   !Application !
  1318.          !            !<------+ !                  !   !Subroutine  !
  1319.          !            !       ! !                  !   !xyz         !
  1320.          +------------+       ! !                  !   !            !
  1321.                               ! !                  !   +------------+
  1322.                               ! !                  !         !
  1323.                               ! !   Application    !         !
  1324.          =====================!=!==================!=========!=============
  1325.                               ! !       DTS        !         !
  1326.          +--------------------+ !                  +-------+ !
  1327.          !                      V                          ! !
  1328.          !    _____        +-----------+                   ! !
  1329.          !   (_____)       !YFIAPPC    !                   ! ! 
  1330.          !   !DTS  !<------!           !     +-----------+ ! ! 
  1331.          !   !spool!----+  !Start YLUX !---->!Tran YLUX  ! ! ! 
  1332.          !   (_____)    !  !           !     !           ! ! ! 
  1333.          !              !  !SEND msg   !---->!RECEIVE msg! ! ! 
  1334.          !    _____     !  !           !APPC !           ! ! !   _____ 
  1335.          !   (_____)    !  !           ! or  !CALL xyz   !-+ !  (_____)
  1336.          !   !DTS  !    !  !           !Dnet/!           !<--+  !DTS  !
  1337.          !   !error!<---+  !           ! OSI !           !----->!log  !
  1338.          !   (_____)       !RECEIVE msg!<----!SEND msg   !      (_____)
  1339.          !                 !           !     !           !
  1340.          !                 +-----------+     +-----------+
  1341.          !                      !
  1342.          +----------------------+
  1343.  DTS OS/2 Gateway (c) User's guide    Architecture and internal structure  6-6
  1344.  _______________________________________________________________________________
  1345.  
  1346.  
  1347.  
  1348.          DTS OS/2 Gateway environment     
  1349.          ---------------------------- 
  1350.  
  1351.  
  1352.  
  1353.              +-------------+
  1354.              !             !
  1355.              ! ENVIRONMENT !                            
  1356.              !             !          YLUZ.EXE              STOPYLUZ.EXE
  1357.              ! VARIABLES   !         +--------------+      +------------+
  1358.              !             !         !Call YFIAPPC  !      !Stops the   !
  1359.              +-------------+         !with FC 04,   !      !DTS spooler !
  1360.                                      !sleeps a while!<- - -!process     !
  1361.           +--------------------------!and do it     !      !YLUZ, when  !
  1362.           !                          !again         !      !necessary   !
  1363.           !                          +--------------+      +------------+
  1364.           !                  
  1365.           !   Single Threaded                  
  1366.           !   Dynamic Link            User Front-End         +------------+ 
  1367.           !   Library                 Applications           !YLUXDEC.EXE !
  1368.           !                          +--------------+      +------------+ !
  1369.           !      DTS.DLL             !YFIA and other!      ! YLUX.EXE   ! !
  1370.           !  +--------------+        !example       !      !            ! !
  1371.           !  !All DTS       !        !programs which!      !DTS Back-End! !
  1372.           !  !internal and  !<-------!call DTS serv.!      !server main ! !
  1373.           !  !external func-!        !YFIAPPC       !      !program.    ! !
  1374.           !  !tions         !        +--------------+      !Calls User  ! !
  1375.           !  !              !                              !subroutines ! !
  1376.           !  !Routines:     !                              !via OS/2    ! !
  1377.           +->!              !         User subroutine      !runtime     ! !
  1378.              !YFIAPPC       !         libraries .DLL.      !dynamic link! !
  1379.              !YFITIMES      !        +--------------+      !Linked also ! !
  1380.              !YFICOMPR      !        !DTS exampl DLL!      !with DTS.OBJ! !
  1381.              !YFIAPPCX      !<- - - -!DTSEXSUB and  !<-----!(APPC/DECnet!-+
  1382.              !YFIAPPCY      !        !any number of !      ! communic.) !
  1383.           +--!...           !<-+     !user own DLL  !      +------------+
  1384.           !  !...           !  !     !DTSEXSUB      !            !
  1385.           !  !...           !  !     !...           !            !
  1386.           !  +--------------+  !     +--------------+            !
  1387.           !                    !                                 !
  1388.           !                    !                                 !
  1389.           !                    !                                 !
  1390.           !                    !                                 !
  1391.           !       _______      !   _______          _______      !
  1392.           !      (_______)     !  (_______)        (_______)     !
  1393.           !      !       !     !  !       !        !       !     !
  1394.           +----->! SPOOL !-----+  ! ERROR !        !  LOG  !<----+
  1395.                  !       !- - - ->!       !        !       !
  1396.                  (_______)        (_______)        (_______)
  1397.                        
  1398.  
  1399.  
  1400.  
  1401.          Spooled DTS messages are each in own file, those files are
  1402.          in directory which user has specified when DTS was installed.
  1403.          Messages with logical error are moved to other directory which
  1404.          was also specified by user. Filename is the message timestamp.
  1405.          DTS Back-End uses the LOG directory for recovery reasons. If
  1406.          DTS TRACE service is active, then we need also TRACE directory
  1407.          for trace records (not in picture).
  1408.  DTS OS/2 Gateway (c) User's guide    Installation                         7-1
  1409.  _______________________________________________________________________________
  1410.  
  1411.  
  1412.  
  1413.          7. DTS Gateway installation from diskette
  1414.          -----------------------------------------
  1415.                                                                              
  1416.          Before You start be sure that You have correctly installed the      
  1417.          DIGITAL DECnet OS/2 product and/or IBM OS/2 EE Communications       
  1418.          Manager.                                                            
  1419.                                                                              
  1420.                                                                              
  1421.          1. Make first a backup copy of your DTS installation diskette, use  
  1422.             DISKCOPY utility.                                                
  1423.                                                                              
  1424.          2. Create \DTS directory to Your hard disk and copy all files from  
  1425.             diskette to that directory, use XCOPY utility with /S option.    
  1426.                                                                              
  1427.          3. Edit DTS.CFG file and add the file to the end of Your CONFIG.SYS.
  1428.             In DTS.CFG there are all parameters what DTS need. Parameters    
  1429.             are environment variables. Parameters and Your Communications    
  1430.             Manager and/or DECnet configuration must be compatible with      
  1431.             each others. With DTS there comes two example configuration      
  1432.             file of Comm Mgr, file names are DTSPU2.CFG and TOKEN.CFG.       
  1433.             Copy these files to Your Communications Manager work directory   
  1434.             (normally C:\CMLIB) and start Comm Mgr with one of these,        
  1435.             then You can look how Comm Mgr must configurate.                 
  1436.             If You allready have configured You Comm.Mgr, then don't copy    
  1437.             files, just Edit DTS.CFG and add it to end of CONFIG.SYS.        
  1438.                                                                              
  1439.          4. Copy DTSCHARS.TAB to Your Comm. Mgr directory (normally C:\CMLIB)
  1440.             and add the file name 'DTSCHARS.TAB' to Your Comm.Mgr Workstation
  1441.             profile (Translation table file name).                           
  1442.                                                                              
  1443.          5. Copy DTS.DLL, DTS.LIB and DTSEXSUB.DLL to directory              
  1444.             where You other dynamic link libraries are located.              
  1445.             You have specified this directory in Your CONFIG.SYS             
  1446.             (LIBPATH environment variable).                                  
  1447.                                                                              
  1448.          6. If You use APPC, add DTS spooler start to your Communications    
  1449.             Manager startup procedure. Look first an example procedure       
  1450.             STARTDCM.CMD in installation diskette.                           
  1451.             DTS spooler program is YLUZ.EXE, so if your DTS subdirectory is  
  1452.             in C: drive, the start command is:   DETACH C:\DTS\YLUZ          
  1453.                                                                              
  1454.          7. If You use DECnet, modify Your STARTUP.CMD and add DTS startup   
  1455.             to that procedure. Look examples STARTUP.CMD STARTDTS.CMD        
  1456.             YLUX01.CMD and YLUX02.CMD in installation diskette.              
  1457.                                                                              
  1458.          8. DTS is now installed, before You can use it You must configurate 
  1459.             also remote DTS (VAX or CICS DTS for example). You must also     
  1460.             boot Your OS/2 and start Communication before DTS can run.       
  1461.             If remote DTS is CICS, then in CICS side in PS/2 node definition 
  1462.             'ALLOCATE with ACQ test' field must be blank (not ACQ).          
  1463.             Check this with CICS YFIN transaction.                           
  1464.             CICS DTS release must be 020-005 or later, check with CICS DTS   
  1465.             transaction (first line on top of screen).                       
  1466.                                                                              
  1467.          You can verify installation with program YFIA which is a simple     
  1468.          application that use DTS (call YFIAPPC function). In installation   
  1469.          diskette there are also source code available of YFIA (YFIA.C).     
  1470.          Makefile YFIA is an example how to compile and link YFIA or other   
  1471.          applications which use DTS. Look also source code of DTSEXSUB.DLL   
  1472.          and its MAKE file if You like to use DTS Back-End services.         
  1473.                                                                             
  1474.                                                                              
  1475.                             E R R O R  R E P O R T                           
  1476.  
  1477.  
  1478.          DTS software is not guaranteed and its maintenance after
  1479.          installation is the customer's responsibility. DIGITAL is
  1480.          not responsible for accidents caused by DTS' defective
  1481.          operation.
  1482.  
  1483.          If the customer has DTS' latest release in use and a problem
  1484.          occurs we hope, however that the customer informs us so we can
  1485.          according to the opportunity, help. The easiest way to inform us
  1486.          is to complete the form below and send it to the address:
  1487.  
  1488.  
  1489.  
  1490.  
  1491.          Digital Equipment Corporation       phone:  +358 0 4345315
  1492.          Peter Blomster
  1493.          PL 16            
  1494.          02201 ESPOO   
  1495.          FINLAND
  1496.  
  1497.  
  1498.  
  1499.          Sender's name/company ..... _______________________________________
  1500.  
  1501.          Telephone number .......... _______________________________________
  1502.  
  1503.          Postal address ............ _______________________________________
  1504.  
  1505.                                      _______________________________________
  1506.  
  1507.  
  1508.          Current DTS release in use ..........  ____________________________
  1509.  
  1510.          Comm Mgr and/or DECnet OS/2 version .  ____________________________
  1511.  
  1512.          Operating system and equipment  .....  ____________________________
  1513.  
  1514.  
  1515.  
  1516.          Short description of the problem, use the reverse side of this
  1517.          form if required.
  1518.  
  1519.          ___________________________________________________________________
  1520.  
  1521.          ___________________________________________________________________
  1522.  
  1523.          ___________________________________________________________________
  1524.  
  1525.          ___________________________________________________________________
  1526.  
  1527.          ___________________________________________________________________
  1528.  
  1529.          ___________________________________________________________________
  1530.  
  1531.          ___________________________________________________________________
  1532.  
  1533.          ___________________________________________________________________
  1534.  
  1535.          ___________________________________________________________________
  1536.  
  1537.          ___________________________________________________________________
  1538.  
  1539.          ___________________________________________________________________
  1540.