UNSTRING performance issue
- From: "Chris" <ctaliercio@xxxxxxxxx>
- Date: 29 Nov 2005 06:58:59 -0800
Given a delimited string of variable length (string-variable), suppose
you are interested in the nth value in the string.
I'm currently using the following solution:
MOVE "," TO delimiter-variable
MOVE 1 TO string-pointer
PERFORM n TIMES
UNSTRING
string-variable DELIMITED BY delimiter-variable
INTO
string-field
WITH POINTER
string-pointer
ON OVERFLOW
SET unstring-error TO TRUE
EXIT PERFORM
END-UNSTRING
END-PERFORM
Obviously, the larger the string, the slower the performance of this
command.
I'm wondering if there is a faster way to do this that I am as yet
unaware of?
Any thoughts/ideas are welcome.
Thanks in advance,
Chris
.
- Follow-Ups:
- Re: UNSTRING performance issue
- From: Richard
- Re: UNSTRING performance issue
- From: Rick Smith
- Re: UNSTRING performance issue
- From:
- Re: UNSTRING performance issue
- From: Howard Brazee
- Re: UNSTRING performance issue
- Prev by Date: Re: Next generation COBOL?
- Next by Date: Re: Making money from Java
- Previous by thread: Re: OO Factory(1)
- Next by thread: Re: UNSTRING performance issue
- Index(es):
Relevant Pages
|
|