Questions tagged [cobol85]

COBOL 85 is a revision of ANSI COBOL 74 standard.

COBOL 85 is a revision of ANSI COBOL 74 standard.

Where COBOL is the computer language with the acronymn COmmon Business-Oriented Language.

The COBOL 85 best feature is the inclusion of 'scope terminators', including END-IF, END-PERFORM, END-READ etc.

The COBOL 85 dialect was replaced with the COBOL 2002 dialect. However most applications today are written to the 1985 standard to ensure greater portability between language implementations/vendors.

37 questions
30
votes
4 answers

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 wrote simple logic to read records and write to an…
Sanjana
  • 361
  • 1
  • 3
  • 5
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,217
  • 3
  • 17
  • 35
4
votes
2 answers

What does Cobol file status 9Â mean?

My issue is when I try to open on input a huge file (6GB) , there's a message that says: cobol file status code 9Â I compiled the program and it has no errors, but when I try to run it, I use a small one (3 GB for example) my program work…
hm amn
  • 58
  • 3
4
votes
2 answers

Splitting digits from a packed-decimal field

I have a 7-digit packed-decimal field on my file. How can I define data items that would extract/separate these 7 digits? For example I want to have the first two digits in one data item and the other digits in another, so I can manipulate them…
Murad
  • 41
  • 2
4
votes
5 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,505
  • 1
  • 30
  • 66
3
votes
3 answers

Converting a date in COBOL

So im reading a mmddyyyy (01012000) date into a pic x (8) and im wondering how I can create a new variable with the previous variables info into yyyymmdd (20000101) format. Im sure there must be some way to do this with substrings or what not?
2
votes
3 answers

Fujitsu COBOL 3.0

I'm new to Fujitsu COBOL 3.0 software. I tried executing a simple program. The code and errors are as follows. Everything in program appears to be correct. Can anyone help me out? Any prestandards are to be followed in this software? The sample…
user80874
  • 69
  • 1
  • 5
2
votes
1 answer

How do I rectify this logical error in printing output in the SYSOUT spool from COBOL program?

This is the cobol code *----------------------- IDENTIFICATION DIVISION. *----------------------- PROGRAM-ID. TOPACCTS AUTHOR. Otto B. Boolean. *-------------------- ENVIRONMENT DIVISION. …
Fnechz
  • 91
  • 6
2
votes
2 answers

COBOL - Understanding SET MYSELF

In my COBOL program I have the following statement: SET MYSELF (STATUS) TO -1. What this statement does? I don't understand the MYSELF and STATUS words. It seems that the it gives the status parameter the value -1, am I right? What MYSELF means?
jguilhermemv
  • 807
  • 3
  • 11
  • 27
2
votes
3 answers

Is there someway to log variables in COBOL like the other languages?

I know that there's the DIPSLAY operand that let's you "log" any variable value. However, my question is: is there someway to do something like the var_dump of PHP of console.log of javascript which when you give them a variable, they print with…
elkolotfi
  • 3,918
  • 2
  • 12
  • 18
2
votes
2 answers

What is the difference between COBOL Nested Program vs. Subroutine in Z/OS

In COBOL, you may enclose a subroutine as nested program or as a stand-alone module. I want to know what are the differences between the two approaches in terms of speed of execution, memory usage, and whether both methods are allowed in CICS or…
NoChance
  • 5,099
  • 2
  • 26
  • 37
2
votes
0 answers

official test suite for PL/I like for Cobol 85?

Could anybody point me to an official test suite for PL/I ? as PL/I is an ANSI standard, I was hoping to find such a suite but I'm unsuccessful in my search until now. Ideal would be to find a suite like the test suite for COBOL85 test suite…
Didier Durand
  • 607
  • 7
  • 16
2
votes
1 answer

cobol 85 , carriage return and line feed

I am coding in cobol85, I have an input file having 2 records as of now ""1";"S";"20140211095016";;;;;"KANATA";"ON";"K2V 1A5";"ZR1 ;;;;;;;;;;"-503.15";;"1715.27";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"26696.33 ";"78.22";"3275.95";;;;;"30050.50";;"…
2
votes
2 answers

I'm having trouble with tables using Cobol

IDENTIFICATION DIVISION. PROGRAM-ID. MP4-5. ENVIRONMENT DIVISION. DATA DIVISION. WORKING-STORAGE SECTION. 01 SEAT-DESCRIPTION. 03 FILLER PIC X(50) VALUE "01 DRIVER". 03 FILLER PIC X(50) VALUE "02 DRIVER'S ASST". 03 FILLER PIC…
2
votes
1 answer

Command for displaying the error in MS COBOL

Can i ask some help about the ms cobol 2.20?. I found difficulty in reading the error when i got run-time in my program because it was covered by the path of my directory where my program resides.Is this possible to log this in notepad?so that i can…
jemz
  • 4,421
  • 10
  • 47
  • 86
1
2 3