Please enable JavaScript to view this site.

This program will take a string and split it into component parts using supplied delimiters. You may supply up to two split characters as this will enable both splitting the string and the removal of any character that may be present at the end of your string that you do not require.

Parameter

In

Len

Out

Len

PARM1

String

132

Part 1

132

PARM2

Split character 1

1

Part 2

132

PARM3

Split character 2

1

Part 3

132

PARM4

Split blanks [*NO] #4

 

Part 4

132

PARM5

-

 

Part 5

132

PARM6

-

 

Part 6

132

Note 1: If the String should contain two consecutive split characters then a blank parameter would be returned.

Note 2: If the input parameters should result in more than six output components only the first six will be returned.

Note 3: If your Split character 1 [PARM2] is a Blank then this program will still work but you will need to specify in PARM3 a character that will never exist in your String.

Note 4: If you only have one split character and don't want to split on blanks then currently you would need to specify in PARM3 a character that will never exist in your String. From version 6.2.82 you can specify *NO in PARM4 and this will prevent splitting on blank characters if nothing is specified in PARM3.

Scenarios

String

Split 1

Split 2

Returned

UNT+200+58375206995222'

+

'

Parm 1= UNT

Parm 2= 200

Parm 3= 58375206995222

UNT+200+58375206995222'

+


Parm 1= UNT

Parm 2= 200

Parm 3= 58375206995222’

UNT+200+583++752+069+95222'

+

'

Parm 1= UNT

Parm 2= 200

Parm 3= 583

Parm 4=

Parm 5= 752

Parm 6= 069