SOCKETSET

Use the SOCKETSET command to retrieve the name of the active socket set. If you specify the name of a socket set as a parameter, then that socket set becomes the active socket set.

Format

Read syntax diagramSkip visual syntax diagram
>>-SOCKET--(--"SOCKETSET"--+---------------+--)----------------><
                           '-,--subtaskid -'      

Parameters

subtaskid
The name of a socket set that was created with the INITIALIZE command

Returned value

The command returns a string that contains the return code and the name of the active socket set, for example, 0 MYSET. The return code can be 0, a REXX socket API error number, or the REXX TCP/IP error number that is set by the socket command. The return code 0 indicates that the requested socket command was completed successfully.

See Socket call error return codes for additional information about the numeric error codes that are returned by this command.

The following REXX TCP/IP error number can be returned:
  • None
The following REXX socket API error number can be returned:
  • 2005 ESUBTASKNOTACTIVE

LE C/C++ equivalent

This command has no LE C/C++ equivalent.

Code example

Figure 1. SOCKETSET command example
/*  REXX EZARXR27 */
/*
 * This sample demonstrates the use of the SOCKSET
 * socket command.
 */
src=socket("INITIALIZE","MYSET");
src=Socket("SOCKETSET");
Say src;
src=socket("TERMINATE","MYSET");
exit 0;