Skip to main content

COBOL Listings and Conventions

  • July 6, 2023
  • 2 replies
  • 0 views

Dominique Sacre
Forum|alt.badge.img+2

I'm an ole school programmer getting back into COBOL programming (for fun, not profit) currently using Visual COBOL in VS2022 to produce an application with character-based screens (i.e., screen section) and I have a couple of questions:

  1. How can I print a program listing? Ages ago on the mainframe I would print listings showing the assembler code. Is this even possible in my configuration?

  2. What are the prevailing COBOL coding conventions? If this question is likely to trigger a war of conventions, please ignore it and I'll make up my own.


#standards
#Listings
#VisualCOBOL

2 replies

Michael Bleistein
Forum|alt.badge.img+1

I'm an ole school programmer getting back into COBOL programming (for fun, not profit) currently using Visual COBOL in VS2022 to produce an application with character-based screens (i.e., screen section) and I have a couple of questions:

  1. How can I print a program listing? Ages ago on the mainframe I would print listings showing the assembler code. Is this even possible in my configuration?

  2. What are the prevailing COBOL coding conventions? If this question is likely to trigger a war of conventions, please ignore it and I'll make up my own.


#standards
#Listings
#VisualCOBOL

1. Here is the documentation for everything you want to know about listings. These can be set in the project properties or on a program by program basis:

Compiler Control - Listing (microfocus.com)

2. Writing structured, efficient, and reusable code that performs well should be a good start 🙂

p.s. checkout sourceformat"variable" compiler directive. Using all upper case frowned upon

Some things to know:

COBOL - Commonly Overlooked But Outstanding Language

You don't have to take the B for Business out of COBOL for it to be COOL

Welcome Back and Good Luck!


Dominique Sacre
Forum|alt.badge.img+2

1. Here is the documentation for everything you want to know about listings. These can be set in the project properties or on a program by program basis:

Compiler Control - Listing (microfocus.com)

2. Writing structured, efficient, and reusable code that performs well should be a good start 🙂

p.s. checkout sourceformat"variable" compiler directive. Using all upper case frowned upon

Some things to know:

COBOL - Commonly Overlooked But Outstanding Language

You don't have to take the B for Business out of COBOL for it to be COOL

Welcome Back and Good Luck!

Thanks for the compiler controls and the tip. I generally try to shy away from all caps but that’s what I’ve seen lately. I’m more of a mixed-case kind of guy so I may just go with that.