The VC_COPY Command

In Writing Virtual Field Derivation Code, a duplication problem was described that can occur when virtual derivation code from multiple files is copied into an RDML function that uses the *DBOPTIMISE facilities.

The VC_COPY command can be used in virtual field derivation code to indicate that a block of code only be copied if it has not already been copied.

The syntax diagram for the VC_COPY command looks like this:

                                                          Required 

                                                                       

   VC_COPY ------ SRCFILE ------ file name . library name -------> 

                                                                   

           >----- SRCMBR ------- source member name -------------| 

 

SRCFILE

Specifies the name and library of the IBM i source physical file containing the source member specified by the SRCMBR parameter.

*LIBL is acceptable and preferable as the library name, but of course, the correct library must be in the library list of any I/O module or RDML compile job attempting to access the member.

SRCMBR

Specifies the name of the source member in the source file specified by the SRCFILE parameter that contains the code block to be copied.

Some points to note about using VC_COPY commands are: