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 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.

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 variants 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:

1477 questions
15
votes
2 answers

Converting EBCDIC to ASCII in java

I am supposed to convert an EBCDIC file to ASCII by using Java. So far I have this code: public class Migration { InputStreamReader reader; StringBuilder builder; public Migration(){ try { reader = new…
Robin-Hoodie
  • 4,519
  • 4
  • 22
  • 56
14
votes
3 answers

Need help with my COBOL homework

Sorry to bother you all but I am stuck on my homework for COBOL. I've made two attempts, neither of which is working as expected. The two attempts and their output are shown below followed by the final results it needs to be. I thank you all for…
Kimmy1235
  • 879
  • 2
  • 13
  • 24
14
votes
2 answers

How to run cobc without an input source file, but via a pipe?

Is it possible to execute COBOL code without providing input files? I'm using cobc. I tried to pipe the code to the cobc process: $ cat my-input.cbl | cobc cobc: No input files To compile a file and run it, I do: cobc -x di.cbl -o a &&…
Ionică Bizău
  • 93,552
  • 74
  • 254
  • 426
14
votes
6 answers

Cobol: science and fiction

There are a few threads about the relevance of the Cobol programming language on this forum, e.g. this thread links to a collection of them. What I am interested in here is a frequently repeated claim based on a study by Gartner from 1997: that…
user8472
  • 3,001
  • 3
  • 30
  • 58
13
votes
1 answer

Why does COBOL have to be indented?

Why does COBOL have to be indented, as in, have additional spacing in each sourcefile? Consider this code (note the additional whitespace): IDENTIFICATION DIVISION. PROGRAM-ID. HELLO-WORLD. PROCEDURE DIVISION. DISPLAY 'Hello, world'. …
hiobs
  • 566
  • 1
  • 5
  • 19
12
votes
3 answers

Unprintable integer pointer returned to GNU COBOL from C library

I am learning COBOL just for the fun of it and now want to call C functions from my COBOL source (using GnuCOBOL). I can call C functions just fine, however I have a small problem with a function of mine that looks like this: (It just wraps another…
Deps
  • 123
  • 5
12
votes
10 answers

Does it make sense to study COBOL?

I have had a talk with a friend of mine about the relative vulnerability of different types of IT workers to unexpected unemployment (e.g. layoffs, company going out of business, obsolete skills etc.) as it seems COBOL developers (or…
Alon
  • 4,798
  • 17
  • 27
11
votes
4 answers

In Cobol, to test "null or empty" we use "NOT = SPACE [ AND/OR ] LOW-VALUE" ? Which is it?

I am now working in mainframe, in some modules, to test Not null or Empty we see : NOT = SPACE OR LOW-VALUE The chief says that we should do : NOT = SPACE AND LOW-VALUE Which one is it ? Thanks!
Tom
  • 924
  • 1
  • 16
  • 31
11
votes
2 answers

Dynamically Reading COBOL Redefines with C#

I'm making a C# program that will be able to dynamically read an IBM HOST Copybook written in COBOL and generate an SQL table off of it. Once the table is generated I can upload a file into my program and it will read, convert from IMB-37 and insert…
Daniel Dennis
  • 113
  • 1
  • 8
11
votes
2 answers

Japanese COBOL Code: rules for G literals and identifiers?

We are processing IBMEnterprise Japanese COBOL source code. The rules that describe exactly what is allowed in G type literals, and what are allowed for identifiers are unclear. The IBM manual indicates that a G'....' literal must have a SHIFT-OUT…
Ira Baxter
  • 88,629
  • 18
  • 158
  • 311
10
votes
3 answers

What are the advantages of pseudo conversational vs conversational CICS programming?

I am trying to understand the differences between pseudo conversational and conversational CICS programming. What are the advantages and disadvantages of each approach?
Richards Marian
  • 121
  • 1
  • 4
10
votes
2 answers

COBOL - Differing answer from mainframe to PC for same COMPUTE

I have this very simple dummy COBOL program which does a dummy COMPUTE and displays the result. ID DIVISION. PROGRAM-ID. DUMMYPGM. DATA DIVISION. WORKING-STORAGE SECTION. 01 NUM-A PIC 9(3) VALUE 399. 01 NUM-B PIC 9(3) VALUE 211. …
Gael L
  • 223
  • 1
  • 11
10
votes
1 answer

Error with gmp when compiling helloworl in COBOL

I want to run this hello world program, in COBOL : Identification Division. program-id. HelloWorld. Procedure Division. Display 'Bonjour '. Display 'Comment allez vous ? ' . goback. But, I have this error : In file included from…
Stalyon
  • 468
  • 4
  • 20
10
votes
7 answers

The unmentioned parts of COBOL's history

I'm very curious about old programming languages, especially COBOL, and as Wikipedia couldn't really tell me much about this topic, I decided to ask it here: Was COBOL the first programming language really being used in financial, stock and banking…
10
votes
5 answers

What's this language?

A former co-worker left us with thousands of lines of code looking like this. This is more a curiosity, since I rewrote everything he did in less obscure languages :-) Nevertheless I'm curious. Is this meta-code or an actual language? DATA…
Federico Giorgi
  • 9,409
  • 9
  • 38
  • 50
1
2
3
98 99