Forcing Compilation of ANSI or Terminal Format Files

When specified with a compiler directive, the -Sa and -St options override the -Sa or -St option specified on the command line within the scope of the containing file.

In some instances, due to source origin issues, developers may choose to enforce compilation of a single source format by specifying either the -Sa (ANSI) or "-St" (terminal) compiler option in the command line. Without the use of a compiler directive, the Compiler will not compile source files of another format within the same compilation unit. (In prior releases this was particularly problematic for terminal format compilation (-St) when axdefgen had been used to create COPY files for ActiveX components, because axdefgen creates ANSI format COPY files. axdefgen now automatically inserts a compiler directive in the first line of all COPY files it creates.)

When the -Sa or -St option is specified in a compiler directive on the first line of the source file, the compiler compiles that source file regardless of the format option specified on the command line. Compilation of that format applies to only the file containing the directive.

For example, when the -St (terminal format) option is specified on the command line and you want to compile an ANSI format COBOL source file in the same compilation unit, place the following compiler directive in column 7 of the first line of the COBOL file:

>>IMP(ACU-CBLFLAGS=-Sa)