Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Austin1 Honored Contributor.
Honored Contributor.
391 views

Are Mixed Source Formats Possible

Jump to solution

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

0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

RE: Are Mixed Source Formats Possible

Jump to solution
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.
...
2 Replies
Micro Focus Expert
Micro Focus Expert

RE: Are Mixed Source Formats Possible

Jump to solution
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.
...
Highlighted
Austin1 Honored Contributor.
Honored Contributor.

RE: Are Mixed Source Formats Possible

Jump to solution
That works !!!
Thanks, Chris !!!
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.