I am reading this file with Execute command and passing it to Loop Activity,now loop finds another comma at the end and iterates again with null value. now I need your help to remove the very last comma to avoid the extra iteration.
How are you creating the text file? The loop is doing the right thing as the trailing comma denotes a null or empty field at the end. Best to not generate one there in the first place.
-craig
"You can never have too many knives" -- Logan Nine Fingers
Thanks Craig,
I am generating that file in another parallel job and using a sequential stage for that. I know every thing is working as they are supposed to. As i am using Execute command to read the file,Can we use any Unix command to strip off the last comma.
StartLoop_BusUnits_List.$Counter <>'' Or StartLoop_BusUnits_List.$Counter<>' ' Or StartLoop_BusUnits_List.$Counter<>',' Or StartLoop_BusUnits_List.$Counter <> @NULL
Hi Craig
I tried to check with IsNull but that failed, I don't know why, Finally I Used Len($Counter) > 2 in the Nested condition, Which resolved my issue.
My 'IsNull' advice was generic, strictly meant as an example of how to test for null and not meant to be applied directly to this problem. It seemed pretty obvious to me that one would need to 'not' it in this context. Ah, well... c'est la guerre.
-craig
"You can never have too many knives" -- Logan Nine Fingers
chulett wrote:How are you creating the text file? The loop is doing the right thing as the trailing comma denotes a null or empty field at the end. Best to not generate one there in the first place. ...
run fillowing command to put the out put in a single line and remove the last comma
ls *FILE_PATTERN| awk '{ ORS=","; print; }'|sed '$s/,$//g'