Wrong Documentation in DS help ??

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
psluser
Premium Member
Premium Member
Posts: 39
Joined: Tue Apr 22, 2008 7:00 am
Location: Pune, India

Wrong Documentation in DS help ??

Post by psluser »

hi,

I was working with DS field function and referred documentation in DS Help for that. It says that if delimiter is not present then a zero length string is returned:
In the following example SubString is set to "" since the delimiter "/" does not appear in the string.

MyString = "London+0171+NW2+AZ"
SubString = Field(Mystring, "/", 1) ;* returns ""
But when I created some jobs with field function, it returned me the complete string for cases where delimiter is not present!

Is there some error in my implementation or field function works that way only and documentation is flawed? if documentation is indeed flawed then are there many other cases where it is so and how much can we rely on documentation then?

Please advise.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Test a bit further, and find that the documentation is incomplete rather than wrong. It should include "if the field number is greater than 1".
Field(Mystring, "/", 1) ;* returns the entire string.
Field(Mystring, "/", 2) ;* returns "".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
psluser
Premium Member
Premium Member
Posts: 39
Joined: Tue Apr 22, 2008 7:00 am
Location: Pune, India

Post by psluser »

Is it just an isolated case, or there may be other functions also out there whose behaviour might differ from whats stated in documentation. If anybody has come across such functions then please share.
Post Reply