Create HIGH HEX value

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
kmare
Participant
Posts: 11
Joined: Wed Dec 02, 2009 3:44 am
Location: Kothagudem

Create HIGH HEX value

Post by kmare »

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 :).
Any ideas is appreciated.
Thanks in advance
Kishore
Kishore
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

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

Thirty of them can be generated using

Code: Select all

Str(Char(255),30)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kmare
Participant
Posts: 11
Joined: Wed Dec 02, 2009 3:44 am
Location: Kothagudem

Post by kmare »

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 :(

I am still trying and will update once I achieve it .
Kishore
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

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: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
kmare
Participant
Posts: 11
Joined: Wed Dec 02, 2009 3:44 am
Location: Kothagudem

Post by kmare »

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
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

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: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

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 to it. Then assemble 30 of these as you described.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kmare
Participant
Posts: 11
Joined: Wed Dec 02, 2009 3:44 am
Location: Kothagudem

Post by kmare »

Hi ,

we agreed on populating default values :lol: :lol:
Thanks for your time .
Iwill close this marking as workaround.
Kishore
Post Reply