## Packed Decimal

Packed Decimal
# 1
06-21-2002
Packed Decimal

How do we create a text file with COBOL "Packed Decimal" value in UNIX ?
# 2
06-21-2002
You can't do that. Well, I guess it depends on what a "text file" is. I think of a collection of lines. And each line is a collection of ascii characters followed by a new line. This defination doesn't give you enough control over the bits to handle packed decimal.

And unix does not come with and tools really intended for packed decimal. So to create a data file with packed decimal, I would write my own program. C or Perl or even COBOL might be good choices for the language. I guess that I would go with C.
 Perderabo View Public Profile for Perderabo Find all posts by Perderabo

## Urgent help needed.. C++ program to convert decimal to hexa decimal

Hi , seq can be 0...128 int windex = seq / 8; int bindex = seq % 8; unsigned char bitvalue = '\x01' << (7-bindex) ; bpv.bitmapvalue = bitvalue; This is the part of a program to convert decimal to bitmap value of hexadecimal. I want this to change to convert only to...

## Ebcidic to ASCII (Packed decimals are there)

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)

## Decimal to BCD (Binary Coded Decimal)

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Design an algorithm that accepts an input a decimal number and converts it into BCD (Binary...

## Decimal to BCD (Binary Coded Decimal)

Anybody please help me... Design an algorithm that accepts an input a decimal number and converts it into BCD (Binary Coded Decimal) representation. Also, draw its Flow Chart. This is a unix qn... plz post algorithm for that :confused:

## PERL:How to convert numeric values txt file to PACKED DECIMAL File?

Is there any way to convert numeric values txt file to PACKED DECIMAL File using PERL. Regards, Alok

## how to convert data from ASCII to Packed Decimal

Hi All, Please let me know if it is possible to convert data from ASCII to Packed Decimal through Unix? Basically we have ASCII file with numeric data we want to convert that files data to Packed decimal format to send it to main frame. Please let me know if we can do it through unix script....

## EBCDIC to ASCII conv for packed decimals.

By using dd command in Unix one can convert EBCDIC file into ASCII. It fails when it comes to having packed decimals within the EBCDIC file. The resultant of it has garbage chars. How can we have EBCDIC file convertedinto ASCII, which has packed decimal data in it? Thanks in advance.

## Convert "text" to "packed-decimal"?

Is there a way with HP-UX Release 10.20 (but going to HP-UX 11) to convert a regular "text" file to a packed data format (such as is created by a Cobol program)?