Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

downloading file with comp-3 data

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: downloading file with comp-3 data
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    Post subject: Reply to: downloading file with comp-3 data
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    Post subject: Reply to: downloading file with comp-3 data
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: 7993
Location: Bellevue, IA

PostPosted: Tue Apr 07, 2009 4:54 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 1 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us