Hi Everybody,
I want to cut up a string displayed in 38 characters into three parts
8,10 and 10
what i can use as transformations to do this
Thank you very much.
cut up string
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard.
8 + 10 + 10 is only 28; what do you want to do with the other ten characters?
You can use the Left(string,n) function to get the leftmost n characters from a string, the Right(string,n) function to get the rightmost n characters from a string, and Substrings(string,start,length) or - equivalently - string[start,length] to extract an arbitrary substring.
8 + 10 + 10 is only 28; what do you want to do with the other ten characters?
You can use the Left(string,n) function to get the leftmost n characters from a string, the Right(string,n) function to get the rightmost n characters from a string, and Substrings(string,start,length) or - equivalently - string[start,length] to extract an arbitrary substring.
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.
-
- Participant
- Posts: 5
- Joined: Thu Oct 04, 2007 12:46 am
Sorry 8,10,10 and 10 characters
I try the syntax string [ [ start, ] length ]
but i receive an error:
Compiling: Source = 'RT_BP15/JOB.427335405.DT.1452632587.TRANS1', Object = 'RT_BP15.O/JOB.427335405.DT.1452632587.TRANS1'
**********************************************************************************************************************
WARNING: Variable 'substring' never assigned a value.
Compilation Complete.
(Simulation1.Transformer_4)
I try the syntax string [ [ start, ] length ]
but i receive an error:
Compiling: Source = 'RT_BP15/JOB.427335405.DT.1452632587.TRANS1', Object = 'RT_BP15.O/JOB.427335405.DT.1452632587.TRANS1'
**********************************************************************************************************************
WARNING: Variable 'substring' never assigned a value.
Compilation Complete.
(Simulation1.Transformer_4)
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Check your syntax:
Code: Select all
string [ start, length ]
ziedkhouja wrote: I try the syntax string [ [ start, ] length ]
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: