Skip to main content

Hi,

which compiler parameter is to use for a list of all linked subprograms when a main program is compiled?

Is it one of these Options?

Compiler Control - Listing

COPYEXT Copybook extensions
COPYLIST List copybooks
COPYLISTCOMMENT Specify the type of comment
DATAMAP List data items
DATE Date for listings
ERRLIST List source and error messages
FORM Page length
LINE-COUNT Controls detail of information at end of listing
LIST File for source listing
LISTPATH Specify the list-file path
LISTWIDTH Page width
MFCOMMENT Alternate-format comments
PREPLIST Preprocess debug list
PRINT File for source listing
RAWLIST Static list
REFNO Show Compiler version number in listings
RESEQ Generate line numbers
SEQCHK Check line numbers
SETTING Print directives
SHOW-DIR Print directives files
TIME Put time on listings
VERBOSE Compiler messages
XREF Produce cross-ref listing
ZEROSEQ Zeros in line numbers

 

Hi,

which compiler parameter is to use for a list of all linked subprograms when a main program is compiled?

Is it one of these Options?

Compiler Control - Listing

COPYEXT Copybook extensions
COPYLIST List copybooks
COPYLISTCOMMENT Specify the type of comment
DATAMAP List data items
DATE Date for listings
ERRLIST List source and error messages
FORM Page length
LINE-COUNT Controls detail of information at end of listing
LIST File for source listing
LISTPATH Specify the list-file path
LISTWIDTH Page width
MFCOMMENT Alternate-format comments
PREPLIST Preprocess debug list
PRINT File for source listing
RAWLIST Static list
REFNO Show Compiler version number in listings
RESEQ Generate line numbers
SEQCHK Check line numbers
SETTING Print directives
SHOW-DIR Print directives files
TIME Put time on listings
VERBOSE Compiler messages
XREF Produce cross-ref listing
ZEROSEQ Zeros in line numbers

 

Is this Net Express or Server Express?

I think that you might be looking to create a LINK MAP which is not controlled by a compiler directive but by passing the "-l" option to cbllink.

For Net Express:

This will create a link map with a list of all .obj modules and entry points that can be found within the linked .exe or .dll.

If you are using cbllink directly then just pass -l on the command line.

If you are compiling and linking within a project click on Project Properties->Build Settings-->Link tab-->Advanced and then add -l to additional cbllink settings.

Is this what you are looking for?

Thanks


Hi,

which compiler parameter is to use for a list of all linked subprograms when a main program is compiled?

Is it one of these Options?

Compiler Control - Listing

COPYEXT Copybook extensions
COPYLIST List copybooks
COPYLISTCOMMENT Specify the type of comment
DATAMAP List data items
DATE Date for listings
ERRLIST List source and error messages
FORM Page length
LINE-COUNT Controls detail of information at end of listing
LIST File for source listing
LISTPATH Specify the list-file path
LISTWIDTH Page width
MFCOMMENT Alternate-format comments
PREPLIST Preprocess debug list
PRINT File for source listing
RAWLIST Static list
REFNO Show Compiler version number in listings
RESEQ Generate line numbers
SEQCHK Check line numbers
SETTING Print directives
SHOW-DIR Print directives files
TIME Put time on listings
VERBOSE Compiler messages
XREF Produce cross-ref listing
ZEROSEQ Zeros in line numbers

 

I try the option "I", but it doesn't help:

cob64 -cgxPI ${PROG}.cbl

There are subrpograms called, but there are no subprograms listed.

Regards, Michael


Hi,

which compiler parameter is to use for a list of all linked subprograms when a main program is compiled?

Is it one of these Options?

Compiler Control - Listing

COPYEXT Copybook extensions
COPYLIST List copybooks
COPYLISTCOMMENT Specify the type of comment
DATAMAP List data items
DATE Date for listings
ERRLIST List source and error messages
FORM Page length
LINE-COUNT Controls detail of information at end of listing
LIST File for source listing
LISTPATH Specify the list-file path
LISTWIDTH Page width
MFCOMMENT Alternate-format comments
PREPLIST Preprocess debug list
PRINT File for source listing
RAWLIST Static list
REFNO Show Compiler version number in listings
RESEQ Generate line numbers
SEQCHK Check line numbers
SETTING Print directives
SHOW-DIR Print directives files
TIME Put time on listings
VERBOSE Compiler messages
XREF Produce cross-ref listing
ZEROSEQ Zeros in line numbers

 

I try the option "I", but it doesn't help:

cob64 -cgxPI ${PROG}.cbl

There are subrpograms called, but there are no subprograms listed.

Regards, Michael


Hi,

which compiler parameter is to use for a list of all linked subprograms when a main program is compiled?

Is it one of these Options?

Compiler Control - Listing

COPYEXT Copybook extensions
COPYLIST List copybooks
COPYLISTCOMMENT Specify the type of comment
DATAMAP List data items
DATE Date for listings
ERRLIST List source and error messages
FORM Page length
LINE-COUNT Controls detail of information at end of listing
LIST File for source listing
LISTPATH Specify the list-file path
LISTWIDTH Page width
MFCOMMENT Alternate-format comments
PREPLIST Preprocess debug list
PRINT File for source listing
RAWLIST Static list
REFNO Show Compiler version number in listings
RESEQ Generate line numbers
SEQCHK Check line numbers
SETTING Print directives
SHOW-DIR Print directives files
TIME Put time on listings
VERBOSE Compiler messages
XREF Produce cross-ref listing
ZEROSEQ Zeros in line numbers

 

Oh, we are using Server Express 5.1.


Hi,

which compiler parameter is to use for a list of all linked subprograms when a main program is compiled?

Is it one of these Options?

Compiler Control - Listing

COPYEXT Copybook extensions
COPYLIST List copybooks
COPYLISTCOMMENT Specify the type of comment
DATAMAP List data items
DATE Date for listings
ERRLIST List source and error messages
FORM Page length
LINE-COUNT Controls detail of information at end of listing
LIST File for source listing
LISTPATH Specify the list-file path
LISTWIDTH Page width
MFCOMMENT Alternate-format comments
PREPLIST Preprocess debug list
PRINT File for source listing
RAWLIST Static list
REFNO Show Compiler version number in listings
RESEQ Generate line numbers
SEQCHK Check line numbers
SETTING Print directives
SHOW-DIR Print directives files
TIME Put time on listings
VERBOSE Compiler messages
XREF Produce cross-ref listing
ZEROSEQ Zeros in line numbers

 

Hello Michael:

Try compiling with the -v and -D options added to the "cob -x" command line, for example:

  cob -gxP -v -D ${PROG}.cbl

The "v" means "verbose" and the "D" means "Debug".  This tells the "cob" command to become more verbose, and to reveal the steps it is taking behind the scenes when it links modules into an executable.  Among other things, you will be able to see the two separate invocations of the system linker "ld" with their arguments.

Within this verbose output there is a section where it says:

Entry points defined in module:

The "cob" command looks inside each module being linked into the executable (including each COBOL program or library of COBOL programs) and extracts a list of the entry points.  From this output "Entry points defined in module:" you can deduce a list of all linked programs.

A couple things, though:

1) In your example command line:

cob64 -cgxPI ${PROG}.cbl

You've specified both -c and -x.  These are mutually exclusive; the -c is ignored in this case.

2) Don't invoke "cob64".  Instead just invoke "cob" and let it decide (based on the cobmode) whether to invoke "cob64" or "cob32".  See this knowledgebase article:

community.microfocus.com/.../20028.enter-cob32-or-cob64-when-compiling.aspx

3) Your example command line specifies only one module to participate in the link, so you will see only this module in the "Entry points defined in module:" output.  There are no "linked subprograms" in your example.  This makes me wonder you mean, when you ask for the "list of all linked subprograms when a main program is compiled".  It is common for COBOL subprograms to be compiled to .int or .gnt, so they will be dynamically loaded at runtime, as opposed to being linked in when the main program is compiled.  Let me know if you'd like more clarification on the difference between dynamic loading at runtime versus being linked into an executable at compile time.