DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
This topic has been marked "Resolved."
Author Message
Finki
Participant



Joined: 21 Dec 2020
Posts: 9
Location: Kleinblittersdorf
Points: 191

Post Posted: Tue Feb 02, 2021 7:25 am Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Parallel
OS: Windows
Additional info: Prüfen ob der richtige Daten Type vorliegt
I want to check if in a field is the correct type, so i programmed following CODE:

Code:

IF NUM(L_CHECK_NUM.S_KAPITEL)=1 THEN "NUMBER" ELSE "VarChar"


For Example i want that result:
1234 then NUMBER
abc then VarChar

but there is a misstake

010a and i get "NUMBER" as a result! Why? Where is the misstake?
What is false in my Code?
Do you have any Idea?
Finki
Participant



Joined: 21 Dec 2020
Posts: 9
Location: Kleinblittersdorf
Points: 191

Post Posted: Wed Feb 03, 2021 2:14 pm Reply with quote    Back to top    

Der Befehl war richtig, nur ich hatte die falschen Import Parameter als Definition als Integer und nicht als VarChar.
Es funktioniert nur, wenn ihr vorher alles als VARCHAR übergibt. Bei mir stand INTEGER drin und dann funzt nichts.
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: 54621
Location: Sydney, Australia
Points: 296179

Post Posted: Fri Feb 12, 2021 3:01 am Reply with quote    Back to top    

Could be a bug (but I doubt it). This will work.
Code:
If Oconv(InLink.MyString,"MCN") = InLink.MyString Then "Number" Else "VarChar"

_________________
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
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