home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #6
/
amigamamagazinepolishissue1998.iso
/
coders
/
jËzyki_programowania
/
cobol
/
nrcobol1a
/
nrcobol.readme
< prev
next >
Wrap
Text File
|
1997-08-06
|
12KB
|
360 lines
NRcobol Version 1.0a by cHArRiOTt August 97
1.Introduction
2.Installation
3.Usage
4.Syntax
5.Implemented?
6.History
7.Todo
8.Bugs
9.Feedback
10.Contacts
11.Distribution
12.Credits
13.Disclimer
NUff REsPEct.....peace n more time.
-------------------------------------------------------------------------
1.Introduction ...Why COBOL?
To those of you thinking not another new language, COBOL is in fact one
of the oldest high-level languages, its roots going back to the late
1950's. Ofcourse there are those of you who already know this but regard
COBOL as not so much an high-level language, as the original computer
virus. To these people i say RESPECT the source of the mother tounge. (sic!)
When so many languages have come and gone (what ever happended to
Modulus II), COBOL has seen in the advent of STRUCTURED,and now OBJECT
methodologies, its adapted absorbing the latest in Database Management, SQL
etcetera, and gone on from strength to strength. Indeed as an introduction
to records there's alot to be said in its favour. So when people say why,
i say why not?
This implementation of COBOL is largely ANSI 85 compatable and takes the
form of MicroSoft(TM) COBOL, with maybe the exception of some stuff in
ENVIRONMENT DIVISION - SPECIAL-NAMES. And some stuff left over from the days
when memory was premium and no one had the imagination to contemplate speed.
see Implementation?
This would have been bought to you sooner, if it weren't for the moron, in
the bedsit down stairs, with something of an habit!! which in lean times
even extend to a fixation with gas. 'would you adam n eve it'.
WARNING dope really @&*$% you up! something to do with short term memory
going to pot!
STOP THE PRESS!.
"COMPUTING" MAY 8th 97
'Cobol crisis looms' The skills cris is luring Cobol programmers out of
retirement with offers of up to £1000 ($1700) per day...... hmm :-)
-------------------------------------------------------------------------
2.Installation
Nothing could be simpiler, Just copy the runtime program 'RUNCOB' anywhere
in your path, that's ram: c: or in the same directory as the created .INT
files.
Files with the extension .INT are created as a result of successfully
running NRCOBOL ..see Usage
-------------------------------------------------------------------------
3.Usage
After creating your cobol source file with your favourite text editor,
and saving it with the .COB extention you have a choise of evoking the
compiler from CLI/shell or Workbench.
From CLI/SHELL
NRCOBOL <sourcefile>.COB [-l] [-d]
where the optional flags:
-l produces a simple listing <sourcefile>.LST
-d produces a debug listing <sourcefile>.DBG
A successfull compilation produces <sourcefile>.INT
to run type... RUNCOB <sourcefile>.INT
From Workbench
Use of the program from workbench is self explanatory, but for those
too dim.
+--------------------------------------+
| [.][#]
|+-----------------------------------+-|
||Titles || | <-- What When Who
|| || |
|| || |
|+----------------------------------+| |
|File: | || | <-- current sourcefile.COB
| +----------------------------+| |
|___________________________________ | |
|| || |
|| IDENTIFICATION * || | <-- status block
|| ENVIRONMENT * || | *'s replaced by
|| DATA * || | PASSED or FAILED
|| PROCEDURE * || |
|| || |
|| || | <-- current line
|+----------------------------------+| |
|+----------+ +----+ +---+| | <-- ancillary output files
|| | List +----+ Debug +---+| | as .LST and/or .DBG
|| COMPILE | +---------+ +---------+| |
|| | | LOAD | | EXIT ||_|
|+----------+ +---------+ +---------+|=|
+------------------------------------+-+
^ ^ ^
| | |
| | |
| filerequester |
Make it so #1 Exit program or
Abort compilation or
RUN successful compilation
In both cases an ICON is produced named <sourcefile>.INT
to execute just double click.
The debug option produces a file which you may find useful in locating
runtime errors, which sadly is normal for cobol. Usually this is to do with
uninitialised variables, you know, finding alpha data in a numeric field.
Runtime errors usually return a value in the form 0x????, where 0x???? is an
offset into the data space allocated in the Data Division. Stradling values,
ie value between offset values indicates a postion within a table,
(a subsripted identifier).
-------------------------------------------------------------------------
4.Syntax
I may at a later date add the syntax, in the mean time the following
books are recomended:
- COBOL for the IBM Personal Computer by kip R Irvine
- COBOL for the 80's by J Wayne Spence
- Structured Programming in COBOL by B J Holmes
- COBOL 85 for programmers by Jim Inglis
OK go on then..
-------------------------------------------------------------------------
OK go on then.. The basics.
In Every Dam Program there are four division.
INTRODUCTION DIVISION.
PROGRAM-ID. <>.
ENVIRONMEMT DIVISION.
DATA DIVISION.
PROGRAM DIVISION.
ACCEPT ADD CALL CANCEL
CLOSE COMPUTE CONTINUE DELETE
DISPLAY DIVIDE EVALUATE EXIT
GO IF INITIALIZE INSPECT
MERGE MOVE MULTIPLY OPEN
PERFORM READ RELEASE RETURN
REWRITE SEARCH SET SORT
START STOP STRING SUBTRACT
UNSTRING USE WRITE
-------------------------------------------------------------------------
5.Implemented?
IDENTIFICATION DIVISION.
The program-id is required to be the same as the filename bar the
.COB file extention. This allows for consistent CALLs to subprogram
and nested programs ie via their program-ids.
ENVIRONMEMT DIVISION.
The only options supported in SPECIAL-NAMES are CURRENCY and DECIMAL-POINT.
I-O-CONTROL SECTION. recodnised but not implemented!
DATA DIVISION.
There is no support for the REPORT SECTION or communications.
BLOCK and RECORD clauses recodnised but not implemented!
USAGE IS default always ie no support yet for PACKED / BINARY etc..
SYNCHRONISED is recodnised but not implemented!
SCREEN SECTION is as defined by Microsoft 2.XX , i may add some supports
for basic BUTTON GADGETS later!
PROGRAM DIVISION.
All keywords above have been implemented!
CORR/CORRESPONDING not supported.
reference modification pending!
-------------------------------------------------------------------------
6.History
July 97 - first release CU Amiga Magazine
August 97 - CU Amiga Magazine / Aminet
resort to pre 'reference moddification' version, since
last minute addition of reference modification option introduced
strange/terminal errors ...sorry!
-------------------------------------------------------------------------
7.Todo
- font sensitive main program
- font sensitive runtime screen
- own rather than system input
- Totally ANSI 85 see Implemented?
- Intrinsic functions ANSI 89
- support for SQL trainer module
- OBJECT????? Hmmmm :-)
- port to collage unix environment
as soon as i find a suitable cross compiler to translate
condition/maths routines from hand coded M68k to ....
-------------------------------------------------------------------------
8.Bugs
-
-------------------------------------------------------------------------
9.Feedback
- 'things aint wot they ougt a'
- unexpected output or syntax ... well you never know
- congratulations
- bribes not to continue
- buy outs / takeovers
- Donations of money / hardware ;-)
- or even a post card from what ever part of the planet you and your
Amiga reside. Amiga dead? Long live Amiga.
- OBJECT COBOL example code???
- Spare copy of latest ANSI COBOL standard??
this comes via limited access to Ansi74 plus the stuff at the back
of most books on COBOL
- Offers of work :-(
email : HARRIOTT@cardiff.ac.uk (curtesy of Mike Evans @ cardiff uni)
snail mail
C Harriott
14a Splott Road
Splott
Cardiff
Cf2 2BZ
UK
-------------------------------------------------------------------------
10.Contacts
For further information on the COBOL scene you might try the FAQ
created and maintained by
jfid@mfltd.co.uk (James Fidell)
http://www.mfltd.co.uk/~jfid/
-------------------------------------------------------------------------
11.Distribution
Distribution is granted to anyone via floppy and internet/ BBS provided
documentation remains as is, only a nominal fee is charged for copying
and no attempt is made to reverse engineer the program.
Distribution is also granted to anyone compiling a CDROM provided the
above conditions are met AND i am sent a copy of the CDROM. Please??
-------------------------------------------------------------------------
12.Credits
Would you belive i wrote this with the public domain 'C' compiler
NorthC 1.3 ...if you're out there S Hawtin thanks dude. Although i have to
say it makes for lazy programing. Hopefully GNU C will induce disipline!
Ouch!
Thanks expressed to Thore Böckelmann for the use of his disclimer (quite
frankley i couldn't have put it better myself) also thanks for gifting
the Amiga community his EXCELENT CyberAVI and CyberQT. A real babe of a
program. SHwing?? Now how about some avi/mov files AF/CUCD/ANOther?
Thanks also to those unknown warriors who gave their all to bring us the
freedom to program in assembler.. the authors of A68K and BLINK
without which..... RESPECT!
-------------------------------------------------------------------------
13.Disclimer
No warranty, either express or implied, is made with respect to the fitness or
merchantability of NRCOBOL.
cHArRiOTt (referred to as "the author"), reserves the right to not
develop any future versions of NRCOBOL.
The author will try to make a good faith attempt at correcting any problems if
any are discovered, but is in no way required, nor bound to correct them.
The author neither assumes nor accepts any responsibility for the use or misuse
of these programs. He will also not be held liable for damages or any
compensation due to loss of profit or any other damages arising out of the use,
or inability to use this program.
The author will not be liable for any damage arising from the failure of this
program to perform as described, or any destruction of other programs or data
residing on a system attempting to run the programs.
The user of this program uses it at his or her own risk.
-------------------------------------------------------------------------
'yep, it's so much more...jealous?'