HP3000-L Archives

June 2001, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Shahan, Ray" <[log in to unmask]>
Reply To:
Shahan, Ray
Date:
Thu, 21 Jun 2001 09:33:19 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (72 lines)
Dude,  COBOL is  NOT a column oriented language.  While columns 1/6 are
reserved for line numbers, and column 7 for compiler directives and comment
notation, columns 8 through 72 are whatever you wish.

Starting DIVISION/PARAGRAPH/ETC. Headers in column 8 is simply for style as
is the case for starting Procedure division statements in column 12.   You
can code the "PROCEDURE DIVISION" statement to start in column 50 if you
wish, and you can code a "MOVE" statement in column 8 is you so choose.

This holds true for all the divisions too.

:-)

Ray Shahan

> -----Original Message-----
> From: Tom Brandt [SMTP:[log in to unmask]]
> Sent: Thursday, June 21, 2001 8:53 AM
> To:   [log in to unmask]
> Subject:      Re: Help Starting COBOL
>
> John,
>
> Way in the back of the COBOL reference manual is a sample program which
> can
> help get you started.
>
> Also, there is a SIGCOBOL mailing list, similar to HP3000-L (a lot of the
> same people hang out in both) where you can get a wealth of COBOL info.
> See
> http://www.interex.org/advocacy/listservers.html
> for more info on the SIGCOBOL mailing list. I highly recommend it for
> COBOL-specific help.
>
> As for your immediate problems, please remember that COBOL, unlike C or
> Java, is a column-oriented language.  The first 6 bytes of each line of
> your source file are reserved for sequence numbers. All of your text must
> start in column 7. Column 7 itself is reserved for special characters -
> "*"
> indicating a comment line, "$" indicating a compiler directive, "-"
> indicating a continuation line. Division, section and paragraph names
> begin
> in column 8, statements begin in column 12. Most of your problems have to
> do with things being in the wrong column.
>
> You are also missing the Environment and Data Divisions, which are
> required.
>
> At 10:42 PM 6/21/2001 +0900, DASS,JOHN (Non-A-Singapore,ex1) wrote:
> >Hello,
> >
> >I am pretty new to HP3K and just starting to write
> >some programs in C and now I would like to try COBOL.
> >I have downloaded the COBOL II reference manual from
> >docs.hp but just can't seem to get running.
>
> <snip rest>
>
>
> --------------------------------
> Tom Brandt
> Northtech Systems, Inc.
> 313 N. 1st Street
> Ann Arbor, MI 48103
> http://www.northtech.com/
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2