Special Characters In Stage Variables.

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
sudhakar_viswa
Participant
Posts: 85
Joined: Fri Nov 18, 2005 5:35 am

Re: Special Characters In Stage Variables.

Post by sudhakar_viswa »

Hi,

What is the Special Character there.

Thanks & Regards,
Sudhakar
i need to know datastage
kondeti
Premium Member
Premium Member
Posts: 67
Joined: Sat Mar 04, 2006 11:38 am

Post by kondeti »

I can't copy that symbol. But it is Concatenated with 2 vertical boxes.
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Re: Special Characters In Stage Variables.

Post by asorrell »

kondeti wrote: IF (specialcharacter) IsNotNull (LNK_TstData.METHOD_ID) And (Len (Trim (LNK_TstData.METHOD_ID)) <> 0) (specialcharacter) THEN (specialcharacter) IF Len(LNK_TstData.METHOD_ID) > 80 (specialcharacter) THEN 'Field METHOD_ID Is too large' ELSE '0' ELSE 'Mandatory field METHOD_ID contains NULL'
After looking at the "special character" in your statement - it seems that those are carriage returns in the statement to add some formatting. Which would make it look like this if you clicked multi-line editing.

Code: Select all

IF
IsNotNull (LNK_TstData.METHOD_ID) And (Len (Trim (LNK_TstData.METHOD_ID)) <> 0)
THEN
IF Len(LNK_TstData.METHOD_ID) > 80
THEN 'Field METHOD_ID Is too large' ELSE '0' ELSE 'Mandatory field METHOD_ID contains NULL' 
You should be able to delete the carriage returns and not have any effect on the statement.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
kondeti
Premium Member
Premium Member
Posts: 67
Joined: Sat Mar 04, 2006 11:38 am

Post by kondeti »

Code is in production. Just want to understand whether this special character is causing the NULL value ? Can you please share your thoughts? Thank you.
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

kondeti wrote:Just want to understand whether this special character is causing the NULL value?
No - if it is a carriage return it isn't causing the NULL - its just for formatting. I'm not certain about the logic in the IF statement, it looks a bit suspect, but that is hard to diagnose without understanding more of the application.

Can you post the follwing?

1) exact error message (Cut and Paste)
2) datatype of the variable involved? Is it a CHAR field?
3) exact text of line(s) affecting that variable in the transformer.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
Post Reply