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
10
votes
2 answers

Problem with COBOL move to comp-3 variable

I'm having the following problem in a COBOL program running on OpenVMS. I have the following variable declaration: 01 STRUCT-1. 02 FIELD-A PIC S9(6) COMP-3. 02 FIELD-B PIC S9(8) COMP-3. 01 STRUCT-2. …
mmutilva
  • 18,688
  • 22
  • 59
  • 82
10
votes
2 answers

Setting up COBOL Compiler under Mac OS?

In my university, we're being taught COBOL, and I'm trying to get a head start and learn COBOL, C++, and Java before I get into the classes next year. Problem is; COBOL is so old, it's hard to grab support for it in mac (my laptop is a mac). I…
jonathan todd
9
votes
6 answers

Is there a static analysis tool for Python, Ruby, Sql, Cobol, Perl, and PL/SQL?

I am looking for a static analysis tool for Python, Ruby, Sql, Cobol, Perl, PL/SQL, SQL similar to find bugs and check style. I am looking for calculating the line count, identify bugs during the development, and enforcing coding standard.
user118030
9
votes
16 answers

What's the bright side of Cobol?

I love spending my time investigating cool features of languages, even if I won't have a chance to use them anytime soon, but keep hearing only bad things about Cobol, but I'm sure it must of had some nice features for it to become as important as…
Robert Gould
  • 68,773
  • 61
  • 187
  • 272
9
votes
2 answers

GnuCOBOL failing to find dynamic symbols, only on recent Ubuntu

Something changed recently, I think. GnuCOBOL relies on dynamic linking, symbols looked up with dlsym at run-time. This CALL run-time support code has been in OpenCOBOL for some 7 years now. It no longer works on Ubuntu 14.04, but does under…
Brian Tiffin
  • 3,978
  • 1
  • 24
  • 34
9
votes
5 answers

How does COBOL store and retrieve data?

I'm starting to learn about COBOL. I have some experience writing programs that deal with SQL databases and I guess I'm confused how COBOL stores and retrieves data that is stored in a mainframe for example. I know that it's not like relational…
Matt Phillips
  • 11,249
  • 10
  • 46
  • 71
9
votes
5 answers

What is it about COBOL and its performance that makes it (compared to its age) so quick?

Reading through some of the questions here, the general concensus seems to be that there to continues to be an enourmous amount of COBOL code "out there", not just because it's a nightmare to refactor or re-code, but simply because for a certain…
davek
  • 22,499
  • 9
  • 75
  • 95
8
votes
1 answer

Move record from Oracle array to Cobol occurs

How can I move a record from oracle to a Cobol array? When I move a single field, everything works as expected. When I try to move a record in an Oracle VARRAY I cannot get it to work. The PRO*COBOL precompiler gives the following error…
8
votes
3 answers

compute rounded in cobol

I am confused with the rounded in the compute function in cobol. Declaration: VAR-A PIC S9(9)V99 COMP-3. VAR-B PIC S9(9)V9(6) COMP-3. Procedure. MOVE +12.08 TO VAR-A. MOVE +6.181657 TO VAR-B. COMPUTE VAR-A ROUNDED = VAR-A +…
Grekoz
  • 275
  • 1
  • 6
  • 14
8
votes
3 answers

What is the logic behind COBOL paragraph numbering?

I've seen the following paragraph naming structure lots of times: nnnn-PARAGRAPH-NAME. Where nnnn stands for a 4 digit number. Here is a complete example: 0000-MAINLINE. PERFORM 1000-INITIALIZE-THE-PROGRAM. PERFORM…
mllamazares
  • 7,876
  • 17
  • 61
  • 89
8
votes
5 answers

A Strange Error (COBOL)

Hey all, got one mountain of a problem here. I have completed a program I had to do for college homework, but when I run it the output shows almost nothing it is suppose to. This only happens when I RUN it though. If I hold F11 to STEP through the…
Kimmy1235
  • 919
  • 2
  • 14
  • 24
8
votes
3 answers

Reading a Cobol generated file

I’m currently on the task of writing a c# application, which is going sit between two existing apps. All I know about the second application is that it processes files generated by the first one. The first application is written in Cobol. Steps: 1)…
Rauland
  • 2,944
  • 5
  • 34
  • 44
8
votes
7 answers

Cobol technical demonstration

I'm working as a COBOL programmer - have a 6 months work experience - for a consulting firm . Today, with the rest the COBOL "department", I had a meeting with the new director of my company. After an initial analysis made by the new team in charge,…
John Smith
  • 89
  • 2
8
votes
1 answer

Function ord works only sometimes but sometimes not

I am trying to programm some kind of Caesar Cipher in Cobol. But somehow I get the following compile error: Numeric function "INTEGER FUNCTION ORD" was not allowed in this context. This error gets fired here (both lines) 000048 …
inetphantom
  • 2,498
  • 4
  • 38
  • 61
8
votes
4 answers

how to format a number to S9(5)V99 ascii in .net

I've been searching for s9(5)v99 but got different information and not really clear. Could someone shows how or the formula to convert. thanks
user392973
  • 81
  • 1
  • 1
  • 2