Author |
Message |
kmare
Participant
Joined: 02 Dec 2009
Posts: 11
Location: Kothagudem
Points: 130
|
|
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 .
Any ideas is appreciated.
Thanks in advance
Kishore
|
_________________ Kishore |
|
|
 |
FranklinE

Group memberships: Premium Members
Joined: 25 Nov 2008
Posts: 732
Location: Malvern, PA
Points: 6948
|
|
|
|
|
|
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 |
|
|
 |
ray.wurlod
Participant
Group memberships: Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group
Joined: 23 Oct 2002
Posts: 54463
Location: Sydney, Australia
Points: 295352
|
|
|
|
|
|
0xff can be represented in DataStage as Char(255).
Thirty of them can be generated using
|
_________________ RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane |
|
|
 |
kmare
Participant
Joined: 02 Dec 2009
Posts: 11
Location: Kothagudem
Points: 130
|
|
|
|
|
|
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

Group memberships: Premium Members
Joined: 25 Nov 2008
Posts: 732
Location: Malvern, PA
Points: 6948
|
|
|
|
|
|
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 |
|
|
 |
kmare
Participant
Joined: 02 Dec 2009
Posts: 11
Location: Kothagudem
Points: 130
|
|
|
|
|
|
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

Group memberships: Premium Members
Joined: 25 Nov 2008
Posts: 732
Location: Malvern, PA
Points: 6948
|
|
|
|
|
|
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 |
|
|
 |
ray.wurlod
Participant
Group memberships: Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group
Joined: 23 Oct 2002
Posts: 54463
Location: Sydney, Australia
Points: 295352
|
|
|
|
|
|
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 |
|
|
 |
kmare
Participant
Joined: 02 Dec 2009
Posts: 11
Location: Kothagudem
Points: 130
|
|
|
|
|
|
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 |
|
|
 |
kmare
Participant
Joined: 02 Dec 2009
Posts: 11
Location: Kothagudem
Points: 130
|
|
|
|
|
|
Hi ,
we agreed on populating default values
Thanks for your time .
Iwill close this marking as workaround.
|
_________________ Kishore |
|
|
 |
|