IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

downloading file with comp-3 data


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pprulz

New User


Joined: 15 Jan 2008
Posts: 6
Location: India

PostPosted: Tue Apr 07, 2009 11:43 am
Reply with quote

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
View user's profile Send private message
Succor

New User


Joined: 20 Feb 2009
Posts: 96
Location: Bangalore :)

PostPosted: Tue Apr 07, 2009 12:57 pm
Reply with quote

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
View user's profile Send private message
leo_sangha

New User


Joined: 11 Aug 2005
Posts: 85
Location: England

PostPosted: Tue Apr 07, 2009 3:32 pm
Reply with quote

you can convert packed decimals to numerics using sort in JCL.
Then you can download. Hope this helps.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Apr 07, 2009 4:54 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top