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.
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
Joined: 06 Jun 2008 Posts: 8201 Location: Dubuque, Iowa, USA
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.