new line character as deimiter

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

anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

You dont need to change delimiter. Specify colon as your delimiter. In the transformer have a constraint

Code: Select all

first_field = 'job_type' 
You are the creator of your destiny - Swami Vivekananda
raji33
Premium Member
Premium Member
Posts: 151
Joined: Thu Sep 23, 2010 9:21 pm
Location: NJ

Post by raji33 »

this problem is not resolved can any one help on this

iam getting the following error when i try to view data in the source sequential file, an i checked in the command prompt its working fine...

load_job__test..Sequential_File_0.DSLink3: ds_seqopen() - Error in filter command "tr -s '\n' ','" -
load_job__test..Sequential_File_0.DSLink3: ds_seqopen() - Error in execv() - No such file or directory



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

Post by ray.wurlod »

How do you expect the tr command to know which file to process? You have to tell it - it is not picked up from the filename property in the stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
raji33
Premium Member
Premium Member
Posts: 151
Joined: Thu Sep 23, 2010 9:21 pm
Location: NJ

Post by raji33 »

Thanks All i got to know that i missed to mention /usr/bin/tr -s '\n' ','
istead i placed just command tr -s '\n' ',' in filter command which is causing the above error.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

ray.wurlod wrote:How do you expect the tr command to know which file to process? You have to tell it - it is not picked up from the filename property in the stage.
Actually, it is. :?

While you can certainly specify it in the filter itself (and sometimes need to depending on the specific syntax) it will combine your filename and filter command automagically. Not sure exactly what it does under the covers, seems to cat your file and pipe it to the filter from what I recall.

If you put the filename in the filter, I usually just put "/dev/null" as the value in the filename property.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply