Convert TCP/IP CL Source (CVTTCPCL)

The Convert TCP/IP CL Source (CVTTCPCL) command is used to convert TCP/IP commands from releases prior to Version 3 Release 1 Modification 0 (V3R1M0) to the command syntax for the current release. The pre-V3R1M0 TCP/IP CL commands to be converted must exist in a source physical file.

The following commands are converted based on their specified parameter values. In some cases you may need to manually update the commands after conversion. Messages are issued to help identify the command statements that require manual updates.

The CVTTCPCL command creates a printer file with the name CVTTCPCL. This printer file contains a report that indicates the success or failure of the source file conversion.

If a printer device file with the name CVTTCPCL is found in the job&apos.s library list when the CVTTCPCL command is issued, that printer device file is used to create the printer file. Otherwise, the CVTTCPCL command uses the Override with Printer File (OVRPRTF) command to use printer device file QSYS/QSYSPRT to create the printer file.

Note: Use the Create Printer File (CRTPRTF) command to create a printer device file.

Successful conversions of TCP/IP command source are noted in the report with the message:

 TCP1E08   Member has been converted.

Informational messages are printed for unsuccessful command conversions. (Informational messages are also sent to the job log during conversion, and a single escape message is sent when the CVTTCPCL command has completed if any informational messages have been sent.) Some examples of functions that cannot be converted and may be printed as informational messages in the report are:

 TCP1E07  Command &1 cannot be converted
 TCP1E10  Parameter keyword cannot be converted in command &1

The user can write a program, perhaps by using the Copy Spooled File (CPYSPLF) command, to process the report based on the success or failure of the conversion.

Parameters

Keyword Description Choices Notes
FROMFILE From file Qualified object name Required, Positional 1
Qualifier 1: From file Name
Qualifier 2: Library Name, *LIBL, *CURLIB
TOFILE To file Qualified object name Required, Positional 2
Qualifier 1: To file Name
Qualifier 2: Library Name, *LIBL, *CURLIB
FROMMBR From member Single values: *ALL
Other values (up to 50 repetitions): Generic name, name
Required, Positional 3

From file (FROMFILE)

Specifies the CL source file containing TCP/IP commands to be converted.

Qualifier 1: From file

name
Specify the name of the CL source file to convert.

Qualifier 2: Library

*LIBL
All libraries in the job's library list are searched until the first match is found.
*CURLIB
The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
name
Specify the name of the library to be searched.

To file (TOFILE)

Specifies the file in which the converted source is placed. It must be different than the name of the FROMFILE parameter.

Qualifier 1: To file

name
Specify the name in which the converted source file is placed.

Qualifier 2: Library

*LIBL
All libraries in the job's library list are searched until the first match is found.
*CURLIB
The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
name
Specify the name of the library to be searched.

From member (FROMMBR)

Specifies the member of the source file member to convert.

*ALL
All members of the specified source file are converted to V3R1M0 TCP/IP command syntax if possible.
generic-name
Specify the generic name of the source file members to convert. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. The asterisk substitutes for any valid characters. A generic name specifies all objects with names that begin with the generic prefix for which the user has authority. If an asterisk is not included with the generic (prefix) name, the system assumes it to be the complete object name. If the complete object name is specified and multiple libraries are searched, multiple objects can be converted only if *ALL or *ALLUSR library values can be specified for the name. Only the first 50 members matching the generic name's criteria will be converted.
name
Specify the names of the source file members to convert. Specify no more than 50 names.

Note that the only source members that are processed are those with a member type of CL, CLP, or TXT. Members in the FROMFILE with any other value for the member type are ignored by the CVTTCPCL command. If a source member is processed, the name of the converted source member in the TOFILE will be the same as the member name in the FROMFILE.

Examples

CVTTCPCL   FROMFILE(OLDLIB/QCLSRC)  TOFILE(NEWLIB/QCLSRC)
           FROMMBR(TCPPGM1 TCPPGM2 TCPPGM3)

This command converts all TCP/IP commands in the three members (TCPPGM1, TCPPGM2, TCPPGM3) of a CL source file (QCLSRC) located in library OLDLIB, to their new command names and formats. The converted source file members are located in QCLSRC, in library NEWLIB. The converted members keep their original member names, TCPPGM1, TCPPGM2, and TCPPGM3.

Error messages

*ESCAPE Messages

CPF9801
Object &2 in library &3 not found.
CPF9810
Library &1 not found.
TCP1E02
File &1 in library &2 not found.
TCP1E03
File &1 in library &2 not a source file.
TCP1E06
Specified TOFILE same as FROMFILE.