Previous Topic: Exit program call functionalityNext Topic: Use of external source members to hold preprocessor directives


Global control data area YBRTPXA

A new data area called YBRTPXA is shipped in the product. It is a 42 byte character data area with the following format:

Bytes 1 - 10:          Pre-compilation exit program name (default: '*NONE')
 Bytes 11 - 20:     Pre-compilation exit program library (default: blank)
 Bytes 21 - 30:    Post-compilation exit program name (default: '*NONE')
 Bytes 31 - 40:    Post-compilation exit program library (default: blank)
 Byte 41:           Cancel compilation if error ('1'/'0') (default: '0')
 Byte 42:             Currently unused (default: blank)

If a global pre- or post-compilation exit program is specified, it must have the parameter format as defined in the "Exit program call functionality" section above) which will automatically be called during the compilation process. If the exit program library is not specified, *LIBL will be used.

The global pre-compilation exit program (if specified) will be called before any exit programs defined using a P* directive and the global post-compilation exit program (if specified) will be called after any exit programs defined using a P* directive.

If byte 41 in the YBRTPXA data area is set to '0' (the default), then if the compile preprocessor encounters an error, the source member will be compiled using the system defaults, with all compile preprocessor directives ignored - this is the default that has been used in previous versions of the compile preprocessor. However, if byte 41 is set to a value of '1', an error in the compile preprocessor will cause the compilation to end immediately. This setting allows the user to immediately identify any problems with, for instance, invalid compile preprocessor directives.

Using the YBRTPXA data area to specify global pre- and post-compilation exit programs in this way allows users to perform automatic source manipulation (such as the addition of color to directives in the source) prior to compilation, without needing to specify a P* directive in every source member.