Skip to main content

Visual Studio 2013

Visual COBOL 2.2

Is it possible to have a managed project where the COBOL program has Variable source format (as defined in the project properties) but with the copy books referenced by the program having themselves a Fixed source format?  I would envision the inclusion of a $SET statement immediately preceding the COPY statement and then another $SET statement immediately following the COPY statement.  Does such a $SET statement exist?

Thanks,

Austin

Visual Studio 2013

Visual COBOL 2.2

Is it possible to have a managed project where the COBOL program has Variable source format (as defined in the project properties) but with the copy books referenced by the program having themselves a Fixed source format?  I would envision the inclusion of a $SET statement immediately preceding the COPY statement and then another $SET statement immediately following the COPY statement.  Does such a $SET statement exist?

Thanks,

Austin

Hi Austin,


Yes, you can change the source format within a COBOL program by using the $SET SOURCEFORMAT directive.


$SET SOURCEFORMAT"VARIABLE"
ID DIVISION.
PROGRAM-ID. TESTPROG.
...
…

$SET SOURCEFORMAT"FIXED"

COPY "mycopy".


$SET SOURCEFORMAT"VARIABLE"

01 my-data pic x.
...

Visual Studio 2013

Visual COBOL 2.2

Is it possible to have a managed project where the COBOL program has Variable source format (as defined in the project properties) but with the copy books referenced by the program having themselves a Fixed source format?  I would envision the inclusion of a $SET statement immediately preceding the COPY statement and then another $SET statement immediately following the COPY statement.  Does such a $SET statement exist?

Thanks,

Austin

That works !!!
Thanks, Chris !!!