What's new

Need help from COBOL programmers (1 Viewer)

A

Andrew_A_Paul

I've been working on an assignment for my COBOL class and there are few I can't seem to find in the book. Here's the question.

"A subscripted data name can be used in an IF statement, but not and EVALUATE statement"

Also, im asked to code data division entry to define a 50 element table named X-TAB. Each element in the table has a PIC of S9(3)V99 and should be in a group item named DATA-TABLE. This would work, correct?

01 DATA-TABLE
05 X-TAB OCCURS 50 TIMES PIC S9(3)V99.


Hopefully someone can help me out. Thanks
 

Kevin P

Screenwriter
Joined
Jan 18, 1999
Messages
1,439
I haven't done COBOL in several years so I'm a tad rusty, but let me give them a whirl...
Also, im asked to code data division entry to define a 50 element table named X-TAB. Each element in the table has a PIC of S9(3)V99 and should be in a group item named DATA-TABLE. This would work, correct?

01 DATA-TABLE
05 X-TAB OCCURS 50 TIMES PIC S9(3)V99.
You need a period after DATA-TABLE, and the 05 should be indented further than the 01 (maybe you did and the forum didn't carry it). Otherwise that declaration looks fine. It should look like this:
Code:
* Comment line for reference, asterisk is in column 7, 01 starts in column 8
 01 DATA-TABLE.
 05 X-TAB OCCURS 50 TIMES PIC S9(3)V99.
 

MikeAlletto

Senior HTF Member
Joined
Mar 11, 2000
Messages
2,369
They still teach cobol? I had 1 semester of it and didn't learn a single thing. Got a B in the class and haven't looked at it since. That was about 9 years ago.
 
A

Andrew_A_Paul

Kevin, You are correct about the indention and period, i dont know why it didnt format correctly on here. The answer for the first one is false. We kinda went over this in class today. Mike, this is probably going to be the last semester for COBOL at ISU. And C++ for that matter. I think C++ is going to go to JAVA and COBOL is going towards object oriented. i dont know why, just use C# or something like that. But thats what the college is leaning towards. I've been to the past several career fairs at ISU and most of the companies ask about COBOL because they still have a lot of code written in COBOL, and rather than change something that works, and the fact that its costly and time consuming to rewrite really old programs they just leave the COBOL in place.
 

MikeAlletto

Senior HTF Member
Joined
Mar 11, 2000
Messages
2,369
I've been to the past several career fairs at ISU and most of the companies ask about COBOL because they still have a lot of code written in COBOL
Wow, thats really strange. All the job fairs and stuff I went to while still in college I never encountered any company that asked about cobol. I guess since its still being taught there that influences what types of companies show up.
 

Tekara

Supporting Actor
Joined
Jan 8, 2003
Messages
783
Real Name
Robert
a good number of banks still use COBOL since that's what the banking programs where originally programed in and they pay quite handsomly to those that can program in it as there is a rather short supply of COBOL programmers.
 
A

Andrew_A_Paul

Ya, only I have a dislike for programming. But I'm required to take a few programming classes to graduate. Principle financial still uses cobol. Most companies leave the cobol and write programs in other languages to access the old cobol stuff and run it that way.
 

Users who are viewing this thread

Sign up for our newsletter

and receive essential news, curated deals, and much more







You will only receive emails from us. We will never sell or distribute your email address to third party companies at any time.

Forum statistics

Threads
357,059
Messages
5,129,809
Members
144,281
Latest member
acinstallation240
Recent bookmarks
0
Top