Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Programming Guide

Calling the Sort program

Example 1
Example 2
Example 3
Example 4
Example 5
Determining whether the Sort was successful
Establishing data sets for Sort
Sort work data sets
Input data set
Output data set
Checkpoint data set

When you have determined the points described above, you are in a position to write the CALL PLISRTx statement. You should do this with some care; for the entry points and arguments to use, see Table 30.

Table 30. The entry points and arguments to PLISRTx (x = A, B, C, or D)
Entry points
Arguments
PLISRTA
Sort input:  data set
Sort output:  data set
(sort statement,record statement,storage,return code
[,data set prefix,message level, sort technique])
PLISRTB
Sort input:  PL/I subroutine
Sort output:  data set
(sort statement,record statement,storage,return code,input routine
[,data set prefix,message level,sort technique])
PLISRTC
Sort input:  data set
Sort output:  PL/I subroutine
(sort statement,record statement,storage,return code,output routine
[,data set prefix,message level,sort technique])
PLISRTD
Sort input:  PL/I subroutine
Sort output:  PL/I subroutine
(sort statement,record statement,storage,return code,input routine,output routine[,data set prefix,message level,sort technique])
Sort statement
Character string expression containing the Sort program SORT statement. Describes sorting fields and format. See Specifying the sorting field.
Record statement
Character string expression containing the Sort program RECORD statement. Describes the length and record format of data. See Specifying the records to be sorted.
Storage
Fixed binary expression giving maximum amount of main storage to be used by the Sort program. Must be >88K bytes for DFSORT. See also Determining storage needed for Sort.
Return code
Fixed binary variable of precision (31,0) in which Sort places a return code when it has completed. The meaning of the return code is:
  • 0=Sort successful
  • 16=Sort failed
  • 20=Sort message data set missing
Input routine
(PLISRTB and PLISRTD only.) Name of the PL/I external or internal procedure used to supply the records for the Sort program at sort exit E15.
Output routine
(PLISRTC and PLISRTD only.) Name of the PL/I external or internal procedure to which Sort passes the sorted records at sort exit E35.
Data set prefix
Character string expression of four characters that replaces the default prefix of 'SORT' in the names of the sort data sets SORTIN, SORTOUT, SORTWKnn and SORTCNTL, if used. Thus if the argument is “TASK”, the data sets TASKIN, TASKOUT, TASKWKnn, and TASKCNTL can be used. This facility enables multiple invocations of Sort to be made in the same job step. The four characters must start with an alphabetic character and must not be one of the reserved names PEER, BALN, CRCX, OSCL, POLY, DIAG, SYSC, or LIST. You must code a null string for this argument if you require either of the following arguments but do not require this argument.
Message level
Character string expression of two characters indicating how Sort’s diagnostic messages are to be handled, as follows:
  • NO No messages to SYSOUT
  • AP All messages to SYSOUT
  • CP Critical messages to SYSOUT
SYSOUT will normally be allocated to the printer, hence the use of the mnemonic letter “P”. Other codes are also allowed for certain of the Sort programs. For further details on these codes, see DFSORT Application Programming Guide. You must code a null string for this argument if you require the following argument but you do not require this argument.
Sort technique
(This is not used by DFSORT; it appears for compatibility reasons only.) Character string of length 4 that indicates the type of sort to be carried out, as follows:
  • PEER Peerage sort
  • BALN Balanced
  • CRCX Criss-cross sort
  • OSCL Oscillating
  • POLY Polyphase sort
Normally the Sort program will analyze the amount of space available and choose the most effective technique without any action from you. You should use this argument only as a bypass for sorting problems or when you are certain that performance could be improved by another technique. See DFSORT Application Programming Guide for further information.

The examples below indicate the form that the CALL PLISRTx statement normally takes.


Terms of use | Feedback

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