home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / alt / cobol / 707 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  2.5 KB

  1. 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
  2. From: lambert@stein.u.washington.edu (D. Lambert)
  3. Newsgroups: alt.cobol
  4. Subject: Re: comp-3 and ascii data representation
  5. Date: 27 Jan 1993 02:48:26 GMT
  6. Organization: University of Washington
  7. Lines: 55
  8. Message-ID: <1k4t5qINN22j@shelley.u.washington.edu>
  9. References: <1k2hkgINNcvi@shelley.u.washington.edu> <1993Jan26.175542.20192@tandem.com>
  10. NNTP-Posting-Host: stein.u.washington.edu
  11.  
  12.  
  13.  
  14. Don Nelson <nelson_don@comm.tandem.com> writes:
  15.  
  16. >In article <1993Jan26.130641.5325@mfltd.co.uk> James Fidell,
  17. >jfid@mfltd.co.uk writes:
  18. >>
  19. >>In article <1k2hkgINNcvi@shelley.u.washington.edu>, 
  20. >>lambert@stein.u.washington.edu (D. Lambert) writes:
  21. >>> Is there a good source of information on how the numerical data 
  22. >>> is stored in memory?
  23. >>> 
  24. >>> Is there a program which would analyzed the file in a systematic 
  25. >>> way to display the numeric contents correctly, without the need 
  26. >>> for the file pic information?
  27. >>> 
  28. >>> D. M. Lambert
  29. >>> 
  30. >>
  31. >>I think this depends on what COBOL you are using, and what you mean by
  32. >>the word "file" -- a file created by a COBOL program on disk ?  a COBOL
  33. >>executable ?
  34. >>
  35. >Exactly.  Different implementations store numeric information in
  36. >different ways.
  37. >Almost every implementor spells this out in their reference manuals. 
  38. >Read the
  39. >manual.
  40.  
  41. >There is no way to read a data file (that is obviously what he means) and 
  42. >figure out where the numeric information is.  There are lots of tools
  43. >that 
  44. >do this for you given the data descriptions.
  45.  
  46. >Don Nelson
  47. >COBOL Development, Tandem Computers, Inc 
  48. >nelson_don@comm.tandem.com
  49.  
  50. Thanks for the information. I do know that the numerical information
  51. is stored in two's complement. The manual states this and the number 
  52. of bytes required for the number of decimal digits used. Other than 
  53. that Data General manuals do not say much about it. I have found some
  54. very rudimentary code to convert from two's complement to ascii. I am
  55. spliting the files records into the ascii portion and the numeric portion
  56. and I am then going to take the first n bytes of the numeric portion, 
  57. varying n from 1 to whatever, to see if I can determine the PICture 
  58. clause for each numeric item. Of course the ASCII data is a snap.
  59.  
  60. I am aware of the various report writers available but as far as I know
  61. these all require the Picture clause information to be used.
  62.  
  63. Thanks again for all your input.
  64.  
  65. D.M. Lambert
  66. University of Washington
  67.