Regarding content validation

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
veera24
Premium Member
Premium Member
Posts: 150
Joined: Thu Feb 07, 2008 9:37 pm
Location: NewYork

Regarding content validation

Post by veera24 »

hi all,
one of my column values containin hyphen(-) in it.
for ex the input seems like 1200-12,563467-093,3789652-02.
In this scenario am in need of the value before the hyphen only and meanwhile the number of digits before the hyphen will greatly vary.Can any one help me to how to get the required value?

Thanks in advance,
veera.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

Field(InLink.TheString, "-", 1, 1)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
veera24
Premium Member
Premium Member
Posts: 150
Joined: Thu Feb 07, 2008 9:37 pm
Location: NewYork

Regarding contant validation

Post by veera24 »

ray.wurlod wrote:

Code: Select all

Field(InLink.TheString, "-", 1, 1)
...
hi am having policy_no a a column. In this column only am havin hyphens. could u pls explain in detail how to implement it..

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

Post by ray.wurlod »

Code: Select all

Field(InLink.policy_no, "-", 1, 1)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
veera24
Premium Member
Premium Member
Posts: 150
Joined: Thu Feb 07, 2008 9:37 pm
Location: NewYork

Regarding content validation

Post by veera24 »

ray.wurlod wrote:

Code: Select all

Field(InLink.policy_no, "-", 1, 1)
...
hi,
could u pls explain how it will work?i mean can u gimme the logic behind it..

Thanks in advance.....
veera24
Premium Member
Premium Member
Posts: 150
Joined: Thu Feb 07, 2008 9:37 pm
Location: NewYork

Re: Regarding contant validation

Post by veera24 »

veera24 wrote:
ray.wurlod wrote:

Code: Select all

Field(InLink.TheString, "-", 1, 1)
...
hi am having policy_no a a column. In this column only am havin hyphens. could u pls explain in detail how to implement it..

Thanks in advance.......
hi
will this logic work if the policy_no not havin hypthen in it. because am having that also.

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

Post by ray.wurlod »

Why did you not mention that fact in your original specification?!!

Would it have been so hard for you to try it, rather than ask?

In this case you are lucky, the function will return the entire input string if it contains no delimiter character.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply