Skip to main content
Filter by
Sorted by
Tagged with
41 votes
4 answers
51k views

Issues with ANDs and ORs (COBOL)

I can't seem to get this one part right. I was given a input file with a bunch of names, some of which I need to skip, with extra information on each one. I was trying use ANDs and ORs to skip over ...
Kimmy1235's user avatar
  • 919
33 votes
11 answers
25k views

Why is COBOL still a preferred language in the business world? [closed]

Even though we have languages like C++, Java, Python, etc., why is COBOL still a preferred language in the business world? Why was it so popular?
Prasoon Saurav's user avatar
31 votes
4 answers
23k views

How can duplicates be removed from a file using COBOL?

The input file have records as: 8712351,8712353,8712353,8712354,8712356,8712352,8712355 8712352,8712355 Using COBOL, I need to remove duplicates from the above file and write to an output file. I ...
Sanjana's user avatar
  • 371
29 votes
7 answers
20k views

Is there actually COBOL in .NET?

I was checking Microsoft's Visual Studio page just now and in the advertisements sidebar I suddenly saw an incredible advertisement: "Net Express is a COBOL development environment for extending ...
Robert Gould's user avatar
  • 69.6k
25 votes
3 answers
3k views

Is there a workable approach to use test-driven development (TDD) in a COBOL application? [closed]

Has anyone come across any workable approaches to implementing test-driven development (and potentially behavior-driven development) in/for COBOL applications? An ideal solution would enable both ...
Paul Russell's user avatar
  • 4,757
24 votes
1 answer
22k views

What is the difference between a variable-blocked format and a fixed-blocked format?

I have encountered these terms in a data file definition document for some data that I'm getting from a Mainframe system. I failed to find definitions of these terms in any glossary or Google search -...
user1845848's user avatar
24 votes
8 answers
26k views

Reading COBOL datastructures from Java

Is there a way to read COBOL data in a Java program? More concretely I'm confronted with the following case: I have a file with fixed length records of data. The data definition is done as COBOL ...
paweloque's user avatar
  • 18.8k
24 votes
9 answers
25k views

Why does COBOL have both `SECTION` and `PARAGRAPH`?

Why does COBOL have both SECTION and PARAGRAPH? Can anybody explain why the designers of COBOL created both SECTIONs and PARAGRAPHs? These have been around since the initial release of COBOL so I ...
NealB's user avatar
  • 16.8k
22 votes
5 answers
66k views

COBOL Data types

I have confusion regarding COBOL data types. Like in many interviews it is asked to explain the difference between COMP-3 and COMP... what is the exact difference? what is the meaning of usage modes ...
Manasi's user avatar
  • 727
22 votes
8 answers
27k views

What is COBOL used for? [closed]

What is COBOL used for?
Charu's user avatar
  • 2,749
18 votes
6 answers
23k views

Learning COBOL Without Access to Mainframe [closed]

I am a graduate student majoring in Computer Science. My department teaches the majority of its courses using Java (though I did take one course on system architecture that used C to demonstrate ...
AJ.'s user avatar
  • 28.1k
18 votes
3 answers
19k views

COBOL keyword REDEFINES

May I ask, what is the usage of the keyword REDEFINES in COBOL? I can not understand the manual's definition. What is the meaning of the following code? 01 WS_CHARGE_TXT_8X ...
lamwaiman1988's user avatar
17 votes
6 answers
12k views

Cobol web development/hosting resources [closed]

I'm employed at a fairly big company here in Germany and got the job to create the main website for it which will feature: Static contents; Information and Presentations An employee area (around 6000 ...
felixm's user avatar
  • 173
16 votes
2 answers
43k views

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(){ ...
Robin-Hoodie's user avatar
  • 4,944
15 votes
3 answers
2k views

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 ...
Kimmy1235's user avatar
  • 919
15 votes
6 answers
2k views

Cobol: science and fiction [closed]

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 ...
user8472's user avatar
  • 3,308
15 votes
2 answers
1k views

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 ...
Ionică Bizău's user avatar
13 votes
10 answers
6k views

Does it make sense to study COBOL? [closed]

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 ...
13 votes
4 answers
104k views

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 ? ...
Tom's user avatar
  • 962
13 votes
1 answer
7k views

Why does COBOL have to be indented? [closed]

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. ...
hiobs's user avatar
  • 636
13 votes
3 answers
570 views

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 ...
Deps's user avatar
  • 133
13 votes
3 answers
6k views

Read STDIN (SYSIN) in COBOL

I want to read the lines out of STDIN (aka SYSIN) in COBOL. For now I just want to print them out so that I know I've got them. From everything I'm reading it looks like this should work: ...
singpolyma's user avatar
  • 11.2k
12 votes
3 answers
5k views

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's user avatar
12 votes
2 answers
5k views

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 ...
Daniel Dennis's user avatar
12 votes
1 answer
1k views

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 ...
Stalyon's user avatar
  • 578
12 votes
2 answers
2k views

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 ...
Ira Baxter's user avatar
  • 94.8k
11 votes
5 answers
626 views

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 ...
Federico Giorgi's user avatar
11 votes
7 answers
2k views

The unmentioned parts of COBOL's history [closed]

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 ...
be nice to me.'s user avatar
11 votes
7 answers
9k views

Calling a Web Service from COBOL or CL

I'm using AS400 and I have been asked to call a web service from the green screen. How can thisbe this achieved? Any sample COBOL or CL code would be very helpful.
Anton Baclao's user avatar
10 votes
2 answers
12k views

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 ...
user avatar
10 votes
2 answers
39k views

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 ...
mmutilva's user avatar
  • 18.9k
10 votes
2 answers
565 views

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 ...
Gael L's user avatar
  • 243
9 votes
16 answers
2k views

What's the bright side of Cobol? [closed]

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 ...
Robert Gould's user avatar
  • 69.6k
9 votes
5 answers
20k views

Is it possible to add inline comments in Cobol

Most modern programming languages give a way to add inline comments, generally those that use a newline character to indicate the end of a comment, and an arbitrary delimiter or sequence of tokens to ...
psychoslave's user avatar
  • 2,999
9 votes
5 answers
11k views

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 ...
davek's user avatar
  • 22.8k
9 votes
5 answers
24k views

How does COBOL store and retrieve data? [closed]

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 ...
Matt Phillips's user avatar
9 votes
6 answers
4k views

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

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 ...
user avatar
9 votes
2 answers
2k views

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 ...
Brian Tiffin's user avatar
  • 4,066
8 votes
3 answers
13k views

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 ...
Rauland's user avatar
  • 3,014
8 votes
8 answers
2k views

Helping to ease COBOL programmers to .Net. What are your suggestions?

I have a number of COBOL programmers who are moving to .NET. I've found many struggle to adopt/understand OO programming principles. I don't have any COBOL experience, so my ability to find what few ...
Rob's user avatar
  • 1,318
8 votes
4 answers
67k views

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's user avatar
8 votes
7 answers
1k views

Cobol technical demonstration [closed]

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 ...
John Smith's user avatar
8 votes
3 answers
927 views

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-...
mllamazares's user avatar
  • 8,046
8 votes
1 answer
667 views

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 ...
inetphantom's user avatar
  • 2,618
8 votes
5 answers
1k views

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 ...
Kimmy1235's user avatar
  • 919
8 votes
3 answers
62k views

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 ...
Grekoz's user avatar
  • 275
8 votes
1 answer
929 views

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 ...
Stefan Larsson's user avatar
7 votes
4 answers
666 views

Is it possible to write a compiler in COBOL?

This blog post https://stackoverflow.blog/2020/04/20/brush-up-your-cobol-why-is-a-60-year-old-language-suddenly-in-demand/?cb=1 says "You can’t write a compiler or a kernel module in COBOL" I'm ...
Caltor's user avatar
  • 2,662
7 votes
6 answers
8k views

What are some good resources for getting started with COBOL programming? [closed]

I'm thinking about learning COBOL. Where should I start?
joeforker's user avatar
  • 41.5k
7 votes
1 answer
6k views

How COBOL handles division rounding by default?

In COBOL what is the result of COMPUTE RESULT1 = 97 / 100 COMPUTE RESULT2 = 50 / 100 COMPUTE RESULT3 = 32 / 100 COMPUTE RESULT4 = -97 / 100 COMPUTE RESULT5 = -50 / 100 COMPUTE RESULT6 = -32 / ...
RSFalcon7's user avatar
  • 2,281

1
2 3 4 5
36