Substring function problem

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
kaushal.kumar@igate.com
Participant
Posts: 77
Joined: Tue Apr 14, 2009 4:03 am

Substring function problem

Post by kaushal.kumar@igate.com »

Hi,

I am not able to use SUBSTR(DSLink149.INTFC_FILE_CATG,1,4).it seems we don't have substring function in 8.1.
I have to take first 4 char of INTFC_FILE_CATG field in my transformer stage.
Please advice which function i can use to get first 4 char from a field .

Thanks
Kaushal
cherry
Participant
Posts: 108
Joined: Sun Jul 10, 2005 1:35 am

Post by cherry »

Try this DSLink149.INTFC_FILE_CATG[1,4]

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

Post by ray.wurlod »

Or Left(DSLink149.INTFC_FILE_CATG, 4) which is beautifully self-documenting.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
abhijain
Participant
Posts: 88
Joined: Wed Jun 13, 2007 1:10 pm
Location: India

Post by abhijain »

There is no SUBSTR function in Datastage 8.1

It is -DSLink149.INTFC_FILE_CATG[1,4]
Rgrds,
Abhi
kaushal.kumar@igate.com
Participant
Posts: 77
Joined: Tue Apr 14, 2009 4:03 am

Post by kaushal.kumar@igate.com »

thanku :)
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You could always try using the substring operators - the square brackets - like so:

DSLink149.INTFC_FILE_CATG[1,4]

:wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I think one could use

Code: Select all

DSLink149.INTFC_FILE_CATG[1,4]
, too.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I still prefer to use the Left() function, for reasons already stated.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
armekal
Premium Member
Premium Member
Posts: 1
Joined: Thu Mar 04, 2010 10:04 pm

Post by armekal »

DSLink149.INTFC_FILE_CATG[1,4]
Kind Regards

Armekal
Post Reply