CVTCLSRC (Convert CL Source)

CVTCLSRC Command syntax diagram

 

Purpose

The Convert CL Source (CVTCLSRC) command is used to convert CL source from System/38 syntax to an iSeries 400 syntax.

The CVTCLSRC command converts the following to an iSeries 400 syntax:

Conversion of user-defined commands is limited to the reordering of qualified names and adjusting comment syntax.

The CVTCLSRC command creates a report indicating the success or failure of the source file conversion. This report is contained in a printer file with the name 'CVTCLSRC'. Successful conversions of System/38 source are noted in the report with the message:

CPF0786   Member has been converted.

Error messages are printed for unsuccessful conversions. Some examples of functions which cannot be converted and may be printed as error messages in the report are:

stmt#  CPF0785  Command cannot be converted
stmt#  CPF0789  Keyword cannot be converted

The user may 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.

Restriction: Library QSYS38 must exist on the system for conversion of command names, keywords, keyword values, and detection of unsupported functions by this command. Commands with unsupported command names, keyword names, or keyword values are not converted.

 

Required Parameters

FROMFILE
Specifies the qualified name of the System/38 source file to convert to iSeries 400 syntax.

The name of the file can be qualified by one of the following library values:

*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.

library-name: Specify the name of the library to be searched.

file-name: Specify the name of the System/38 source file to convert to iSeries 400 syntax.

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

The name of the file can be qualified by one of the following library values:

*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.

library-name: Specify the name of the library to be searched.

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

FROMMBR
Specifies the member name of the source file member to convert.

*ALL: All members of the specified source file are converted to iSeries 400 syntax.

generic*-member-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. See generic names for additional information.

member-names: Specify the names of the source file members to convert. Specify no more than 50 names.

Note that the member name of the converted source member is the same as the member name of the unconverted source member in the file specified on the FROMFILE parameter.

Example for CVTCLSRC

CVTCLSRC  FROMFILE(OLDLIB/FILEA)  TOFILE(NEWLIB/FILEB)
  FROMMBR(PGM1 PGM2 PGM3)

This command converts three members (PGM1, PGM2, PGM3) of a System/38 source file (FILEA) located in library OLDLIB, to an iSeries 400 source file. The converted source file members are located in FILEB, in library NEWLIB. The converted members keep their original member names, PGM1, PGM2, and PGM3.

Error messages for CVTCLSRC

*ESCAPE Messages

CPF0781
File &1 in library &2 not a source file.
CPF0784
Specified to-file same as from-file.