03-22-2019
FYI "packed format" is not part of the EBCDIC character set, it is a way of storing numerical data on the host. Basically the host has two forms of storing numerical data: "zoned (decimal)" and "packed (decimal)".
Here is a thorough description.
Basically "zoned" stores a hexadecimal value in the lower nibble (the lower 4 bits of a byte) and an "F" in the higher nibble. In the last digit the higher nibble is used for storing the sign instead. i.e "123" (or "+123") would look like
F1F1C3, the "C" being the code for a positive number. This format can be translated easily into ASCII (simply replace the high-nibbles with "3" instead of "F").
The packed format stores a digit in each of the nibbles so that there is no direct translation of one byte EBCDIC to one byte ASCII. The sign is stored in in the last nibble but coded in various ways (depending on "format" versus "informat". Either "C" is positive and "D" is negative (format) or "A", "C", "E" and "F" is positive and "B" and "D" is negative (informat). If you end with an odd number of nibbles the leftmost byte is padded with a 0 (zero) in the high-nibble. You actually need to calculate the value from the bytewise representation to translate it to ASCII.
There are professional software packages for the file transfer between (z/OS) mainframes and the UNIX world. Connect: Direct, IND$FILE and XCOM Data Transfer, just to name a few. The problem with transferring mainframe data is that there are a lot more data formats on the mainframe than there are on UNIX. You have i.e. fixed-length-record data, you have packed and zoned decimals and lots more. It isn't (only) that easy 1:1 translation you have from one charset to another.
I hope this helps.
bakunin
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I need a program for ascii to ebsdic conversion. If anybody can help, it'll be greatly appreciated.
Thanks. (1 Reply)
Discussion started by: er_ashu
1 Replies
2. UNIX for Dummies Questions & Answers
when i try to convert a mainframe EBCDIC file to ASCII ,i dont see correct file this is the source file
... (3 Replies)
Discussion started by: venkatvelpula
3 Replies
3. Solaris
Hi All,
I am facing EBCDIC to ASCII Binary conversion on Solaris i-series Unix system.
However this is working fine on Solaris Sparc Unix system.
Input file having EBCDIC format does not work on Solaris i-series Unix system.
Could you please tell me, what will be the root cause for same? (14 Replies)
Discussion started by: amodkavi
14 Replies
4. Shell Programming and Scripting
Hi,
we have source file with EBCDIC format(Main Frame files) where we receving from source system.
I would like to convert the EBCDIC format file to unix systemformat(ex: .csv,txt )
I have wrote script like:
dd if=<SRCPATH>yyy.xxx.RB065 of=<SRCPATH>/output.csv ibs=800 cbs=80... (8 Replies)
Discussion started by: koti_rama
8 Replies
5. UNIX for Advanced & Expert Users
Hi,
I want to convert ebcdic values to ascii values. Are there anyany specific c++ libraries with g++ compiler, which can do it ?
gcc version 4.1.2 20080704 (Red Hat 4.1.2-54) (0 Replies)
Discussion started by: tostay2003
0 Replies
6. Programming
Hi,
I want to convert ebcdic values to ascii values. Are there anyany specific c++ libraries with g++ compiler, which can do it ?
gcc version 4.1.2 20080704 (Red Hat 4.1.2-54) (19 Replies)
Discussion started by: tostay2003
19 Replies
7. UNIX for Dummies Questions & Answers
Hi All ,
I have a mainframe file which contains the data in EBCDIC unreadable format.I have downloaded this raw unreadable file from mainframe system to windows in text format then I pushed to Unix system.Now I want to convert this file to ASCII readable format file in unix.Can anyone advise me... (2 Replies)
Discussion started by: STCET22
2 Replies
8. UNIX for Advanced & Expert Users
I have a file in my Unix ( SOLARIS ) with EBCDIC format...I want this file to read in ASCII OR unicode...Is it possible with UNIX to convert this file on ASCII OR UNICODE format from EBCDIC format?
I was searching through web and found only conversion table :(
Request Rejected
Below is... (16 Replies)
Discussion started by: joshilalit2004
16 Replies
9. Shell Programming and Scripting
Hi All ,
We have a mainframe file which is in EBCDIC format.We dont have direct access to mainframe ,client has provided us the mainframe file in unix box.The mainframe file is containing pact data(COMP1 ,COMP2 etc) which are unreadble.Can anyone suggest me how to convert this kind of ebcdic... (7 Replies)
Discussion started by: STCET22
7 Replies
10. UNIX for Advanced & Expert Users
Hi,
I have a input file which is EBCIDIC and it has packed decimals.
Can anyone help me to convert EBCIDIC file to ASCII(Need to convert even Packed decimal values also to normal format).
Thanks
swapna (12 Replies)
Discussion started by: swapna_1990
12 Replies
LEARN ABOUT HPUX
hppacsrd
hppac(3X) hppac(3X)
NAME
hppac: HPPACADDD(), HPPACCMPD(), HPPACCVAD(), HPPACCVBD(), HPPACCVDA(), HPPACCVDB(), HPPACDIVD(), HPPACLONGDIVD(), HPPACMPYD(), HPPAC-
NSLD(), HPPACSLD(), HPPACSRD(), HPPACSUBD() - HP 3000-mode packed-decimal library
SYNOPSIS
DESCRIPTION
This set of calls invokes the library functions for emulating 3000-mode (MPE V/E) packed-decimal operations. These functions are in
library which is searched when the option is used with or ld(1).
Performs packed-decimal addition.
Compares two packed-decimal numbers.
Converts an ASCII representation to packed-decimal.
Converts a binary representation to packed-decimal.
Converts a packed-decimal number to ASCII.
Converts a packed-decimal number to binary.
Performs packed-decimal division.
Performs packed-decimal division (alternate routine).
Performs packed-decimal multiplication.
Performs a packed-decimal normalizing left shift.
Performs a packed-decimal left shift.
Performs a packed-decimal right shift.
Performs packed-decimal subtraction.
For all operations, the value returned in the variable to which the compcode argument points is one of the following values of type
Result > 0 or operand1 > operand2
Result < 0 or operand1 < operand2
Result == 0 or operand1 == operand2
For all operations, the value returned in the variable to which the pacstatus argument points is one of the following values of type Their
meanings are intended to be obvious:
AUTHOR
The HPPAC library was developed by HP.
SEE ALSO
PA-RISC Systems Only hppac(3X)