Operands, Return codes, Example – IBM SC34-5764-01 User Manual

Page 275: Note, Split, Strip, Split strip

Advertising
background image

SORT

*

num

A

D

1

fromcol
tocol

SORT sorts the lines from the current line on down.

Operands

*

specifies that all the lines from the current line to the end of the file are sorted.

num

specifies that the lines from the current line for the value of num are sorted.

A

specifies that the lines are sorted in ascending order. (This is the default.)

D

specifies that the lines are sorted in descending order.

fromcol

specifies that the lines are sorted on data beginning in this column. If you do not specify fromcol tocol,
sorting begins at the first column.

tocol

specifies that the lines are sorted on data ending in this column.

Return Codes

0

Normal return

202

Invalid operand

229

Number out of range

Example

'SORT * A 5 10'

This example sorts all lines in the file from the current line down and is sorted on columns 5 to 10.

Note

If you sort a large number of lines, the sort will work very slowly.

SPLIT

SPLIT

SPLIT splits a line into two lines.

Return Codes

0

Normal return

210

Request failed

Example

'SPLIT'

This example splits the line, that the cursor is on, into two lines. One line contains all the text on that line
to the left of the cursor and the line following contains the remaining text (under and to the right of the
cursor).

STRIP

Text Editor

Chapter 18. REXX/CICS Text Editor

253

Advertising