Overview of the convprm Tool

The following describes the convprm tool:

  • It is a command line program which can be run either manually or scripted.

  • It converts string literals from double-quoted character strings to single-quoted character strings, but leaves double-quoted object names intact. It can distinguish between an object name and a string literal even when both are represented as a sequence of characters delimited with double quotes.

  • It escapes quotation marks. Quotation marks must be escaped when the character that is used to delimit the string appears in the literal string itself. For example, the sentence "This character "" is a double quote" contains an escaped quote mark. The sentence 'This character '' is a single quote' contains an escaped single quote mark. When converting from double quotes to single quotes, convprm removes one of the repeated double quotes from escaped double quotes and escapes the single quotes that are embedded in the character sequence.

  • It issues a warning message if NOUSEANSISQLQUOTES is specified in the GLOBALS file. The message states that the converted parameter file is incompatible with NOUSEANSISQLQUOTES, but the parameter file was updated anyway.

  • It recursively converts the files that are included through an OBEY or INCLUDE parameter.

  • It creates a backup of the initial parameter file in the same directory as the original file. The backup has the name of the original file with the .bck suffix. The creation of a backup file can be disabled when you run the convprm tool.

  • It converts the character set. The character set for the new parameter file is taken from the CHARSET parameter in the original parameter file. Absent that parameter, the character set is taken from the CHARSET parameter in the GLOBALS file. Absent a GLOBALS parameter, the new parameter file is written in the character set of the local operating system.

Table -1 provides examples of the conversion outcome.

Table -1 Comparison of Input Requirements for [NO]USEANSISQLQUOTES

Input variable String literal with old syntax String literal with new syntax

Double quotes are escaped in the old syntax but not in the new syntax.

"abc""def"

'abc"def'

Single quotes are escaped in the new syntax but not in the old syntax.

"abc'def"

'abc''def'