From: Fred Exley on
I'm looking for a substring function, or something similar, and about all I can
find is 'unstring'. Apparently even the 'EXAMINE' statement is no longer
supported.

There must be a need for a string library (i.e., length, substring, trim,
concatenate, etc.) in many business application, so it seems unbelievable these
are missing in Cobol. Or am I missing something here? thanks

-Fred


From: Michael Mattias on
"Fred Exley" <fexly221(a)msn.com> wrote in message
news:1121b5vcagem504(a)corp.supernews.com...
> I'm looking for a substring function, or something similar, and about all
I can
> find is 'unstring'. Apparently even the 'EXAMINE' statement is no longer
> supported.
>
> There must be a need for a string library (i.e., length, substring, trim,
> concatenate, etc.) in many business application, so it seems unbelievable
these
> are missing in Cobol. Or am I missing something here? thanks

What you are missing is called "reference modification"

MOVE "hello world" to source-string
MOVE Source_-tring ( 6:5) to dest-string
DISPLAY dest-string << displays 'world'

MCM






From: Richard on
> Apparently even the 'EXAMINE' statement is no longer supported.

Replaced by the much more powerful INSPECT.

> There must be a need for a string library (i.e., length, substring,
trim, concatenate, etc.)

length -> INSPECT
substring -> reference modification
concatenate -> STRING

From: Fred Exley on

"Richard" <riplin(a)Azonic.co.nz> wrote in message
news:1109439952.635595.292720(a)z14g2000cwz.googlegroups.com...
>> Apparently even the 'EXAMINE' statement is no longer supported.
>
> Replaced by the much more powerful INSPECT.
>
>> There must be a need for a string library (i.e., length, substring,
> trim, concatenate, etc.)
>
> length -> INSPECT
> substring -> reference modification
> concatenate -> STRING


Thanks much, Richard and Michael. Them thingees ought to do it! -Fred


From: William M. Klein on
FYI,
Although the other answers have provided "tools" to do what you (probably)
want, I just thought that I should add that Micro Focus *does* still support
"EXAMINE" - if the OSVS directive is turned on.

(If you mean "mainframe" by "MF" - then it probably is NOT supported - at least
none of the current mainframe compilers that I know of still support EXAMINE)

--
Bill Klein
wmklein <at> ix.netcom.com
"Fred Exley" <fexly221(a)msn.com> wrote in message
news:1121b5vcagem504(a)corp.supernews.com...
> I'm looking for a substring function, or something similar, and about all I
> can find is 'unstring'. Apparently even the 'EXAMINE' statement is no longer
> supported.
>
> There must be a need for a string library (i.e., length, substring, trim,
> concatenate, etc.) in many business application, so it seems unbelievable
> these are missing in Cobol. Or am I missing something here? thanks
>
> -Fred
>


 |  Next  |  Last
Pages: 1 2
Prev: COBOL FAQ
Next: NetExpress Cobol compiler