Page 1 of 1

Converting numeric data to COBOL Comp-3

Posted: Thu Jun 17, 2004 12:57 pm
by harisukumaran
I found several posts on this forum about converting packed data to numeric but could find any about doing the reverse. That happens to be what I am supposed to do. I looked in online documentation but could not find exactly what I am looking for. The SDK has a function for converting packed to integer but not the reverse. I would be a tremendous help if some one could share information about how this can be accomplished.

Re: Converting numeric data to COBOL Comp-3

Posted: Thu Jun 17, 2004 2:27 pm
by jseclen
Hi,

Are you using Job Mainframe?

In the Job Mainframe constraint you must to define the next conversion

CAST(Campo AS DECIMAL(18, 4) ).

Posted: Thu Jun 17, 2004 4:43 pm
by harisukumaran
I am just using a server job (not mainframe stage). I have used OConv with MP to try to do the conversion but does not work.

Posted: Sun Jul 04, 2004 7:34 am
by jwhyman
The reason the SDK has it this way is because most customers read from mainrames nd not send data to them. The SDK comes with source, you have the algorithm one way, work out how to reverse it.