PCVTCLSRC converts records in a CL source member (type
CLP or CLLE) to a standard format. This is one of the
commands in our ISeries
utilities library (click this URL for full
Prospero Software PSPUTIL contact and pricing details).
The formatting performed is relatively simple. Firstly,
all stand-alone comments (not associated with any CL
statement) are preserved intact. Secondly, all CL
statements are formatted as if you had prompted them
with F4 in SEU then pressed ENTER. That is, lower-case
is capitalised, all parameter names are inserted, and
the code itself is column-aligned (without indentation
for nested logic).
For example, the input line:
next: CRTPF QTEMP/XXX
rcdlen(30) /*
Create work file */
is converted to:
NEXT: CRTPF FILE(QTEMP/XXX)
RCDLEN(30) /* Create work file */
Some developers try to format CL source for
readability while others don’t bother. The PCVTCLSRC
utility enables you to standardise your CL source on a
permanent or one-off basis. For example, PCVTCLSRC has
been used to temporarily convert a large body of CL
source so that it could be scanned for particular
keywords as part of Y2K-compliance verification. This
scan would have been much more difficult without
consistently formatted source.