O'Reilly logo

Rexx Programmer's Reference by Howard Fosdick

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. String Manipulation

Overview

String manipulation means parsing, splicing, and pasting together character strings, sets of consecutive characters. Rexx excels at string manipulation. This is important for a wider variety of reasons than may be apparent at first. Many programming problems are readily conceived of as operations on strings. For example, building commands to issue to the operating system is a really a string-concatenation exercise. Analyzing the feedback from those commands once they are issued means text analysis and pattern matching. Much of the data formatting and reporting that IT organizations perform requires string processing. Data validation and cleansing require text analysis.

In a broad sense, many programming problems are essentially exercises in "symbol manipulation." String processing is a means to achieve generic symbol manipulation.

List processing is another example. Entire programming languages (such as LISP) have been built on the paradigm of processing lists. A list can be considered simply a group of values strung together. Manipulating character strings thus becomes a vehicle for list processing.

The applications that these techniques underlie are endless. Everything from report writing, to printing mailing labels, to editing documents, to creating scripts for systems administration, to scripts that configure the environment, rely on string manipulation.

This chapter introduces Rexx's outermost operators, functions, and pattern-matching capabilities. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required