PQ-COMPILE
Compiles a large Proc to increase its efficiency.
Syntax
PQ-COMPILE file-specifier item-id {(options}
Syntax Elements
file-specifier Specifies a file as defined in Conventions.
item-id The name of the Proc item.
Options
O Allows you to specify the same filename for the destination file as the source filename. This means the source item will be overwritten by the compiled version. The source item no longer exists, along with all comments, and you can no longer edit it and make any further changes.
S Deletes comment lines.
X Disables the error-checking routine. Must be used if the Proc you are compiling contains assembly user exits. The Proc compiler goes through an error-checking routine, and, because data used to feed a user exit could appear anywhere within an item, errors would be returned for lines that do not contain valid Proc commands.
Prompt
DESTINATION FILE:
Enter the name of the destination file for the compiled version of the Proc. The destination filename must be different from the original file-name (unless you use option O).
Comments
PQ-COMPILE increases the efficiency of a Proc by stripping text from comments and changing all intra-program jumps to direct jumps. This means that the Proc processor does not have to scan from the top of the Proc each time it jumps to a label.
The compiled code is readable, though many commands take on an altered form.
If you plan to call user exits from Procs and compile those Procs, any lines of data that will be accessed by the called program must not begin with a numeric. The Proc compiler recognizes these as labels.
You can reverse the compilation process with the UCOMPILE command, which converts direct jumps back to intra-program jumps. Note, however, that it cannot maintain the original label values or restore comments. In addition, G F and G B commands are converted to G commands.
Example
:PQ-COMPILE PROC-SOURCE UPDATE.INV
DESTINATION FILE:PROC.FILE
This example compiles the UPDATE.INV Proc in the PROC-SOURCE file and files the compiled item in the PROC.FILE file. The source item in PROC-SOURCE file remains unchanged. The item containing the compiled item is also named UPDATE.INV.