How COMTI handles string data that is passed to and from a mainframe computer in SNA Server 4.0 and in Host Integration Server 2000 (810785)



The information in this article applies to:

  • Microsoft SNA Server 4.0 SP4
  • Microsoft Host Integration Server 2000
  • Microsoft Host Integration Server 2000 SP1

INTRODUCTION

When COM Transaction Integrator (COMTI) sends string data to a mainframe computer or receives string data back from a mainframe computer, the data is formatted differently. How the data is formatted differently depends on the settings for each string parameter that is configured in COMTI Component Builder. Additionally, there are some differences between the way that COMTI handles strings in Microsoft SNA Server 4.0 and the way that COMTI handles strings in Microsoft Host Integration Server 2000.

MORE INFORMATION

When you use COMTI Component Builder, there are configuration options for string delimiting and for error handling. You can see these options on the COBOL tab of the properties for a string parameter.

You can select either of the following options:
  • The "Truncate" option for string delimiting
  • The "Error" option for error handling
The "Error" option is the default selection.

You can use the "Truncate" option to specify the length of a string that a client passes in a program. When you set the "Truncate" option, the string is truncated at the length that you set and then passed to the mainframe computer. You may receive an error message that states that the string is too long. When the string is truncated and then passed to the mainframe computer, the COMTI runtime sends an error message to the client program. No error message is sent to the mainframe computer.

String delimiting selections are padded with spaces or are null terminated.

"Padded with spaces" is the default selection. The option that you select determines how the string data is passed to the mainframe computer for input parameters. Additionally, the option that you select determines how the data is interpreted when that data is returned from the mainframe computer for output parameters. The following tables show how the data is interpreted for a standard installation of SNA Server 4.0 and for a standard installation of Host Integration Server 2000.

Note The articles that are mentioned in the "References" section include registry entries that change the way that strings are handled.

b = a space
# = a Null (x00)

* = a random character from memory
   (unless the option is checked to 'initialize buffer with hexadecimal value')
Input string parameter handling:

                                 Data sent to host
 Data           -----------------------------------------------
received       Pad with spaces                     Null terminated
 from        ----------------------              --------------------
client        SNA 4    Host Integration Server    SNA 4       HIS
---------   ---------    ---------              ---------  ---------
XXYYZZbbb   XXYYZZbbb    XXYYZZbbb              XXYYZZbbb  XXYYZZbbb
XXYYZZ###   XXYYZZbbb    XXYYZZ##b              XXYYZZ#**  XXYYZZ##*
XX##ZZ###   XXbbbbbbb    XX##ZZ##b              XX#******  XX##*****
XXbbZZ###   XXbbZZbbb    XXbbZZ##b              XXbbZZ#**  XXbbZZ##*
#########   bbbbbbbbb    b#######b              #********  ##*******



Output string parameter handling:

                                 Data sent to client
 Data           -----------------------------------------------
received       Pad with spaces                    Null terminated
 from      ----------------------               --------------------
 host        SNA 4    Host Integration Server     SNA 4       HIS
---------   ---------    ---------              ---------  ---------
XXYYZZbbb   XXYYZZ       XXYYZZ                 XXYYZZbbb  XXYYZZbbb
XXYYZZ###   XXYYZZ###    XXYYZZ###              XXYYZZ     XXYYZZ
XX##ZZ###   XX##ZZ###    XX##ZZ###              XX##ZZ     XX
XXbbZZ###   XXbbZZ###    XXbbZZ###              XXbbZZ     XXbbZZ
#########   0 bytes      #########              0 bytes    0 bytes

REFERENCES

For additional information about COMTI and about string parameters, click the following article numbers to view the articles in the Microsoft Knowledge Base:

820719 FIX: COMTI returns NULL characters instead of a zero byte string

828663 Host Integration Server permits embedded null characters to be returned in string parameters


Modification Type:MinorLast Reviewed:11/19/2004
Keywords:kbhowto kbinfo KB810785 kbAudDeveloper