Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

New learning website for COBOL in the making

118 views
Skip to first unread message

Christopher Bahn

unread,
Nov 11, 2012, 4:49:04 AM11/11/12
to
Hi everybody,

I just beginning learning COBOL and want to help me and others with example source code for studying. Therefore, I set up a website which shall contain a small database with code: https://sites.google.com/site/cobolcode/

Any code "donation" (not meant in a transfer of copy rights, but showing at the homepage) would be highly appreciated. Thanks a lot!

Kind regards,

Christopher

Charles Hottel

unread,
Nov 11, 2012, 11:56:06 AM11/11/12
to

"Christopher Bahn" <cbb...@gmail.com> wrote in message
news:b8117739-d5ce-4041...@googlegroups.com...
The short program at your link looks like Java. How does that help anyone
learn COBOL?


Luuk

unread,
Nov 11, 2012, 12:24:43 PM11/11/12
to
As Charles said, it looks like Java,
so maybe you should heve use Google,
because than you would have found:
http://groups.engin.umd.umich.edu/CIS/course.des/cis400/cobol/hworld.html

000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID. HELLOWORLD.
000300
000400*
000500 ENVIRONMENT DIVISION.
000600 CONFIGURATION SECTION.
000700 SOURCE-COMPUTER. RM-COBOL.
000800 OBJECT-COMPUTER. RM-COBOL.
000900
001000 DATA DIVISION.
001100 FILE SECTION.
001200
100000 PROCEDURE DIVISION.
100100
100200 MAIN-LOGIC SECTION.
100300 BEGIN.
100400 DISPLAY " " LINE 1 POSITION 1 ERASE EOS.
100500 DISPLAY "Hello world!" LINE 15 POSITION 10.
100600 STOP RUN.
100700 MAIN-LOGIC-EXIT.
100800 EXIT.

and is 'hello world' not the standard first program that anyone wants to
write when he (or she) is learning a 'new' language ?


Anonymous

unread,
Nov 12, 2012, 8:19:25 AM11/12/12
to
Luuk <lu...@invalid.lan> wrote:

> and is 'hello world' not the standard first program that anyone wants to
> write when he (or she) is learning a 'new' language ?

No, it is not, especially not in this case since COBOL came out in 1959 and
"Hello, World!" didn't come out until K&R in 1978.

Do the math!

>

Christopher Bahn

unread,
Nov 12, 2012, 9:29:34 AM11/12/12
to
That is true, but it is meant only as illustration of "source code".

Luuk

unread,
Nov 12, 2012, 2:16:50 PM11/12/12
to
Can i borrow someone's calculator?

;)

HeyBub

unread,
Nov 13, 2012, 2:06:58 PM11/13/12
to
You could write a program ...


Luuk

unread,
Nov 13, 2012, 3:01:20 PM11/13/12
to
000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID. HELLOWORLD.
000300
000400*
000500 ENVIRONMENT DIVISION.
000600 CONFIGURATION SECTION.
000700 SOURCE-COMPUTER. RM-COBOL.
000800 OBJECT-COMPUTER. RM-COBOL.
000900
001000 DATA DIVISION.
001100 FILE SECTION.
001200
100000 PROCEDURE DIVISION.
100100
100200 MAIN-LOGIC SECTION.
100300 BEGIN.
100400 DISPLAY " " LINE 1 POSITION 1 ERASE EOS.
100500 DISPLAY "What time has past between 1959 and 1978:", 100600
1978-1959 .
100700 STOP RUN.
100800 MAIN-LOGIC-EXIT.
100900 EXIT.


But my coding skills are a bit...... not used for some time...

Rick Smith

unread,
Nov 13, 2012, 6:31:13 PM11/13/12
to
On Sunday, November 11, 2012 12:30:02 PM UTC-5, Luuk wrote:

[snip]

> 000100 IDENTIFICATION DIVISION.
> 000200 PROGRAM-ID. HELLOWORLD.
> 000300
> 000400*
> 000500 ENVIRONMENT DIVISION.
> 000600 CONFIGURATION SECTION.
> 000700 SOURCE-COMPUTER. RM-COBOL.
> 000800 OBJECT-COMPUTER. RM-COBOL.
> 000900
> 001000 DATA DIVISION.
> 001100 FILE SECTION.
> 001200
> 100000 PROCEDURE DIVISION.
> 100100
> 100200 MAIN-LOGIC SECTION.
> 100300 BEGIN.
> 100400 DISPLAY " " LINE 1 POSITION 1 ERASE EOS.
> 100500 DISPLAY "Hello world!" LINE 15 POSITION 10.
> 100600 STOP RUN.
> 100700 MAIN-LOGIC-EXIT.
> 100800 EXIT.

FYI, the minimum program conforming to the COBOL 85 standard is:
-----
identification division.
program-id. hello.
procedure division.
begin.
display "Hello world!".
-----

For COBOL 2002, it is (or should be):
-----
program-id. hello.
procedure division.
display "Hello world!".
-----

TruthSlave

unread,
Nov 18, 2012, 3:53:18 PM11/18/12
to
Back in the day i wrote a COBOL compiler for a now obscure platform, the
amiga. I ported the program to linux but never got around to
publishing it.

It came with a number of reasonable programming examples, if you're
interested you could have those in a zip.

SkippyPB

unread,
Nov 19, 2012, 10:27:54 AM11/19/12
to
On Sun, 18 Nov 2012 20:53:18 +0000, TruthSlave <T...@home.com> wrote:

>On 11/11/12 09:49, Christopher Bahn wrote:
>> Hi everybody,
>>
>> I just beginning learning COBOL and want to help me and others
>> with example source code for studying. Therefore, I set up a
>> website which shall contain a small database with code:
>> https://sites.google.com/site/cobolcode/
>>
>> Any code "donation" (not meant in a transfer of copy rights,
>> but showing at the homepage) would be highly appreciated. Thanks a lot!
>>
>> Kind regards,
>>
>> Christopher
>
>
>Back in the day i wrote a COBOL compiler for a now obscure platform, the
>amiga. I ported the program to linux but never got around to
>publishing it.
>

Too bad the Amiga is now obscure. It was far better than Windows or
Apple but had a bunch of knuckleheads as CEOs.


>It came with a number of reasonable programming examples, if you're
>interested you could have those in a zip.

Regards,
--

////
(o o)
-oOO--(_)--OOo-

"After eating an entire bull, a mountain lion felt so good he started
roaring. He kept it up until a hunter came along and shot him... The moral:
When you're full of bull, keep your mouth shut."
--Will Rogers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Remove nospam to email me.

Steve

quasar.c...@gmail.com

unread,
Nov 20, 2012, 1:48:57 AM11/20/12
to
Christopher,

I would advise you to always use a Monospace font, while displaying Cobol Code Samples on your site.

Thank you very much,

Quasar Chunawala

Christopher Bahn

unread,
Nov 20, 2012, 8:30:30 AM11/20/12
to
Hi,

that would be great: christop...@aol.com

Christopher Bahn

unread,
Nov 20, 2012, 8:30:56 AM11/20/12
to
Thanks for the hint!

Christopher Bahn

unread,
Nov 20, 2012, 8:31:58 AM11/20/12
to
Thanks!
0 new messages