DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
This topic is not resolved, but there is a WORKAROUND.
Author Message
kmare
Participant



Joined: 02 Dec 2009
Posts: 11
Location: Kothagudem
Points: 130

Post Posted: Fri Aug 03, 2018 3:20 am Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Parallel
OS: Unix
Dear Gurus,
I have a requirement to create a trailer record of length 30 with HIGH hex value (FF) in ebcidic format,fixed width so that mainframes can invoke it ,able to create one "FF" using Conversion("255","MX","O") in transformer and write to CFF stage / peek, however it is not tested @ mainframes,can see in peek. what I need to create is like
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" , in laymen's language 30 Fs Smile.
Any ideas is appreciated.
Thanks in advance
Kishore

_________________
Kishore
FranklinE



Group memberships:
Premium Members

Joined: 25 Nov 2008
Posts: 727
Location: Malvern, PA
Points: 6904

Post Posted: Fri Aug 03, 2018 1:06 pm Reply with quote    Back to top    

EDIT: Just to be clear, be careful in your description. You are not creating a string of 30 F characters, you are filling each byte with xFF.

You will have to experiment a bit, but you should be able to push it through.

EBCDIC/ASCII Translation Tables
https://supportline.microfocus.com/documentation/books/sx20books/cyebas.htm

Micro Focus is my first stop for COBOL and mainframe questions. The linked chart suggests that there is no "translation" to-from ASCII for xFF. However, the ISO 8859-1 character set, which we use as a our project default, defines xFF as ˙, y with umlaut.

A simple approach might be to define a column char(30), fill it with spaces, and use a convert function to make the xFF. If your CFF output is formatted to EBCDIC, it should preserve it.

_________________
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: http://www.dsxchange.com/viewtopic.php?t=143596 Using CFF FAQ: http://www.dsxchange.com/viewtopic.php?t=157872
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54431
Location: Sydney, Australia
Points: 295208

Post Posted: Sun Aug 05, 2018 5:50 pm Reply with quote    Back to top    

0xff can be represented in DataStage as Char(255).

Thirty of them can be generated using
Code:
Str(Char(255),30)

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne (especially seeking good business analysts)
Rate this response:  
Not yet rated
kmare
Participant



Joined: 02 Dec 2009
Posts: 11
Location: Kothagudem
Points: 130

Post Posted: Mon Aug 06, 2018 5:10 am Reply with quote    Back to top    

Hi Franklin,
Thanks for your inputs .
I tried as you suggested but its not working as expected.
1)stagevariable:- Space(30) or ' ' -(tried with both)
2) Convert(' ','xFF',StageVar_1).
And HEX value i see in the ebcidic file is "A7" not "FF" .

Hi Ray ,
Thanks for your input.
I tried like below
COl = Str(Char(255),30)
and write to ebcidic file and it generates HEX value "40" .

Also tried
1) StgVar :- Conversion("255","MX","O")
2)col :- StgVar:StgVar:.......(concate 30 times ) ,apparently dint worked Sad

I am still trying and will update once I achieve it .

_________________
Kishore
Rate this response:  
Not yet rated
FranklinE



Group memberships:
Premium Members

Joined: 25 Nov 2008
Posts: 727
Location: Malvern, PA
Points: 6904

Post Posted: Mon Aug 06, 2018 6:17 am Reply with quote    Back to top    

The only thing I can think of is that you are setting the char column under the control of an ASCII character set. That's why it's getting converted to xA7 or x40.

Check your project defaults. You may need to put peeks at every stage to uncover what's happening.

Good luck.

_________________
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: http://www.dsxchange.com/viewtopic.php?t=143596 Using CFF FAQ: http://www.dsxchange.com/viewtopic.php?t=157872
Rate this response:  
Not yet rated
kmare
Participant



Joined: 02 Dec 2009
Posts: 11
Location: Kothagudem
Points: 130

Post Posted: Mon Aug 06, 2018 6:48 am Reply with quote    Back to top    

Hi Franklin,
Thanks for your reply.
You are correct as we do this transformation in ASCII set up and write to EBCIDIC file using CFF stage and not sure how datastage would understand our generated values (xFF ) and writes to EBCIDIC file.

_________________
Kishore
Rate this response:  
Not yet rated
FranklinE



Group memberships:
Premium Members

Joined: 25 Nov 2008
Posts: 727
Location: Malvern, PA
Points: 6904

Post Posted: Mon Aug 06, 2018 6:53 am Reply with quote    Back to top    

You have to juggle the settings. Sometimes the two character sets, ASCII and EBCDIC, have implied conversions between them that you can't control.

If it were my job -- and that means you might not find this valuable -- I'd customize the entire job to use EBCDIC throughout. At some point, you need to force the column to have xFF values. I'm an old mainframe dog, as it were, but I don't claim to understand how character sets work in DataStage. We might both learn something here.

_________________
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: http://www.dsxchange.com/viewtopic.php?t=143596 Using CFF FAQ: http://www.dsxchange.com/viewtopic.php?t=157872
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54431
Location: Sydney, Australia
Points: 295208

Post Posted: Mon Aug 06, 2018 8:21 pm Reply with quote    Back to top    

In a server job you could use the pre-loaded system variable @IM but this is not available in parallel jobs. Try loading a stage variable with just Char(255) without applying any conversion functions ...

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne (especially seeking good business analysts)
Rate this response:  
Not yet rated
kmare
Participant



Joined: 02 Dec 2009
Posts: 11
Location: Kothagudem
Points: 130

Post Posted: Tue Aug 07, 2018 1:10 am Reply with quote    Back to top    

Thanks Ray, It gave the same out put (HEX value =40) as earlier for eithy scenarios with and with out conversion like
stgvar- char(255)
col - Str(stgvar,30)

AND
output column- char(255).

Thanks Franklin for your message.

How ever guys gave below explanation to customer, awaiting for their response.

"We have spent a few hours trying to get this to work (filling the last record with hex FF characters), but I’m afraid we are not able to do it. We are in a Unix environment, so we need to do a conversion from some ASCII flavour to EBCDIC. In order to create an FF EBCDIC character we need to use its ASCII counterpart and then do the ASCII-EBCDIC conversion. The problem however is that there is no ASCII counterpart to the EBCDIC hex FF character, so this conversion is not possible.
Can you think of an alternative so that we can create it and you can use it?

_________________
Kishore
Rate this response:  
Not yet rated
kmare
Participant



Joined: 02 Dec 2009
Posts: 11
Location: Kothagudem
Points: 130

Post Posted: Wed Aug 08, 2018 7:06 am Reply with quote    Back to top    

Hi ,

we agreed on populating default values Laughing Laughing
Thanks for your time .
Iwill close this marking as workaround.

_________________
Kishore
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours