View previous topic :: View next topic
|
Author |
Message |
Rahul_kumar Warnings : 2 New User
Joined: 24 Jun 2006 Posts: 50
|
|
|
|
Hi,
I have a input file wherein every record should contain data in alphanumeric, decimal, binary, floating-point and packed decimal format.
for alphanumeric and decimal format, its easy to read data from input file and write it to output file.
I am really struggling with the data in hexadecimal format in input file record. i have to read data in hexadecimal format and write it to an output file in human readable format.
Can someone assist me to convert data represented in hexadecimal format in an input file, convert it to decimal format thru some cobol code logic and write the data in output file in decimal format.
Not sure whether cobol support some inbuilt function to take care of it or not. Pls let me know if anyone is aware of such an inbuilt cobol function. |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
Hi Rahul,
A simple MOVE statement would suffice.. ( Please go thru the COBOL manuals... )
*Note : And i am not sure whether the COMP and COMP-3 formats could be referred to as "hexadecimal" formats... |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you post the cobol file definition, some of the data (in hex) that matches that definition, and the output you want from this sample data. |
|
Back to top |
|
|
|