Thank you David and Ben.

I've tried using the below in DTL but it throws the compilation error.

$piece(Str,",",1,*-1)

(Transform+103) #1054: Invalid expression : 'patAdr22=..Piece(patAdr2,,1,*-1)' :

Is it that it should work fine when I write an ObjectScript function and call it from DTL ?

Also, I tried with: 

patAdr22=..Piece(patAdr2,,1,..Length(patAdr2))

patAdr22=..Piece(patAdr2,,1,..Length(patAdr2)-1)

But no luck.