Rational Developer for System z
PL/I for Windows, Version 8.0, Programming Guide

PLISRT examples

The following examples indicate commonly used forms of calls to PLISRTx.

Example 1

A call to PLISRTA sorting 80-byte records from SORTIN to SORTOUT, and a return code, RETCODE, declared as FIXED BINARY (31,0).

  call plisrta (' SORT FIELDS=(1,80,CH,A) ',
                ' RECORD TYPE=F,LENGTH=(80) ',
                  0,
                  retcode);

Example 2

This example is the same as example 1 but the sort is to be undertaken on two fields. First, bytes 1 to 10 which are characters, and then, if these are equal, bytes 11 and 12 which contain a binary field. Both fields are to be sorted in ascending order.

  call plisrta (' SORT FIELD =(1,10,CH,A,11,2,BI,A) ',
                ' RECORD TYPE=F,LENGTH=(80) ',
                  0,
                  retcode);

Example 3

A call to PLISRTB. The input is to be passed to sort by the PL/I routine PUTIN, the sort is to be carried out on characters 1 to 10 of an 80 byte fixed-length record. Other information as above.

  call plisrtb (' SORT FIELDS=(1,10,CH,A) ',
                ' RECORD TYPE=F,LENGTH=(80) ',
                  0,
                  retcode,
                  putin);
Rational Developer for System z
PL/I for Windows, Version 8.0, Programming Guide