Converting Numeric into Pic Comp3 data type

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
Alagusakthivelan
Participant
Posts: 19
Joined: Tue Apr 26, 2005 11:41 pm

Converting Numeric into Pic Comp3 data type

Post by Alagusakthivelan »

Hi,

we are having a migration program where we are getting some data from MAINFRAMES and we have to load it back to MAINFRAMES again.

here we have a requirement where we have to convert Comp3 datatype to Numeric and again Convert that numeric value to Comp3 datatype.

But in DataStage 7.1 we have option for Comp3 to Numeric type convertion, but reverse function is not available, could you help us in this regard..

Thanks in advance,
sakthi
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You either need to look at the sdk routine you mentioned and write your own version that goes 'backwards' or use the CFF (Complex Flat File) stage to write out the file.

I'm guessing there will also be an EBCDIC requirement you'll need to handle and the CFF stage will do that as well, from what I recall.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Alagusakthivelan
Participant
Posts: 19
Joined: Tue Apr 26, 2005 11:41 pm

Post by Alagusakthivelan »

Hi Chulett,

Thank you very much for ur suggestion.

But the CFF stage can be used for reading purpose only, it wont allow to write into it.

"DataTypePicComp3(%CobolString%)" this sdk routine converts Comp3 data type into a numeric value, what we need is reverse process, could you send me a suggestion on how to approach that process.

Thanks

Sakthi
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I'm not at a DataStage machine right now, but think that the SDK has such a routine in there or at some time did have one. Making a COMP-3 out of an integer is not difficult, just a couple of lines of code in BASIC and use of the OCONV function and the "MB" conversion.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Alagusakthivelan wrote:But the CFF stage can be used for reading purpose only, it wont allow to write into it.
Really? Can you tell I don't use it? :lol:

That's too bad.
-craig

"You can never have too many knives" -- Logan Nine Fingers
dls
Premium Member
Premium Member
Posts: 96
Joined: Tue Sep 09, 2003 5:15 pm

Post by dls »

I would opt to do the reformatting (i.e., packed decimal --> display decimal, and vice versa) on the mainframe platform.

Is that an option for you?
Post Reply