home *** CD-ROM | disk | FTP | other *** search
- From: Bruce.Feist@f615.n109.z1.fidonet.org (Bruce Feist)
- Sender: Uucp@blkcat.UUCP
- Path: sparky!uunet!blkcat!Uucp
- Newsgroups: alt.cobol
- Subject: Re; Why COBOL for the 90's
- Message-ID: <726123825.AA00000@blkcat.UUCP>
- Date: Sun, 03 Jan 1993 19:58:42 -0500
- Lines: 20
-
- Hello Drake!
-
- D> I'm just starting out in COBOL; could I have a few
- D> examples where the advantage of COBOL is clearly shown?
-
- COBOL is pretty much unsurpassed at describing data (PL/1 does about as well).
- I'm not talking user-defined data types or complex structures here; I'm talking
- about describing file layouts. This makes it easy to access data residing in
- files, and also simplifies report generation. To build a line of a report, you
- just issue assignment statements filling out the different fields. In C, in
- contrast, the best approach is probably to use a rather complex (due to the need
- to align columns) fprintf() call. And, if any of your data is in a type not
- supported by C (for instance, packed decimal), it gets even messier.
-
- A related advantage is COBOL's skill at defining the format of data at the field
- level. You can cause commas or other characters to be inserted at appropriate
- places, for instance, without doing any special manipulation of the data.
-
- Bruce
-
-