Hi All,
We have a file with records as below
ABC_123_DATA_RRR_TTT_OOO
ZXC_123_DATA_SSS_PPP_LLL
I want to fetch the all the data after 3rd delimiter
FOR EX: final output should be
RRR_TTT_OOO
SSS_PPP_LLL
Can you please help me on this
Field seperator
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 104
- Joined: Thu Jul 12, 2007 11:32 pm
- Location: Canada
Field seperator
Thanks
Aditya Kutcharlapati
Aditya Kutcharlapati
-
- Premium Member
- Posts: 104
- Joined: Thu Jul 12, 2007 11:32 pm
- Location: Canada
FYI, the use of Index() is unnecessary as Field() supports not only a start field but optionally how many to return... 1 is the default. Just make sure when you add it that the "how many" value is high enough. I tend to use 99 even if I know there could only be a handful. Makes what is going on more obvious IMHO.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Yeah, the post is resolved, but i usually design my jobs to minimize number of Transformer stages ( a throw back to the past i guess ) - So i would have just read from the sequential file , and used a copy stage to get only the columns after the 3rd position. Or read the whole file as a string and column import after column 3. Or even use a Filter Command like awk to extract anything after the 3rd column and use that filter in the Sequential file stage.