Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Pack decimal possibility

by ReturnOfThelonious (Beadle)
on May 26, 2010 at 21:35 UTC ( #841830=note: print w/replies, xml ) Need Help??


in reply to Pack decimal possibility

Specifically,
my $packed = pack "H*", sprintf "%07dC", $num_records;
would give you a PIC S9(7) COMP-3 packed decimal (positive only).

Perl can count the records and add the trailer record, too, but I don't know what record format you're using.

Replies are listed 'Best First'.
Re^2: Pack decimal possibility
by mikeward61 (Initiate) on May 26, 2010 at 23:47 UTC
    Thanks, this worked perfectly...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2022-11-30 03:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?