View previous topic :: View next topic
|
Author |
Message |
pprulz
New User
Joined: 15 Jan 2008 Posts: 6 Location: India
|
|
|
|
Hi,
I have a file which contains comp-3 data, I want to download the file to PC in order to compare it with other file, how can I convert comp-3 data to displayable format, one way I know is, directly in cobol program we can move it to displayable field, but if anybody knows while downloading file what format it should be downloaded so that comp-3 data will be shown as numeric data. |
|
Back to top |
|
|
Succor
New User
Joined: 20 Feb 2009 Posts: 96 Location: Bangalore :)
|
|
|
|
Pprulz,Its better to use a JCL in comparison to writing a cobol program to achieve what you want. Once the file is converted you can download the same and compare .There several topics available in forum on the same.
Please go through the following link :http://www.ibmmainframes.com/about3353.html
WTF |
|
Back to top |
|
|
leo_sangha
New User
Joined: 11 Aug 2005 Posts: 85 Location: England
|
|
|
|
you can convert packed decimals to numerics using sort in JCL.
Then you can download. Hope this helps. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
but if anybody knows while downloading file what format it should be downloaded so that comp-3 data will be shown as numeric data. |
It can't be done -- packed decimal values can be perfectly valid as is, so the conversion must be done before the download.
For example, X'97994D' may be a packed decimal -97994 value. On the other hand, X'97994D' also represents 'pr(' in EBCDIC -- which may be part of a Unix System Services command string. If you convert it during download and it is supposed to be pr( you've just screwed up the command; if you leave it alone but it is a packed decimal value that you're downloading as text (so the EBCDIC to ASCII conversion occurs) you've just changed it to X'70727B'. There's no way to tell how to handle it during the download so it must be taken care of before the download. |
|
Back to top |
|
|
|