Redefining the columns in the target files

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
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

Redefining the columns in the target files

Post by hitmanthesilentassasin »

Hi,

I am trying to redefine the columns in the target complex flat file stage but it is giving me the below error.
Error when checking operator: At field "XXXXX": "redefines" property cannot appear in an export schema
I am trying to write a value in comp-3 field. incase, if it is default I would want to pass character in the same file. Hence, I would want to redefine the COMP-3 filed with the field with varchar field. Seems like this is not the way to do it. Please help me find the right way to do it. I have tried searching and couldnt really find anything relevant to this.

Could you please help me?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You can't do any kind of true "redefines" as you've found. What kind of character value are you needing to pass, and what do you mean by "default" in this context?
-craig

"You can never have too many knives" -- Logan Nine Fingers
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

Post by hitmanthesilentassasin »

Thanks for the reply. I almost thought it went unanswered.

Well, all I need to do is write the data in the target file in COMP-3 format. incase, if the field has a null value then I would want to write in a character format(tried redefining, didnt work :( )
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You need to ask what is expected there when there is no value for that field. For COBOL and COMP-3 they may just want "low values", in any case there's no need to redefine anything.
-craig

"You can never have too many knives" -- Logan Nine Fingers
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

Post by hitmanthesilentassasin »

yes, thats right. they just need the low values but the issue is for null in comp-3 it would write zero's with a sign bit(like C, F or D) which they dont want. at times whenever it is null they want just zeros without the sign bit(so that they would be able to distinguish between the actual zeros and the null values).

do you know how to implement this?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So, part of the same issue you posted last month? Perhaps this might help. That or an exact search for "low values" to see if any previous conversation on the topic sheds some light on it.
-craig

"You can never have too many knives" -- Logan Nine Fingers
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

Post by hitmanthesilentassasin »

well, this is just an extension of it. I have already searched and tried the solutions provided in the earlier posts but nothing seems to be working.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Rather than repeat any or everything here, why not tell us what you've tried and why it didn't work for you? Anything come close?
-craig

"You can never have too many knives" -- Logan Nine Fingers
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

Post by hitmanthesilentassasin »

this is what I have tried:

1. tried defining \x00 as a default value when there is a null(still the sign bit remains as it is)

2. as you had suggested in one of your earlier post to concatenate the char(0) values even this doesnt work.

3. then I tried redefining the column using the complex flat file and the sequential file stage.

Nothing seems to be working as the sign bit always remains and datastage doesnt allow me to over ride it in anyways.

So, I am looking for a method where in I can override the the COMP-3 definition and write the 00's when there is null in normal ebcdic format.

Help would be very much appreciated!!!
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

Post by hitmanthesilentassasin »

We are able to find a work around. we had to use a sequential file stage(it still doesnt work with complex flat file stage).

this is the solution for the future use of the the forum users.


1.using sequential file stage defined the decimal column to null(this is not allowed in cff stage). and packed.

2. and defined as many \x00 as many number of bytes required for the column definition in the default null value.
Post Reply