Answer:
With versions prior to 2009, the only way to compile in this type of situation is to add the appropriate SOURCE FORMAT compiler directive to the top of each file from the following list:
>>SOURCE FORMAT FIXED
>>SOURCE FORMAT FREE
>>SOURCE FORMAT TERMINAL
If you need to change a lot of copy files, you can request the ISCOPIES utility from Veryant.
With isCOBOL Compiler versions 2009 and later, you can compile with -smat
to specify that you have mixed ANSI and TERMINAL source formats.
The rules that the compiler uses to determine the source format are as follows:
With isCOBOL 2008 SP1 and earlier, the compiler looks at the character in the 7th column of the first not empty line. If this character is a valid indicator (*,$,/) or a blank, then the source file is assumed to be in FIXED (aka ANSI) format, otherwise it is assumed to be in FREE format. The format is assumed to be the same for the source file and all copy files included in it.
With isCOBOL 2009 and later, a new rule has been added. If the first character of the first not empty line is a valid indicator, not including the case of "*>", then the source file is assumed to be in TERMINAL format.
As result, a valid comment on the first line establishes the format in a portable way.
The -smat
option has two effects:
1) If the file is not in FIXED (aka ANSI) format then the file is in TERMINAL format
2) The analysis is repeated again for each copy file