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


Overriding DFSORT control statements from programs

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

You can override the control statements generated or passed by a program (for example, a COBOL SORT verb or PLISRTx routine) with DFSORT's DFSPARM data set.

For example, you could use the following to override the SORT statement generated by a COBOL SORT verb in order to use DFSORT's Year 2000 features:

//DFSPARM  DD    *
  OPTION Y2PAST=1956        * set fixed CW of 1956-2055
  SORT FIELDS=(11,6,Y2T,A,  * sort C'yymmdd' using CW
               31,10,CH,A)  * sort other key
/*
 

You can also use DFSPARM to provide different DFSORT control statements for multiple invocations of DFSORT from a program. However, the control statements must be located in temporary or permanent data sets and FREE=CLOSE must be used. Here's an example of using DFSPARM to override the control statements for a COBOL program with three SORT verbs:

//DFSPARM DD DSN=DP1,DISP=SHR,FREE=CLOSE
//DFSPARM DD DSN=DP2,DISP=SHR,FREE=CLOSE
//DFSPARM DD DSN=DP3,DISP=SHR,FREE=CLOSE
 

DP1, DP2, and DP3 can contain any DFSORT control statements you like. The statements in DP1 will be used for the first call to DFSORT, the statements in DP2 for the second and the statements in DP3 for the third.

For complete details on DFSPARM, see DFSPARM DD statement.

COBOL also offers additional methods for overriding DFSORT parameters and control statements such as SORT special registers and the IGZSRTCD data set. See your COBOL publications for details.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014