packed unsigned decimal

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
donny
Premium Member
Premium Member
Posts: 15
Joined: Thu Dec 15, 2005 11:45 am

packed unsigned decimal

Post by donny »

can anyone suggest me how to read a packed unsigned decimal (source comes from mainframe) in datastage using CFF stage, packed signed are working but unsigned are not, when i try to view data inside datastage from CFF stage it shows as special chars(hex chars)

help is really appreciated

thnaks a lot
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

If you verify that you have all of the following already, then you have a problem other than packed decimal. Good luck.

First and most important step: Import the copybook to the table definitions if you haven't already. If you originally set it up manually, at least save it. Open it via Table Definitions in the Repository.

On your packed decimal field, the edit row window needs to have the COBOL tab active. Edit the decimal field in question and check on the COBOL tab:

1) Sign indicator should be blank for unsigned.
2) Sign option should be blank for unsigned fields. It should already be blank if you imported the table, because the default is trailing.

FYI: The hexidecimal value of the last byte of a packed field with trailing sign will have '#C' (# is the last numeric digit of the stored value) for signed positive, '#D' for signed negative and '#F' for unsigned. Check your data source to make sure its consistent with what you expect to read with your schema.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

That's just cool, Donny. I haven't learned something new in COBOL in ages.

I found an old Merant (MicroFocus) reference for comp-6 at http://esd.netmanage.com/Documentation/ ... cgrmdf.htm. My MicroFocus reference is old and doesn't mention comp-6.

I suggest experimenting. Try what I described about changing the row attribute Signed to blank and see if DS handles the packed data correctly. If not, you'll have to get creative.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
Post Reply