sequential File
Moderators: chulett, rschirm, roy
sequential File
hi,
i have a issue here..i need a sequential file formt like
|513533202005135|03/16/2007|10|M|02/19/2007|01/01/1900|1|
so what i gave in proerty is s delimiter as | and the quote character as 000 but i am having error in the records having hex00 added to it..is there any other property that i can set so that i can have no hexa character in there records it should just the fields delimted by |..Pls help me out...
i have a issue here..i need a sequential file formt like
|513533202005135|03/16/2007|10|M|02/19/2007|01/01/1900|1|
so what i gave in proerty is s delimiter as | and the quote character as 000 but i am having error in the records having hex00 added to it..is there any other property that i can set so that i can have no hexa character in there records it should just the fields delimted by |..Pls help me out...
RK
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
cat filename1.txt | tr '\x00' '' > filename2.txtray.wurlod wrote:Use a Filter to pre-process the file to remove the \x00 characters, perhaps using a tr command. The Sequential File stage reads stdout of the filter command. ...
I gave this command as after job subroutine but it is gving me the error..but when i do the same command in my command prompt it works...Pls help me out...
RK
What error message are you getting? Remember, your current working directory will be that of the DataStage project, you should always use fully qualified pathnames....but it is gving me the error..
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
the error am getting isArndW wrote:What error message are you getting? Remember, your current working directory will be that of the DataStage project, you should always use fully ......but it is gving me the error..
Output from command ====>
tr: Error 0
yes am using fully qualified path names..
thanks,
RK
Does your job have the path to the "tr" executable set? Check the 1st line of the log file where it shows the environment and compare it to the environment setting for your terminal command session.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Why after-job?!!! I suggested a Filter command in a Sequential File stage. The command should be tr -d \x00 filename if reading the file.
If you must use an after-job subroutine, then you need to specify (redirect) input and output file names for the tr -d command.
If you must use an after-job subroutine, then you need to specify (redirect) input and output file names for the tr -d command.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
i tried running the same command in my project directory where my dsjob run..the command works..but i don't know why it is not working through DS....ArndW wrote:Does your job have the path to the "tr" executable set? Check the 1st line of the log file where it shows the environment and compare it to the environment setting for your terminal command session. ...
RK
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
or use an absolute path to your tr command in your job to see if that works.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Please advise:
(a) exactly what tr command was executed (and specifically what quote characters were involved)
(b) the exact error message that was generated by the tr command
(c) what version of the operating system you are using (uname -a)
(a) exactly what tr command was executed (and specifically what quote characters were involved)
(b) the exact error message that was generated by the tr command
(c) what version of the operating system you are using (uname -a)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod wrote:Please advise:
(a) exactly what tr command was executed (and specifically what quote characters were involved)
(b) the exact error message that was generated by the tr command
(c) wha ...
a)
The tr command was tr '\x00' ''
b)error in executing the command Output from command ====>
tr: Error 0
c)the version of my os is AIX 5.3
Pls let me know if you need any more info....
Thanks,
RK
Are you executing tr as UNIX shell in the after-job? Also, what happens if you change your command to read:
Code: Select all
cat filename1.txt | tr \'\x00\' \'\' > filename2.txt
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>