SPLIT command
To split a character string into two or more smaller strings, use the SPLIT statement:
Syntax
SPLIT AT
INTO…..
This statement searches the character field for delimiter strings
and the parts before and after the delimiters are placed in the target fields…..
To place all fragments in different target fields, you must specify enough target fields. Otherwise, the last target field is filled with the rest of the field and still contains delimiters.
SPLIT STRING AT ‘,’ INTO P1 P2 P3 P4.
Here the string is split at ‘,’ and is put into strings p1, p2, p3, p4.
To split a character string into two or more smaller strings, use the SPLIT statement:
Syntax
SPLIT
INTO
This statement searches the character field
and the parts before and after the delimiters are placed in the target fields
To place all fragments in different target fields, you must specify enough target fields. Otherwise, the last target field is filled with the rest of the field
SPLIT STRING AT ‘,’ INTO P1 P2 P3 P4.
Here the string is split at ‘,’ and is put into strings p1, p2, p3, p4.
No comments:
Post a Comment