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
0
votes
1 answer

Customize CSV Column Header

I am writing a program in COBOL that reads data from table and dumps it into a CSV file. My work definitions columns are defined as (for instance) FACILITYCODE. Below is the detail of of column: Working Storage : WS-FACILITYCODE PIC X(04) VALUE…
Shaji
  • 741
  • 2
  • 9
  • 23
0
votes
4 answers

How to make one string out of three variables?

I want to make three fields into one field with only a single space between each word in Cobol. I this the correct format below STRING SORT-WORKER-LAST SPACE SORT-WORKER-FIRST SPACE SORT-WORKER-MID SPACE …
Doug Hauf
  • 3,025
  • 8
  • 46
  • 70
0
votes
3 answers

How get one record in DB2 using cics and cobol program

I have a table called room_table room_no room_status room_type -------|-----------|---------- 1001 | A |single 1002 | A |single 1003 | B |single I am using following code in CICS COBOL program but I am getting SQL…
karthi
  • 1,059
  • 3
  • 10
  • 21
0
votes
1 answer

How to specify default file extension for Oracle's Pro*COBOL precompiler

Is it possible to configure the default file extension that Oracle's Pro*COBOL precompiler assumes for EXEC SQL INCLUDE filename END-EXEC statements in which there is no filename specified for the include file? The docs seem specify that in this…
Gio
  • 1,812
  • 2
  • 15
  • 15
0
votes
1 answer

ASP.NET with AcuXDBC problems

We are currently running an ASP.NET MVC site that connects to a COBOL database through ACUGT. We are using ACUXDBC 8.01 drivers. The machine with the ASP.NET site is on a machine that has Windows Server Standard 2008 with SP2, IIS 7, 4 GB of…
Alex Albu
  • 693
  • 1
  • 12
  • 20
0
votes
2 answers

COBOL variable table size

When I need to load a variable number of records into a table, I generally use one of three approaches: Guess a maximum size for the table ("MAX-TABLE-SIZE"). Make the table OCCUR 1 TO MAX-TABLE-SIZE TIMES DEPENDING ON INPUT-FILE-RECORD-COUNT. …
0
votes
2 answers

Cobol connect to oracle failed when password field is defined longer than real password value

My COBOL program cannot connect to oracle when the password field is defined longer than actual password length for a user. i.e, if the password value is 'mypasswd', the host variable to keep password must be defined with "PIC X(8)", otherwise,…
HiHui
  • 45
  • 2
  • 11
0
votes
3 answers

COBOL move numeric edited field to another numeric edited field

I have following fields: FLD1 PIC ---.--9,99. FLD2 PIC ---.--9,99. FLD3 PIC S9(6)V99. MOVE FLD1 TO FLD2 --> 4038 abend MOVE FLD1 TO FLD3 --> 4038 abend When I move FLD1 to FLD2 I get a 4038 abend so I tried to move FLD1 to FLD3 first…
Joren Willems
  • 167
  • 1
  • 6
  • 12
0
votes
1 answer

Need to see if I can use my read statements to accomplish 3 types of output?

I have been asked to write program to process 2 input files (customer and employee), matching the keys of both files and producing the following 3 output files: File-1: records that are on both files File-2: records that are on the customer file…
user3491862
  • 384
  • 1
  • 3
  • 13
0
votes
1 answer

Why are my file definitions not working?

I am trying to figure out why my file definitions are incorrect. From what I can tell this is the same way that they were defined in my last program and all will be fixed block records Code: FILE-CONTROL. …
user3491862
  • 384
  • 1
  • 3
  • 13
0
votes
4 answers

Adding a field to an existing COBOL data file

I have an existing MF COBOL 4.0 program with years of data in a ISAM file but I need to add a new field to the existing file. The record currently has 1208 chars and I need to add another 10 to it. If I simply put the extra PIC X(10) field in my…
0
votes
1 answer

How does S9(9) interpret a left aligned numeric value?

Suppose I have a PS input file that contains 9-byte long data. The input data would be numbers that are necessarily left aligned. Hence, in case the number in the input file is smaller than 9 bytes, the number would be trailed by spaces. When I read…
ikartik90
  • 2,695
  • 6
  • 26
  • 38
0
votes
2 answers

Allocation of memory with LE routines

At Allocation of Memory in Variable-Length Tables NealB mentioned LE routines to allocate/deallocate memory in a non-CICS COBOL program. I'd very much like to know how this is done: how the LE routine is called. (I'm familiar with the LINKAGE…
HaWe
  • 1
  • 1
  • 1
0
votes
1 answer

How do i send an email via smtp from my COBOL program

Hi I am total beginner in cobol and need help in compiling this sendmail program. I need to send a mail to SMTP domain using COBOL program on OpenVMS. Can you please help me to fix this compilation error? COBOl Program identification…
0
votes
2 answers

Which is better in terms of performance? "if else" or "Evaluate" statement in COBOL?

Which is better in terms of performance ? "if else" or "evaluate" statement in COBOL, when we have lesser conditons to check ?
Muthukumar
  • 8,679
  • 17
  • 61
  • 86
1 2 3
99
100