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


Writing the macro instruction

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

When writing the LINK, ATTACH, or XCTL macro instruction using the 64-bit parameter list, you must:
  • Specify SORT64 (the entry point) in the EP parameter of the instruction. (This applies to sort, merge, and copy applications.)
  • Load the address of the pointer to the parameter list into 64-bit register 1 or pass it in the MF parameter of the instruction. The parameter list can be above or below the bar.

When writing the LINK, ATTACH, or XCTL macro instruction using the extended or 24-bit parameter list, you must:

  • Specify SORT (the entry point) in the EP parameter of the instruction. (This applies to sort, merge, and copy applications.)
  • Load the address of the pointer to the parameter list into register 1 or pass it in the MF parameter of the instruction. The parameter list must be below the bar.
Note: If you are using ATTACH, you might also need the ECB parameter.

If you provide an E15 user exit routine address in the parameter list, DFSORT ignores the SORTIN data set; your E15 routine must pass all input records to DFSORT. The same applies to a merge if you specify an E32 routine address. This means that your routine must issue a return code of 12 (insert record) until the input data set is complete, and then a return code of 8 ("do not return").

DFSORT ignores the SORTOUT data set if you provide an E35 routine address in the parameter list. Unless you use OUTFIL processing, your routine is then responsible for disposing of all output records. It must issue a return code of 4 (delete record) for each record in the output data set. When the program has deleted all the records, your routine issues a return code of 8 ("do not return").

When DFSORT is done, it passes control to the routine that invoked it.

When a single task attaches two or more program applications, you must modify the standard ddnames so that they are unique. For ways of doing this, and for the rules of override, see Specification/override of DFSORT options.

If you ATTACH more than one DFSORT application from the same program, you must wait for each to complete before attaching the next unless DFSORT and your user exits are installed re-entrant.

When you initiate DFSORT via XCTL, you must give special consideration to the area where the parameter list, address list, optional parameters, and modification routines (if any) are stored. This information must not reside in the module that issues the XCTL because the module is overlaid by DFSORT.

There are two ways to overcome this problem. First, the control information can reside in a task that attaches the module that issues the XCTL. Second, the module issuing the XCTL can first issue a GETMAIN macro instruction and place the control information in the main storage area it obtains. This area is not overlaid when the XCTL is issued. The address of the control information in the area must be passed to DFSORT in general register 1.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014