The following tasks are unique to MCP COBOL projects.
Connecting to a Server
When an MCP COBOL data source project is created, the following server messages are supplied automatically.
Server Message | Provided Fields | Explanation |
---|---|---|
connect_Basic | Usercode (Required) | Connection is valid only if the identified user code matches the usercode on the MCP server. |
Password (Optional) | Connection is valid only if the password is appropriate for the specified usercode. This field is case sensitive and represents logon credentials. | |
AccessCode (Optional) | Use if the Transaction Server window requires an accesscode | |
AccessCodePassword (Optional) | Use if the Transaction Server window requires an accesscode password. | |
StationPrefix (Optional) | Use if the Transaction Server window requires a station prefix. This field is used to specify the station prefix to be used when the Connector PSH on the MCP creates a station name for the connection from the ePortal application to the Transaction Server window. This resulting station name can be used to monitor activity on the MCP server. If no value is specified, a default value of CPEPORTAL is used. | |
HostName (Optional) | Use if the Transaction Server window requires a host name. This field specifies the IP address or Domain Name Server name of the MCP server on which the COBOL application resides. | |
WindowName (Optional) | Use if the Transaction Server window requires a window name. This field is used to specify the Transaction Server window name to which the ePortal server message connects The window must be registered in Transaction Server as a valid window name. | |
PortNumber (Optional) | Use if the Transaction Server window requires a port number. This field is used to specify the port number that is used to connect to the MCP COBOL application. This value must match the endpoint used by the Connector PSH on the MCP system. The value can be between 1 and 65535. | |
Connect_autologon | Usercode (Required) | Connection is valid only if the identified user code matches a preconfigured user code on the MCP server. |
StationPrefix (Optional) | Use if the Transaction Server window requires a station prefix. This field is used to specify the station prefix to be used when the Connector PSH on the MCP creates a station name for the connection from the ePortal application to the Transaction Server window. This resulting station name can be used to monitor activity on the MCP server. If no value is specified, a default value of CPEPORTAL is used. |
Notes:
In orchestration, if you assign the values to the fields HostName, WindowName and PortNumber of connect_Basic message, it overrides the values defined in the connection configuration.
Do not use the connect_Basic server message fields: HostName, WindowName or PortNumber, if the connection is configured to use redundant connections (RoundRobin or FailOver). Setting these fields may override the functioning of redundant connections.
To add a connection
Open the On Client Session Start event handler or any On <client message name> event handler that needs the connection.
Drag the Connect activity from the Toolbox to the Start node of an event handler.
In the Properties window, do the following:
Select the special connect server message to be sent to the Messages property. The server message appears in the Server Messages node of the event.
Click the MessageData property, and click the selection button on the right. Make any necessary changes using the Assign Data dialog box and click OK. Refer to Assign Data for Message Dialog Box for details.
To add a connection with a pre-set value using connect_autologon
In the ePortal Message View window, select the appropriate client message and drag it to the root of the orchestration tree.
The On <client message name> node is added to the tree and the client message appears in the Client Messages node of the event.
Drag the Connect activity from the Toolbox to the Start node of the new event handler.
In the Properties window, do the following:
Set the Message property to connect_autogon.
Click the MessageData property, and click the selection button on the right.
In the Assign From column for usercode, select Literal.
In the Data Value column, type the usercode that is preconfigured on the MCP server.
Click OK.
Add activities to the Start node that initiate the sending and receiving of data to and from the MCP server application.
To add a connection with a solicited value using connect_Basic
Create a client message that includes the usercode and password fields of the connect_Basic server message. Refer to Creating Client Messages.
In the ePortal Message View window, select the client message created in step 1 and drag it to the root of the orchestration tree. The On <client message name> node is added to the tree and the client message appears in the Client Messages node of the event.
Drag the Connect activity from the Toolbox to the Start node of the new event handler.
In the Properties window, do the following:
Set the Message property to connect_Basic.
Click the MessageData property, and click the selection button on the right.
In the in the Assign From column for both usercode and password, select Variable. The Data Value column for the fields is preset to the clientMessage.usercode. and clientMessage.password, respectively.
Click OK.
Add activities to the Start node that initiate the sending and receiving of data to and from the MCP server application.
Ignoring the First Message Received from a COBOL Application
If the Transaction Server program returns data when an open window notification occurs, this data can be ignored by selecting the Discard Open Window Response option on the <project name> tab of the ePortal Application Configuration Properties dialog box. Refer to Viewing or Changing ePortal Application Configuration Properties
Ignoring the first message received might be helpful if the new presentation has a home page containing a menu of selections, so the opening screen of the MCP application is no longer needed.