Hi all,
Is there any function or routine which will reverse a string?
For example abcdef has to become fedcba.
Regards
Josy
Reverse a string
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 133
- Joined: Wed Mar 05, 2003 4:19 pm
- Location: Lima - Peru. Sudamerica
- Contact:
Re: Reverse a string
Hi Josy,
I think there isn't a function in DataStage for that , but i send a code that reverse any string ...
Cad = ''
For i=1 to Len(x)
Cad = x[i,1] : Cad
Next
Ans = Cad
I hope this help.
I think there isn't a function in DataStage for that , but i send a code that reverse any string ...
Cad = ''
For i=1 to Len(x)
Cad = x[i,1] : Cad
Next
Ans = Cad
I hope this help.
Saludos,
Miguel Seclén
Lima - Peru
Miguel Seclén
Lima - Peru
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: