Packed Integer for Sequential File

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
at095nb
Participant
Posts: 9
Joined: Fri Mar 25, 2005 1:43 pm

Packed Integer for Sequential File

Post by at095nb »

My task is to extract data from DB (defined as Decimal (16,0)) and create a sequential file for mainframe. My target format is packed integer. I understand I need to do a conversion first. But how do I define packed integer in the file?
rleishman
Premium Member
Premium Member
Posts: 252
Joined: Mon Sep 19, 2005 10:28 pm
Location: Melbourne, Australia
Contact:

Post by rleishman »

In the online help, search on OCONV. Go to the Conversion Codes link and look at the MP conversion code.

It could be as simple as

Code: Select all

Oconv(LK_in.my_integer, "MP")
You would probably need to set the output type to binary with a length of the number of bytes required.

In case you hadn't guessed, I've never tried it. Good luck though.
Ross Leishman
at095nb
Participant
Posts: 9
Joined: Fri Mar 25, 2005 1:43 pm

Post by at095nb »

That was exactly what I was doing in the first place. But the result looks like this
7B8B9472
7FFF234B
7FFFC373
7FFFE69B

It's not actual pack integer. It's a text representation of it.
rleishman
Premium Member
Premium Member
Posts: 252
Joined: Mon Sep 19, 2005 10:28 pm
Location: Melbourne, Australia
Contact:

Post by rleishman »

Are you certain you set the output type to Binary?

Also, make sure you summarise everything you have already tried when you post a question. That way we don't waste our time and you don't have to go through the same solutions one-by-one again.
Ross Leishman
Post Reply