Page 1 of 2

Decimal to COMP3

Posted: Sat Oct 28, 2006 10:55 am
by goriparthi
Hi Guys,


I have a requirement to convert decimal values to comp3 and send them to mainframes, i browsed through and couldnt find the solution any where there are previous topics on this but nothing got resolved in them ,

Can anyone please help me if they have done the same thing earlier it would me very helpful to me.


Thanks
Raj

Posted: Mon Oct 30, 2006 8:15 am
by goriparthi
Hi Guys,

Can anyone share their experience in this issue.



Thanks
Raj

Posted: Mon Oct 30, 2006 9:22 am
by Krazykoolrohit
If you just pass the decimal into comp-3 field in the mainframe table, what error does it give?

DECIMAL TO COMP3

Posted: Mon Oct 30, 2006 9:27 am
by goriparthi
Hi,

In my case i just need to give a feed to mainframes in a sequential file from our datawarehouse.So i need to convert this from a decimal to comp3 and give that value in a sequential file.


Thanks
Raj




Krazykoolrohit wrote:If you just pass the decimal into comp-3 field in the mainframe table, what error does it give?

Posted: Mon Oct 30, 2006 9:29 am
by Krazykoolrohit
can you post an example for the conversion? your decimal value and the corresponding COMP3 value you expect it to get.

Posted: Mon Oct 30, 2006 9:32 am
by chulett
Typical flat file interfaces don't put the onus of COMP-3 creation on the file creator. If I was in your shoes I'd push back on the requirement, insist on sending everything in 'display' format and put the burden of the COMP-3 conversion back on the target system where it is fairly trivial for them to do.

Posted: Mon Oct 30, 2006 3:42 pm
by clshore
I agree that you should push back.
But if you do have to create COMP-3, it's not really that bad (I've done it).

Let us know.

Carter

DECIMAL TO COMP3

Posted: Mon Oct 30, 2006 7:24 pm
by goriparthi
Hi Carter,

Thanks a lot for your reply, Can you please help me out in this .I am desperatley looking for this solution,your response is highly appreciated.


Thanks
Raj.



clshore wrote:I agree that you should push back.
But if you do have to create COMP-3, it's not really that bad (I've done it).

Let us know.

Carter

Posted: Tue Oct 31, 2006 4:02 am
by thurmy34
Hi

You may start with the DataTypePicComp3 routine in routine/sdk/data type.
It convert comp-3 to integer but it will be a start.

Decimal to COMP3

Posted: Tue Jan 23, 2007 1:41 pm
by pnetti
I have a requirement to create COMP3 fields in a DataStage Server job. The files need to be sent to the mainframe for processing.

Is there a way to create a COMP3 field in a server job, then transmit it to the mainframe? It sounds like its possible base on the dsxchange entry but I cant figure how its done.

Posted: Tue Jan 23, 2007 1:56 pm
by DSguru2B
These decimal fields, are they signed. I mean, do you need to convert them to PicS9 or just comp3?

Posted: Wed Jan 24, 2007 3:18 am
by thurmy34
Hi
Do you try to write in a CFF stage ?
I don't do it myself but maybe it will transfrom your data to the copybook format.

Decimal to COMP3 - CFF Test

Posted: Wed Jan 24, 2007 2:09 pm
by pnetti
I tried this but the CFF stage does not support Stream Input links. It appears that is only accepts output links (reads data ).

Does anyone have any other suggestions, other than creating mainframe programs to pack data.

Posted: Wed Jan 24, 2007 3:09 pm
by DSguru2B
You can probably write a routine. But is it just comp3 or signed decimal (PicS9)?

Decimal to COMP3

Posted: Thu Jan 25, 2007 11:20 am
by pnetti
I will need to convert several numeric data types. My target is the mainframe. I will be creating files using DataStage server for use on an IBM mainframe.

That means I would need the ability to conver numbers to:
PIC S9(9)V99.
PIC S9(9)V99 COMP3.

And others possibly.

In the end the file needs to be in EBCDIC so the ASCII to EBCDIC translation will need to happen on the DataStage server also.