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

Example 4

A call to PLISRTD. The input is to be supplied by the PL/I routine PUTIN and the output is to be passed to the PL/I routine PUTOUT. The record to be sorted is 82 bytes varying (including the length prefix). It is to be sorted on bytes 1 through 5 of the data in ascending order, then if these fields are equal, on bytes 6 through 10 in descending order. If both these fields are the same, the order of the input is to be retained. (The EQUALS option does this.)

  call plisrtd (' SORT FIELDS=(1,5,CH,A,6,5,CH,D),EQUALS ',
                ' RECORD TYPE=V,LENGTH=(82) ',
                  0,
                  retcode,
                  putin,       /* input routine  (sort exit 15) */
                  putout);     /* output routine (sort exit 35) */

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)