unpacking packed data

[login to unmask email]

unpacking packed data
Hi Listers ,
Is there any clever way to unpack the packed decimals ( comp-3 ) into
simple form like pic -9999.99 if the packed data
are to be read from a file and unpacked written to a second file.
Apolozise for posting a non db2 related question , but I would appreciate
if I can get some help on it.

regards, ajay





********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please
notify us immediately at [login to unmask email] and delete this E-mail
from your system. Thank you.
It is possible for data transmitted by email to be deliberately or
accidentally corrupted or intercepted. For this reason, where the
communication is by email, the Bank of Ireland Group does not accept
any responsibility for any breach of confidence which may arise
through the use of this medium.
This footnote also confirms that this email message has been swept
for the presence of known computer viruses.
********************************************************************



Chuck Gross

Re: unpacking packed data
(in response to Ajay.Gupta@BOIMAIL.COM)
Should be as simple as writing a program to read the input file
containing packed fields, moving the packed fields of the input record
to fields in the output record that are defined as zoned decimal, and
write the output records to the new file.


Warm Regards,
Chuck Gross
Director of Database Services
MillenniuM Information Systems
Phone: 703-526-4888
Cell: 614-323-4279
Email: [login to unmask email]

MillenniuM Information Systems
Proprietary and Confidential
Not For Release Without Approval


-----Original Message-----
From: [login to unmask email] [mailto:[login to unmask email]
Sent: Wednesday, January 09, 2002 12:45 PM
To: [login to unmask email]
Subject: unpacking packed data

Hi Listers ,
Is there any clever way to unpack the packed decimals ( comp-3 ) into
simple form like pic -9999.99 if the packed data
are to be read from a file and unpacked written to a second file.
Apolozise for posting a non db2 related question , but I would
appreciate
if I can get some help on it.

regards, ajay





********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please
notify us immediately at [login to unmask email] and delete this E-mail
from your system. Thank you.
It is possible for data transmitted by email to be deliberately or
accidentally corrupted or intercepted. For this reason, where the
communication is by email, the Bank of Ireland Group does not accept
any responsibility for any breach of confidence which may arise
through the use of this medium.
This footnote also confirms that this email message has been swept
for the presence of known computer viruses.
********************************************************************



the DB2-L webpage at http://www.ryci.com/db2-l. The owners of the list
can



Mae Bruce

Re: unpacking packed data
(in response to Chuck Gross)
We run our file thru SyncSort to accomplish this. SyncSort has options that
will unpack a field.

Mae Bruce
State of Missouri
OA/Division of Information Services
Phone: (573) 522-2489
Fax: (573) 751-3229


-----Original Message-----
From: [login to unmask email] [mailto:[login to unmask email]
Sent: Wednesday, January 09, 2002 11:45 AM
To: [login to unmask email]
Subject: unpacking packed data


Hi Listers ,
Is there any clever way to unpack the packed decimals ( comp-3 ) into
simple form like pic -9999.99 if the packed data
are to be read from a file and unpacked written to a second file.
Apolozise for posting a non db2 related question , but I would appreciate
if I can get some help on it.

regards, ajay





********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please
notify us immediately at [login to unmask email] and delete this E-mail
from your system. Thank you.
It is possible for data transmitted by email to be deliberately or
accidentally corrupted or intercepted. For this reason, where the
communication is by email, the Bank of Ireland Group does not accept
any responsibility for any breach of confidence which may arise
through the use of this medium.
This footnote also confirms that this email message has been swept
for the presence of known computer viruses.
********************************************************************








John McKown

Re: unpacking packed data
(in response to Mae Bruce)
Well, just about any language which supports packed decimal such as COBOL,
or EasyTrievePlus (from CA), or CA-EARL (if you have the "full function"
version).

You could use DF/SORT's OUTREC statement with the FIELDS= to convert from
packed decimal to zoned decimal with separate sign. For example: OUTREC
FIELDS=(1,3,PD,M25). Look in "DFSORT: Application Programming Guide" for
more on using DF/SORT for this function.

You could also use the REFORMAT function of FileAid for this function.

Personally, I am more familiar with DF/SORT and would probably use it. But
if you already have a COBOL copybook which describes the record, then using
COBOL might well be easier.


----------------------------------------------------------------------
John McKown
Applications and Solutions Team
Healthaxis



> -----Original Message-----
> From: [login to unmask email] [SMTP:[login to unmask email]
> Sent: Wednesday, January 09, 2002 11:45 AM
> To: [login to unmask email]
> Subject: unpacking packed data
>
> Hi Listers ,
> Is there any clever way to unpack the packed decimals ( comp-3 ) into
> simple form like pic -9999.99 if the packed data
> are to be read from a file and unpacked written to a second file.
> Apolozise for posting a non db2 related question , but I would appreciate
> if I can get some help on it.
>
> regards, ajay
>
>
>
>
>
> ********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please
> notify us immediately at [login to unmask email] and delete this E-mail
> from your system. Thank you.
> It is possible for data transmitted by email to be deliberately or
> accidentally corrupted or intercepted. For this reason, where the
> communication is by email, the Bank of Ireland Group does not accept
> any responsibility for any breach of confidence which may arise
> through the use of this medium.
> This footnote also confirms that this email message has been swept
> for the presence of known computer viruses.
> ********************************************************************
>
>
>
>
>



Leo Conchello

Re: unpacking packed data
(in response to John McKown)
Ajay,

If you don't have any of the tools already suggested by others in the list, you may use the FIELDS statement in the IEBGENER utility to unpack a field.

Regards,

Leo.

[login to unmask email] wrote:

> Hi Listers ,
> Is there any clever way to unpack the packed decimals ( comp-3 ) into
> simple form like pic -9999.99 if the packed data
> are to be read from a file and unpacked written to a second file.
> Apolozise for posting a non db2 related question , but I would appreciate
> if I can get some help on it.
>
> regards, ajay
>
> ********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please
> notify us immediately at [login to unmask email] and delete this E-mail
> from your system. Thank you.
> It is possible for data transmitted by email to be deliberately or
> accidentally corrupted or intercepted. For this reason, where the
> communication is by email, the Bank of Ireland Group does not accept
> any responsibility for any breach of confidence which may arise
> through the use of this medium.
> This footnote also confirms that this email message has been swept
> for the presence of known computer viruses.
> ********************************************************************
>
>
>



Gopalakrishna (CTS) Umapathy

Re: unpacking packed data
(in response to Leo Conchello)
Ajay,

Try this one.

SORT FIELDS=COPY
OUTREC FIELDS=(posn,3,PD,EDIT=(SIIII.TT),SIGNS=(,-,,)


About the SIGNS stuff, the following options are available.

SIGNS=(s1,s2,s3,s4)
s1 = leading positive sign indicator
s2 = leading negative sign indicator
s3 = trailing positive sign indicator
s4 = trailing negative sign indicator

Cheers,
Gopal.


> -----Original Message-----
> From: [login to unmask email] [SMTP:[login to unmask email]
> Sent: Wednesday, January 09, 2002 11:15 PM
> To: [login to unmask email]
> Subject: unpacking packed data
>
> Hi Listers ,
> Is there any clever way to unpack the packed decimals ( comp-3 ) into
> simple form like pic -9999.99 if the packed data
> are to be read from a file and unpacked written to a second file.
> Apolozise for posting a non db2 related question , but I would appreciate
> if I can get some help on it.
>
> regards, ajay
>
>
>
>
>
> ********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please
> notify us immediately at [login to unmask email] and delete this E-mail
> from your system. Thank you.
> It is possible for data transmitted by email to be deliberately or
> accidentally corrupted or intercepted. For this reason, where the
> communication is by email, the Bank of Ireland Group does not accept
> any responsibility for any breach of confidence which may arise
> through the use of this medium.
> This footnote also confirms that this email message has been swept
> for the presence of known computer viruses.
> ********************************************************************
>
>
>
>
>