Questions tagged [cobol]

COBOL (COmmon Business Oriented Language) was the product of a US Department of Defense initiative to develop a standard and portable programming language for business applications. COBOL celebrated its 50th birthday in 2009. It is generally believed that new COBOL development is in decline but new ISO/IEC COBOL standards still evolve and a commercial commitment remains to keep the language relevant in today’s computing landscape.

COBOL (COmmon Business Oriented Language) was the product of a US Department of Defense initiative to develop a standard and portable programming language for business applications. COBOL celebrated its 50th birthday in 2009. It is generally believed that new COBOL development is in decline but a commercial commitment remains to keep the language relevant in today’s computing landscape.

Standards

The official COBOL standard is very slow to evolve due to a strong desire to keep the language relevant without compromising core strengths such as execution efficiency, interoperability with other languages and backward compatibility with earlier versions of the language.

The current COBOL ISO/IEC standard is ISO/IEC 1985:2014 Information technology -- Programming languages -- COBOL. ISO/IEC published a standard for 1985, 2002, 2014 and works on 2022.

Vendors of course continue to issue new releases of their COBOL compilers with unique non-standard features from time to time. As a consequence, COBOL dialects vary more than one might expect given the availability of standards.

Sources

There are several COBOL centered web sites where you can obtain further information:

Lightweight Editors with COBOL syntax highlighting

Various COBOL language code editor plugin are available:

1698 questions
4
votes
9 answers

Which language would you port COBOL programs to and why?

When selecting a language to port COBOL programs from what language would you chose and why? I am not looking for the answer "because I am familiar with language X". I am looking for features in a language that map well to COBOL's design. Update:…
ojblass
  • 21,146
  • 22
  • 83
  • 132
4
votes
1 answer

How do I setup a git project for COBOL on z/OS?

I have a git project that contains mostly z/OS COBOL source code. When I clone it onto my z/OS system using: git clone myproject I noticed that all of the cloned files are in ASCII (ISO8859-1). Is there a way to keep the working tree in EBCDIC 1047…
4
votes
2 answers

What is the use of the EXIT keyword?

I've seen many COBOL programs contain sections with at the end XX-99. EXIT. Many times that paragraph is used to exit the section, for instance with GO TO XX-99. I have read that EXIT is a no-operation, as it doesn't do anything. But the same…
MC Emperor
  • 22,334
  • 15
  • 80
  • 130
4
votes
3 answers

A generic process to convert a file to display format

Is there a generic process to convert a file on z/OS to display format? I have a couple hundred files on z/OS I need to convert to Display format before they are NDM to the midrange/Linux. These files contain compressed fields. I'm doing this…
tbtcust
  • 65
  • 6
4
votes
2 answers

What does Cobol file status 9Â mean?

My issue is when I try to open on input a huge file (6GB) , there's a message that says: cobol file status code 9Â I compiled the program and it has no errors, but when I try to run it, I use a small one (3 GB for example) my program work…
4
votes
2 answers

Iterating Systems.Collections.List in Fujitsu COBOL

How do I loop through a collection? I'm on a trial version of Fujitsu/Alchemy compiler, and getting slow and poor support from the vendor. I basically want to pass a List from C# to COBOL, and then let the COBOL use it and potentially update it. In…
NealWalters
  • 17,197
  • 42
  • 141
  • 251
4
votes
4 answers

Command Wait in COBOL?

Is there a kind of "Wait" function in COBOL? I wrote a calculator, and to make it more 50s, i Print " Computing." "Computing.." ecc For example: DISPLAY "SECONDO NUMERO" ACCEPT B COMPUTE C= A…
aIDserse
  • 131
  • 8
4
votes
1 answer

Identifying program calling sub-module in COBOL

Say I have a COBOL-module, X, which is called by another program, Y. How do I identify the name of Y within X? I could of course pass this in the linkage section to each sub-module, but I'd rather rely on a more programmatic way of dealing with…
Anton
  • 139
  • 8
4
votes
1 answer

Using reserved cobol names in xml output

I am working on a project where I will read an xml file from disk that a cobol mainframe system has created. I want a specific naming struture in this xml file like this: ...
4
votes
4 answers

COBOL Question - UNICODE

We are currently looking to convert our legacy COBOL code from ANSII to UNICODE however we have come across a problem where just changing the PIC X fields to PIC N and setting NSYMBOL(NATIONAL) will cause problems when data structures contain a…
bottomline
  • 71
  • 1
  • 5
4
votes
2 answers

IBM i Determine Available Programming Languages

I've read time and time again that IBM i is a modern system supporting many programming languages. How do I determine which ones are available to me besides COBOL and RPG? A laundry list is given on Wikipedia, and I'd be interested especially in C,…
4
votes
1 answer

How to validate Picture clause in C#?

I am using EDI.Net nuget package. In their Readme.md file, they are talking about "The Picture clause": The Picture Clause is taken from COBOL laguage and the way it handles expressing numeric and alphanumric data types. My model looks like…
ˈvɔlə
  • 9,204
  • 10
  • 63
  • 89
4
votes
3 answers

Different Background color for columns of COBOL source

I am looking for a way to "downlight" columns in Notepad++. the COBOL compiler ignores the first 6 columns and all characters starting from column 73 (to column 80, 81+ is ignored anyway). The seventh character has a special meaning (comment,debug,…
user66899
  • 536
  • 5
  • 8
4
votes
1 answer

How can I count the total records in a file while only displaying some?

I'm using Visual Cobol to create a program that reads a file, has the user input criteria, and only displays the records in the file that meet the user's criteria. I need to display the number of records that meet the criteria, which I have done…
Loonette
  • 47
  • 3
4
votes
5 answers

Close a Transaction CICS

I have a short program COBOL CICS, it's a basic CRUD. In this program I have an options, when I press F12 I want to exit, close my transaction. I want to press F12 and the transaction close. Can I write any command to do that in my COBOL program?…
IanPoli
  • 99
  • 8