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
5
votes
5 answers

How does GO TO control flow work in COBOL?

PROCEDURE DIVISION MAINPARA DISPLAY "HELLO MAIN". GO TO PARA1. DISPLAY " SECOND DISPLAY". STOP RUN. PARA1. DISPLAY " I AM IN PARA1". PARA2. DISPLAY "I AM IN PARA2" .... PARA200 I have little understanding of the flow. But,…
Siddharth
  • 197
  • 1
  • 14
5
votes
5 answers

Sockets and COBOL

I have received a job at a hospital which still uses COBOL for all organizational work, the whole (now 20 Terabyte) database (Which was a homebrew in, guess what, COBOL) is filled with the data of every patient since the last 45 (or so) years. So…
kati
  • 51
  • 1
  • 2
5
votes
2 answers

Two-dimensional variable-length array in Cobol

How do you go about defining a two-dimensional MxN array in Cobol of which both M and N are of variable length? Here's the message I get in Net Express when attempting to have a variable array inside another: COBCH0144S OCCURS DEPENDING subsidiary…
James P.
  • 19,313
  • 27
  • 97
  • 155
5
votes
6 answers

Java and Cobol differences

Can anyone help comparing and contrasting between Java and cobol in terms of technical differences as well as architectural design styles
user246584
  • 99
  • 1
  • 3
  • 4
5
votes
2 answers

Allocation of Memory in Variable-Length Tables

Say I have the following variable-length table defined in WORKING-STORAGE... 01 SOAP-RECORD. 05 SOAP-INPUT PIC X(8) VALUE SPACES. 05 SOAP-STATUS PIC 9 VALUE…
Josh Stodola
  • 81,538
  • 47
  • 180
  • 227
5
votes
5 answers

Convert Cobol copybook to XSD

Does anyone know a tool to convert from Cobol Copybook to XSD? Or XML.
lemotdit
  • 448
  • 1
  • 10
  • 21
5
votes
2 answers

Nested Perform Loops in COBOL?

Why can I not do this nested perform loop in COBOL? If I put END-PERFORM. in any line sooner than where I have the last one just before EXIT PROGRAM - it works. But I need the program to display the INPUT C value every time. in the outer perform…
user99999991
  • 1,351
  • 3
  • 19
  • 43
5
votes
11 answers

Modernize Legacy Cobol

I am constantly reading about how much Cobol code is still in production. And the main reason that it hasn't been updated into am more modern language is that it would take too long/cost too much. My question is: If there was a tool that converted…
Kevin Hicks
  • 435
  • 2
  • 14
5
votes
4 answers

Concatenate string by its length COBOL

Need to concatenate 4 strings to a destination variable in cobol. Like, 01 WS-S1 X(10) VALUE "HI ". 01 WS-S2 X(10) VALUE "HOW ". 01 WS-S3 X(10) VALUE "ARE ". 01 WS-S4 X(10) VALUE "YOU?". to a resultant string "HI HOW ARE YOU?" Can anyone please…
Dinesh
  • 414
  • 1
  • 6
  • 13
5
votes
6 answers

When to use dots in COBOL?

I'm completely new to COBOL, and I'm wondering: There seems to be no difference between DISPLAY "foo" and DISPLAY "foo". What does the dot at the end of a line actually do? When should I use/avoid it?
Philip
  • 5,795
  • 3
  • 33
  • 68
5
votes
7 answers

Experience migrating legacy Cobol/PL1 to Java

ORIGINAL Q: I'm wondering if anyone has had experience of migrating a large Cobol/PL1 codebase to Java? How automated was the process and how maintainable was the output? How did the move from transactional to OO work out? Any lessons learned…
MadMurf
  • 2,247
  • 3
  • 23
  • 30
4
votes
4 answers

Reading a COBOL DAT file

I have been given a set of COBOL DAT, IDX and KEY files and I need to read the data in them and export it into Access, XLS, CSV, etc. I do not know the version, vendor of the COBOL code as I only have the windows executable that created the files. I…
Sudeep
  • 185
  • 1
  • 1
  • 8
4
votes
4 answers

COBOL Data Validation for capital letter?

I'm in my second quarter of college and taking "Advanced COBOL" we just received an assignment that requires us to code in some validation procedures for different data. I have everything done except on small validation procedure. There is a field…
Shane
  • 89
  • 2
  • 9
4
votes
3 answers

COBOL add 0 to a Variable in COMPUTE

I ran into a strange statement when working on a COBOL program from $WORK. We have a paragraph that is opening a cursor (from DB2), and the looping over it until it hits an EOT (in pseudo code): ... working storage ... 01 I …
bhamby
  • 15,112
  • 1
  • 45
  • 66
4
votes
3 answers

Windows GUI Programming with OpenCOBOL?

I'm completely new to COBOL, but I'd like to take a look at the different options for GUI programming on Windows. I don't really like Tcl/Tk, though. Is there some resource for developing a Windows GUI in COBOL in the same manner that one would…
David Brown
  • 35,411
  • 11
  • 83
  • 132