James Lampert wrote:
Hmm. I don't recall ever hearing of a CHGPF command before. Yet our
V4R4 development box appears to have one.

Does it really allow one to restructure a PF without having to go through the old turkey-trot of renaming it, compiling the new
version, and copying the records over? Are there any limitations,
compared with doing it the old-fashioned way?

And when did IBM slip it in without our noticing?

CHGPF is what it was since S/38, plus some more; to change attributes of both the physical file itself [e.g. MAXMBRS()] and for the members that exist or are added, their attributes acquired from the file [e.g. SIZE()].

It is the specific invocation CHGPF SRCFILE() which is /like/ an SQL ALTER. The CHGPF SRCFILE() does the rename, create from source, data copy, owner change, grant with reference, journal to the new file, recreate logicals to refer to the new physical, LF owner change, LF grant with reference, journal new access path, and then delete the old files. The copy process allows transfer of some existing access paths [index objects] from the old files to the new files versus rebuild which is typically one of the longest portions of the manual process, and when resource limitations require it, the copy is done in /chunks/ to remove the requirement to have two full copies of data on the system.

The limitations are fewer than manual, but a review of the DSPDBR RCDFMT(*ALL) of the PF should be done to know what LF will change, and that the exception of that list from DSPDBR RCDFMT(*NONE) represents those LF that will not change; the manual method results, will depend on the DDS and/or methods used for creating the LF.

Re reference to V4: I would recommend to avoid ALTER on any releases no longer supported, and especially to *never* alter to add a column to a file that was created on V5R# and saved back to V4R#. Actually that may not be the VRM boundary of concern; it is whatever release boundary, for which database file record format conversions took place, since the ALTER capability was added.

Regards, Chuck

Return to Archive home page | Return to MIDRANGE.COM home page