Starting a TCP/IP/NJE Socket *START,TCP,SOCKET=

Function

Use the *START,TCP,SOCKET= command to start a socket under a Netserv, in order to begin communication with a remote node with TCP/IP protocol.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-+-*START-+--,TCP--,SOCKET=--sockname------------------------><
   '-*S-----'                             

Parameters

SOCKET=sockname
Specifies the name of the socket to be started. The socket is defined by the SOCKET initialization statement or the *MODIFY,SOCKET,ADD= command.

Rules

  • The socket to be started must specify the NETSERV, NODE, and HOSTNAME parameters. They can be specified on the SOCKET initialization statement or the *MODIFY,SOCKET=sockname command.
  • The Netserv must first be started by the *CALL,TCP command.
  • The socket must be available on the remote node. If the remote node is JES2 or JES3, the socket becomes available when the Netserv starts and connects to TCP/IP.
  • The specified socket must not already be active.
  • During *START,TCP,SOCKET= command processing, the NETSERV address space waits for a response from the remote NJE node. This can delay all NJE activity in that NETSERV address space until the connection is made or the timeout period expires.

Results

  • The nodes that communicate over the socket are signed on to each other and can now be used to send jobs, output, messages, and commands.
  • If this node was requested to sign on because another node issued a *S,TCP,SOCKET=, or equivalent, command, a server socket named @nnnnnnn (the first unique name starting with @0000001) is automatically added and marked active. This socket can be specified on any subsequent socket command in addition to sockets that were defined on this node by SOCKET statements.

Examples

The following command is issued on NODE1:
*s tcp socket=s4
The following response is received on NODE1:
SY1 IEESYSAS  IAZ0543I JES3S1 TCP/IP connection with IP Addr: ALPS4197.POK.IBM.COM Port: 175 Initiated
SY1 IEESYSAS  IAZ0543I JES3S1 TCP/IP connection with IP Addr: ALPS4197.POK.IBM.COM Port: 175 Successful
SY1 IEESYSAS  IAT9305 NODE NODE4    SIGNED ON  NETSERV JES3S1   SOCKET S4
SY1 IEESYSAS  IAZ0544I JES3S1 S4 NJE connection with IP Addr: alps4197.pok.ibm.com Port: 175 Successful
The following response is received on NODE4:
SY1 IEESYSAS IAZ0543I JES3S4 TCP/IP connection with IP Addr: alps4216.pok.ibm.com Port: 1027 successful
SY1 IEESYSAS IAT9305 NODE NODE1 SIGNED ON NETSERV JES3S4 SOCKET @0000001
SY1 IEESYSAS IAZ544I JES3S4 NJE connection with IP Addr: alps4216.pok.ibm.com Port: 1027 successful