Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: "The Function Management Header returned from the Host contained an invalid Length" error when you use a Session Integrator application


View products that this article applies to.

Symptoms

A Session Integrator application that uses the LU0 programming interface returns the following error when it receives a response from a mainframe application:

Message : The Function Management Header returned from the Host contained an invalid Length.
Error Code : Microsoft.HostIntegration.SNA.Session.SessionStatus.FMHLengthError”

↑ Back to the top


Cause

This problem occurs when a mainframe application sends data to Session Integrator that has the Function Management Header (FMH) bit in the Response Header (RH) set to 1. This setting indicates that one or more function management (FM) headers are included in the response. In the situation that is described in the "Symptoms" section, the response from the mainframe does not include any FM headers. This causes the response to be parsed incorrectly. This parsing problem causes the error.

↑ Back to the top


Resolution

Cumulative update information

The fix that resolves this problem is included in Cumulative Update 2 for Host Integration Server 2013.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


More Information

After you apply this update, you can control Session Integrator’s parsing of FM headers by using a configuration option in the LU0 programming interface. By default, Session Integrator tries to parse FM headers if the FMH bit is set in the Response header.

If the Session Integrator LU0 application uses a connection string to connect to the IBM mainframe, the following parameter can be added to the connection string to disable FMH parsing:

FUNCTIONMANAGEMENTHEADERS=NONE

The following is an example of a connection string that has this new property added:

_session.Connect("FUNCTIONMANAGEMENTHEADERS=NONE;LogicalUnitName=" + LUName.Text, SessionLU0InitType.SSCP);

Note This connection string is based on the connection string that is used in the LU0NET Session Integrator sample that is included in the Host Integration Server 2013 SDK.

If the FUNCTIONMANAGEMENTHEADERS property is not included in the connection string, or if the property is set to FUNCTIONMANAGEMENTHEADERS=INCLUDE, and if the FMH bit is set to 1, Session Integrator tries to parse FM headers in the data that it receives from the IBM mainframe application.

If Session Integrator uses the SessionConnectionLU0 Class to specify the connection properties to use when it connects to the IBM mainframe system, FM Header parsing is controlled by using the following property:

FunctionManagementHeaderSupport
The new FunctionManagementHeaderSupport property supports the following values:

FunctionManagementHeaderSupport.Include
FunctionManagementHeaderSupport.None
The following is an example of how to use the SessionConnectionLU0 Class to specify an LU Name, Host Code Page and to disable the parsing of FM headers:

SessionConnectionLU0 _connection = new SessionConnectionLU0();
_connection.LogicalUnitName = LUName.Text;
_connection.HostCodePage = 37;
_connection.FunctionManagementHeaderSupport.None;
If the FunctionManagementHeaderSupport property is not specified, the default behavior is that Session Integrator parses FM headers in any response that is received from the IBM mainframe application if the FMH bit is set to 1.

Third-party information disclaimer
The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of these products.

↑ Back to the top


Keywords: kbqfe, kbfix, kbnotautohotfix, kbexpertiseinter, kbbug, kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 2954739
Revision : 1
Created on : 1/7/2017
Published on : 12/3/2014
Exists online : False
Views : 215