Numbering sort work data sets in DD statements

Use the following information to determine the number of sort actions required by a given job:

Computing the required number of sorts for a job

Condition

Add x sorts

Total sorts for this condition

A log scan step requests a report.

1 for each report


A log scan step requests a Backout Integrity report.

1

(In addition to the sorts required for any other reports.)


A log scan step requests a Catalog Activity report.

2

(In addition to the sorts required for any other reports.)


A log scan step requests any SQL output files.

1

The product reuses the same sort for MIGRATE, UNDO, or REDO SQL.


A log scan step requests any separate DDL output files.

1

The product reuses the same sort for MIGRATE or UNDO DDL.


A log scan step creates any load files as output.

1


A log scan step requests any command files as output.

1


A job reads input from multiple Db2 log files (by using the DB2LOG keyword of the INPUT statement).

For more information, see Naming sort work data sets in DD statements.

1 might be needed


Total sort actions


As an example, assume that a job has the following conditions:

  • One log scan step that generates a Detail report for one time range

  • A second log scan step that generates a Backout Integrity report

  • UNDO SQL for a different time range

The job in this example requires the following sorts:

  • Two sorts (one for each report in the two log scan steps)

  • One additional sort because one of the reports is a Backout Integrity report

  • One sort for the SQL in the second log scan step

The total number of sorts required by this job is four. Assume that the value of the WORKNUM installation option is 2. The number of sort work data sets required is eight, and the job’s JCL must allocate them using the following DD names:

   SW01WK01
   SW01WK02
   SW02WK01
   SW02WK02
   SW03WK01
   SW03WK02
   SW04WK01
   SW04WK01

Was this page helpful? Yes No Submitting... Thank you

Comments