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
3 answers

What is the scope of COBOL

How is COBOL's scope defined? Is it statically scoped?
NexAddo
  • 752
  • 1
  • 18
  • 37
5
votes
1 answer

PostgreSQL Cursor Re-open error in GnuCOBOL

I am trying to move from Oracle to PostgreSQL on GnuCOBOL. I have a piece of code which uses cursors and need opening a cursor multiple times. However when trying to open the cursor again I get the error ERROR: cursor "fetchtbl_c1" already exists …
Ankit Jain
  • 314
  • 3
  • 10
5
votes
4 answers

Displaying COBOL binary as numeric

I'm entirely new to COBOL. I have a small COBOL program and a small C file. According to this article: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.ceea400/sdtpt.htm the equivalent of a C signed integer in COBOL is…
Helena
  • 1,041
  • 2
  • 12
  • 24
5
votes
2 answers

How do you generate java~jrecord code for a Cobol copybook

How do you use the RecordEditor to Generate Java~JRecord code from a Cobol Copybook to read/write a Binary EBCDIC Mainframe File. This a Question and answer to try an prevent some poor/misleading questions being asked or the answer can be pointed…
Bruce Martin
  • 10,358
  • 1
  • 27
  • 38
5
votes
3 answers

How to convert unpacked decimal back to COMP-3?

I had asked a question about converting COMP fields, for which I did not get any answer. I hope stack-overflow can help me on this question. I succeeded in converting COMP-3 to decimal. I need your help in converting the unpacked decimal back to…
Krishna Kumar N
  • 137
  • 2
  • 13
5
votes
1 answer

C -> COBOL interlanguage communication on mainframe

A vendor package written in C on the mainframe offers the option to override a portion of it's functionality via a user exit. The provided C function prototype is: extern int SomeExit (void * Parameters, void * Record1, …
5
votes
3 answers

How do I prevent internal table overflow in COBOL?

This is probably a rookie question, but I still have a hard time working out how to use tables in COBOL. Currently I'm writing a simple module that can be called by other programs. My program has to search an internal table for data and if not…
Lena
  • 147
  • 1
  • 5
  • 15
5
votes
6 answers

migrate COBOL code

I have a task to convert COBOL code to .NET. Are there any converters available? I am trying to understand COBOL code in high level. I have a trouble understanding the COBOL code. Is there any flowchart generators? I appreciate any help. Thank you..
nav100
  • 1,437
  • 3
  • 13
  • 15
5
votes
3 answers

Cobol String Delimited By Trailing SPACES

WORKING-STORAGE. FIRST-STRING PIC X(15) VALUE SPACES. SECOND-STRING PIC X(15) VALUE SPACES. OUTPUT-STRING PIC X(31) VALUE SPACES. If FIRST-NAME = 'JON SNOW, ' and LAST-NAME = 'KNOWS NOTHING. ', how can I get: I want to…
raz_user
  • 127
  • 1
  • 1
  • 9
5
votes
5 answers

How to abend job intentionally

Is it possible to abend your job intentionally through COBOL program. suppose I have an Input file having Header,Detail and Trailer records. I will write a COBOL pgm which reads this file.If no Detail records are found in this file then I want to…
Manasi
  • 717
  • 8
  • 18
  • 30
5
votes
1 answer

Java mapping for COBOL comp and comp-3 fields

I am invoking DB2 stored procedure created using COBOL from my java application. input macro (type varchar): 01 SP1-INPUTS. 05 FIELD-1 PIC X(03). 05 FIELD-2 PIC S9(09) COMP. 05 FIELD-3 PIC S9(15)V9(02) COMP-3. 05…
Sridhar
  • 1,832
  • 3
  • 23
  • 44
5
votes
1 answer

File status 23 on READ after START

My question is pertaining to a file status 23, which according to MicroFocus means that upon my attempt to READ from a .DAT file: "Indicates no record found." or "Indicates a duplicate key condition. Attempt has been made to store a record…
Webs
  • 53
  • 1
  • 7
5
votes
3 answers

In COBOL, is it possible to recursively call a paragraph?

In COBOL for an IBM Mainframe is it possible to call a paragraph recursively? 200-PARAGRAPH SECTION. IF WS-COUNTER < 10 ADD 1 TO WS-COUNTER PERFORM 200-PARAGRAPH ELSE DISPLAY 'I'M DONE' END-IF. 200-EXIT. …
zurbergram
  • 421
  • 6
  • 20
5
votes
5 answers

Visual Studio 2010: COBOL in VS 2010, missing?

Is it true that Visual Studio 2010 has now COBOL compiler inside? I saw this in one article. I also saw a video of it. The question is, where can I find it? I've been searching VS2010 and still, no clues. Thanks for answering.
abramlimpin
  • 5,027
  • 11
  • 58
  • 97
5
votes
7 answers

Parser for signed overpunch values?

I am working with some old data imports and came across a bunch of data from an external source that reports financial numbers with a signed overpunch. I've seen alot, but this is before my time. Before I go about creating a function to parse…
Slider345
  • 4,558
  • 7
  • 39
  • 47