home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: alt.cobol
- Path: sparky!uunet!think.com!sdd.hp.com!decwrl!pacbell.com!tandem!news
- From: Don Nelson <nelson_don@comm.tandem.com>
- Subject: Re: comp-3 and ascii data representation
- Message-ID: <1993Jan27.200000.14369@tandem.com>
- X-Xxdate: Wed, 27 Jan 93 21:13:40 GMT
- Sender: news@tandem.com
- Nntp-Posting-Host: 130.252.172.59
- Organization: Tandem Computers
- X-Useragent: Nuntius v1.1.1d16
- References: <1k2hkgINNcvi@shelley.u.washington.edu> <1k4t5qINN22j@shelley.u.washington.edu> <1k4v1fINN3pp@shelley.u.washington.edu>
- Date: Wed, 27 Jan 1993 20:00:00 GMT
- Lines: 69
-
- In article <1993Jan27.153424.8408@mfltd.co.uk> James Fidell,
- jfid@mfltd.co.uk writes:
- >
- >In article <1k4v1fINN3pp@shelley.u.washington.edu>,
- >lambert@stein.u.washington.edu (D. Lambert) writes:
- >>
- >> If implementaions of Cobol use different file storage formats
- >> then wouldn't that make data files not portable?
- >
- >Yes.
- >
- >> Would each Data file from say an IBM implementation have to be
- converted
- >> to ascii representation to be read by a cobol program with the same
- >> file defintions on a DG implementation?
- >
- >Probably.
- >
- >> I thought that the data was stored the same way. Does the runtime
- >> system have anything to do with conversion? I know that the runtile
- >> MLS lock server prevents access to users during conficts with other
- >> users or security definitions. This prevents corrupting data through
- >> simultaneous write access to the file.
- >
- >Different COBOL vendors write files in different ways -- there is no
- >guarantee that a file written by, say, IBM, COBOL will be readable using
- >the same program compiled under, say, DG COBOL.
- >
- Not true. See below. All vendors must pass the audit tests and they
- require
- reading and writing tapes that can be transported amongst systems (there
- is an
- ISO/ANSI standard for these tapes).
-
- >IMHO, historically it has been the intention of many language vendors to
- >write ``closed'' systems which are incompatible with others, in order to
- >tie buyers into their system.
- >
- Vendors don't use these to tie people into their systems. They do it
- because
- their particular architecture is different than others. COMP and similar
- formats are particular to their machine and therefore differ from those
- on
- other machines. This is done for efficiency (arithmetic with COMP items
- can
- be as much as a hundred times faster than with DISPLAY fields).
-
- >I believe, though I would not state categorically, that ANSI specify that
- >certain data-types are stored in particular ways in memory (can anyone
- >confirm or refute this ?), but that doesn't really get you anywhere.
-
- It does get you somewhere. The ISO/ANSI COBOL Standard does state that
- certain data types are portable. If the user wants portable files the
- method
- is simple. Do not use any USAGEs other than DISPLAY (the default usage).
-
- Specify the SIGN IS LEADING|TRAILING SEPARATE clause for all signed
- numeric
- items. Make the records fixed length. Write them to a tape that can be
- read
- on the other system. That will do it. COBOL was designed to allow
- porting
- files and programs and it works fine as long as you stick with standard
- stuff.
-
- Don Nelson
- COBOL Development, Tandem Computers, Inc
- nelson_don@comm.tandem.com
- No clever quotes here
-