home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!usenet.coe.montana.edu!news.u.washington.edu!stein.u.washington.edu!lambert
- From: lambert@stein.u.washington.edu (D. Lambert)
- Newsgroups: alt.cobol
- Subject: Re: comp-3 and ascii data representation
- Date: 27 Jan 1993 02:48:26 GMT
- Organization: University of Washington
- Lines: 55
- Message-ID: <1k4t5qINN22j@shelley.u.washington.edu>
- References: <1k2hkgINNcvi@shelley.u.washington.edu> <1993Jan26.175542.20192@tandem.com>
- NNTP-Posting-Host: stein.u.washington.edu
-
-
-
- Don Nelson <nelson_don@comm.tandem.com> writes:
-
- >In article <1993Jan26.130641.5325@mfltd.co.uk> James Fidell,
- >jfid@mfltd.co.uk writes:
- >>
- >>In article <1k2hkgINNcvi@shelley.u.washington.edu>,
- >>lambert@stein.u.washington.edu (D. Lambert) writes:
- >>> Is there a good source of information on how the numerical data
- >>> is stored in memory?
- >>>
- >>> Is there a program which would analyzed the file in a systematic
- >>> way to display the numeric contents correctly, without the need
- >>> for the file pic information?
- >>>
- >>> D. M. Lambert
- >>>
- >>
- >>I think this depends on what COBOL you are using, and what you mean by
- >>the word "file" -- a file created by a COBOL program on disk ? a COBOL
- >>executable ?
- >>
- >Exactly. Different implementations store numeric information in
- >different ways.
- >Almost every implementor spells this out in their reference manuals.
- >Read the
- >manual.
-
- >There is no way to read a data file (that is obviously what he means) and
- >figure out where the numeric information is. There are lots of tools
- >that
- >do this for you given the data descriptions.
-
- >Don Nelson
- >COBOL Development, Tandem Computers, Inc
- >nelson_don@comm.tandem.com
-
- Thanks for the information. I do know that the numerical information
- is stored in two's complement. The manual states this and the number
- of bytes required for the number of decimal digits used. Other than
- that Data General manuals do not say much about it. I have found some
- very rudimentary code to convert from two's complement to ascii. I am
- spliting the files records into the ascii portion and the numeric portion
- and I am then going to take the first n bytes of the numeric portion,
- varying n from 1 to whatever, to see if I can determine the PICture
- clause for each numeric item. Of course the ASCII data is a snap.
-
- I am aware of the various report writers available but as far as I know
- these all require the Picture clause information to be used.
-
- Thanks again for all your input.
-
- D.M. Lambert
- University of Washington
-