Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Pack decimal possibility

by chuckbutler (Vicar)
on May 26, 2010 at 23:37 UTC ( #841848=note: print w/ replies, xml ) Need Help??

in reply to Pack decimal possibility

There is a module, Convert::IBM390, that supports various conversion functions for data to/from a mainframe. One is packeb:

use Convert::IBM390 qw(packeb); my $comp3 = packeb( 'p4', 240 ); #77 A PIC S9(7) COMP-3. print $comp3; __END__ ~~output~~ 0x0000240c (of course, in binary)

It works well, and handles negative values.

Good luck. -c

Comment on Re: Pack decimal possibility
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://841848]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2015-07-31 06:49 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (274 votes), past polls