IBM OS/390 User Manual

Page of 673
//MYJOB JOB ...
//SORTIT EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...
//SORTOUT DD DSN=...
//SYSIN DD *
SORT FIELDS=(5,4,CH,A)
/*
The JCL statements you will commonly need when migrating are:
JOB: Must be the first statement for a job.
EXEC: Must be the first statement for a step. Specifies the program to be
executed. For DFSORT steps, use PGM=SORT or PGM=ICEMAN.
SYSOUT DD: Defines DFSORT
s message data set. DFSORT can write
informational, error and diagnostic messages to this data set as directed.
SORTIN DD: Defines one or more input data sets for a sort or copy application.
Multiple input data sets can be specified using OS/390
s data set concatenation
facility.
SORTINnn DD: Defines a data set for a merge application. SORTIN01 through
SORTIN99 can each be used to specify a data set to be merged.
SORTOUT DD: Defines the output data set for a sort, merge or copy application.
SYSIN DD: Contains DFSORT control statements, comment statements and blank
statements.
Other JCL statements you may need when migrating are:
JOBLIB DD: Defines the library containing the DFSORT program. Used for all
steps in the job. The JOBLIB DD is only needed if the DFSORT library is not
known to the operating system.
STEPLIB DD: Defines the library containing the DFSORT program. Used for a
particular step in the job. The STEPLIB DD is only needed if the DFSORT library
is not known to the operating system.
SORTWKnn DD: Defines a work data set for a sort application. It is
recommended that you use DFSORT
s dynamic allocation facility instead of
specifying SORTWKnn DD statements. DFSORT
s shipped defaults result in the
automatic use of dynamic allocation when appropriate.
SORTDIAG DD: Forces DFSORT to print all messages and control statements in
the message data set. Only needed for diagnosing problems.
SYSUDUMP DD: Defines the data set for a dump. Only needed for diagnosing
problems.
376
VSE to OS/390 Migration Workbook