trimming line terminator
Moderators: chulett, rschirm, roy
trimming line terminator
Hi All,
I was trying to trim line terminator that was causing my sequence to get aborted..
In sequence i am using loop through list of items.The last field is taking line terminator and causing termination...
I tried convert(@FM,",", Execute_Command.$CommandOutput)
before loop activity but it didnt work...
How to remove line terminator??
thnak you
I was trying to trim line terminator that was causing my sequence to get aborted..
In sequence i am using loop through list of items.The last field is taking line terminator and causing termination...
I tried convert(@FM,",", Execute_Command.$CommandOutput)
before loop activity but it didnt work...
How to remove line terminator??
thnak you
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Please explain what "didn't work" entails? Your first expression should have removed the terminator, but replaced it with a comma. What command are you executing?
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.
Hi ray,
basically i was reading delimited values from file to loop to perform list loop.
When it comes to last field the sequence is getting executed.
......execute_command1 --->start loop---->user variable----->execute command2 ---->stop------
The execute command 2 was getting failed because of last field because of extra termination character ...
so i added user variable activity and tried to remove the extra character of last field....
is this correct approach or i should do any thing to get my loop finish succesfully....
thank you..
basically i was reading delimited values from file to loop to perform list loop.
When it comes to last field the sequence is getting executed.
......execute_command1 --->start loop---->user variable----->execute command2 ---->stop------
The execute command 2 was getting failed because of last field because of extra termination character ...
so i added user variable activity and tried to remove the extra character of last field....
is this correct approach or i should do any thing to get my loop finish succesfully....
thank you..
Chulett,
Im my file i have like
aaa,bbb,ccc
while processing loop for values aaa,bbb it was processing good but for ccc the sequence is getting failed...
in loop iam having execute command as ...
. somescript param1 param2
the error coming was..
command : . somescript param1
reply: param2
execution failed.
What i thought was along with ccc , termination char was coming which was leading failure of sequence...
How to get rid of this??
Im my file i have like
aaa,bbb,ccc
while processing loop for values aaa,bbb it was processing good but for ccc the sequence is getting failed...
in loop iam having execute command as ...
. somescript param1 param2
the error coming was..
command : . somescript param1
reply: param2
execution failed.
What i thought was along with ccc , termination char was coming which was leading failure of sequence...
How to get rid of this??
Sorry chulett , actually i was out of my office yesterday so i couldnt post error message..
seq_xxxxxxxxxxxxx..JobControl (@yyyyyy): Executed: . script.ksh BEGIN param1 param2 param3 30 param4 param5
Reply= param6 param7 seq_xxxxxxxxxxxxx
Output from command ====>
seq_xxxxxxxxx..JobControl (@yyyyyyy): Command . did not finish OK, reply = '-1'
param5 contains values from loop....for last value in loop sequence is getting aborted..
Any suggestions please....
seq_xxxxxxxxxxxxx..JobControl (@yyyyyy): Executed: . script.ksh BEGIN param1 param2 param3 30 param4 param5
Reply= param6 param7 seq_xxxxxxxxxxxxx
Output from command ====>
seq_xxxxxxxxx..JobControl (@yyyyyyy): Command . did not finish OK, reply = '-1'
param5 contains values from loop....for last value in loop sequence is getting aborted..
Any suggestions please....
CONVERT(@FM,CHAR(10),FIELD(Execute_Command.$CommandOutput,@FM,1,DCOUNT(Execute_Command.$CommandOutput,@FM)-1))
This removes the last field then converts all field marks into char(10)
This removes the last field then converts all field marks into char(10)
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>