z/OS DFSORT Application Programming Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


SORT operator with JOINKEYS example

z/OS DFSORT Application Programming Guide
SC23-6878-00

Here is an example of using one SORT operator for a simple JOINKEYS application.

//SRTJK EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//JNA DD DSN=MY.INPUTA,DISP=SHR
//JNB DD DSN=MY.INPUTB,DISP=SHR
//OUT DD SYSOUT=*
//TOOLIN DD *
* SORT operator with JOINKEYS application.
SORT JKFROM TO(OUT) USING(CTL1)
/*
//CTL1CNTL DD *
* JOINKEYS application control statements for SORT operator.
  JOINKEYS F1=JNA,FIELDS=(5,4,A)
  JOINKEYS F2=JNB,FIELDS=(11,4,A),SORTED
  REFORMAT FIELDS=(F1:1,20,F2:5,15)
* Main task control statement for SORT operator
* (operates on joined records).
  OPTION EQUALS
  SORT FIELDS=(1,3,ZD,A)
/*

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014