JCL

OPTION control statement in SORT JCL

The OPTION control statement allows you to override some of the options available at installation time (such as EQUALS and CHECK) and to supply other optional information (such as DYNALLOC, COPY, and SKIPREC). Some of the options available on the OPTION statement are also available on the SORT or MERGE statement (such as FILSZ and SIZE). It is preferable to specify these options on the OPTION statement. 

OPTION Examples

Example – 1

      SORT FIELDS=(1,20,CH,A) 
      OPTION SIZE=50000,SKIPREC=5,EQUALS,DYNALLOC

FIELDS:  The control field begins on the first byte of each record in the input data set, is 20 bytes long, contains character data, and is to be sorted in ascending order.

SIZE: The data set to be sorted contains 50000 records.

SKIPREC:  Five records are skipped (deleted) before starting to process the input data set.

EQUALS: specifies that the original sequence need to be preserved.

NOEQUALS: specifies that the original sequence need not be preserved.

DYNALLOC: Two data sets (by default) are allocated on SYSDA (by default). The space on the data set is calculated using the SIZE value in effect.

Example – 2

     SORT FIELDS=(1,2,CH,A),CKPT
     OPTION EQUALS,NOCHALT,NOVERIFY,CHECK

CKPT: DFSORT takes checkpoints during this run.

Note: CKPT is ignored if the Blockset technique is used. If checkpoints are required, you must bypass the Blockset technique by specifying the NOBLKSET option, or by specifying installation option IGNCKPT=NO. However, functions such as OUTFIL, which are supported only by the Blockset technique, cannot be used if the Checkpoint/Restart facility is used.

CHALT: specifies that DFSORT translates character control fields and compare fields with formats CH and AQ using the alternate collating sequence.

NOCHALT: Only AQ fields are translated through the ALTSEQ translate table. If installation option CHALT=YES was specified, then NOCHALT temporarily overrides it.

VERIFY: Specifies that sequence checking is performed.

NOVERIFY: No sequence check is performed on the final output records.

CHECK:  The record count is checked at the end of program processing.

NOCHECK: Specifies that the record count should not be checked.

Example – 3

    OPTION FILSZ=50,SKIPREC=5,DYNALLOC=3390
    SORT FIELDS=(1,2,CH,A),SKIPREC=1,SIZE=200,DYNALLOC=(3380,5)

This example shows how parameters specified on the OPTION control statement override those specified on the SORT control statement, regardless of the order of the two statements.

FILSZ:  DFSORT expects 50 records on the input data set. (Note that there is a difference in meaning between FILSZ and SIZE and that the OPTION specification of FILSZ is used in place of SIZE.)

SKIPREC: DFSORT causes five records from the beginning of the input file to be skipped. (SKIPREC=1 on the SORT statement is ignored.)

DYNALLOC. DFSORT allocates two work data sets (by default) on an IBM 3390.

Example – 4

        OPTION RESINV=32000,MSGPRT=NONE,            
        MSGDDN=SORTMSGS,SORTDD=ABCD,SORTIN=MYINPUT,
        SORTOUT=MYOUTPUT,NOLIST

This example illustrates the parameters RESINV, MSGPRT, MSGDDN, SORTDD, SORTIN, SORTOUT, and NOLIST, and the actions taken when these parameters are supplied on an OPTION statement read from the SYSIN data set or the SORTCNTL data set. The parameters are recognized, but not used.

RESINV:  32000 bytes of storage are reserved for the user.

MSGPRT=NONE

The keyword is ignored, and messages are printed according to the installation default.

MSGDDN=SORTMSGS

The keyword is ignored, and all messages are written to the SYSOUT data set.

SORTDD=ABCD

The keyword is ignored, and the standard prefix SORT is used.

SORTIN=MYINPUT

The keyword is ignored, and the ddname SORTIN is used to reference the input data set.

SORTOUT=MYOUTPUT

The keyword is ignored, and the ddname SORTOUT is used to reference the output data set.

LIST: specifies that DFSORT control statements are printed to the message data set.

NOLIST: The keyword is ignored, and control statements are printed according to the installation defaults.

Example – 5

        OPTION RESINV=32000,MSGPRT=CRITICAL               
        MSGDDN=SORTMSGS,SORTDD=ABCD,SORTIN=MYINPUT,
        SORTOUT=MYOUTPUT,NOLIST

This example illustrates keywords RESINV, MSGPRT, MSGDDN, SORTDD, SORTIN, SORTOUT, and NOLIST and the actions taken when these keywords are supplied on the OPTION control statement passed by DFSPARM. These options can also be passed in an extended parameter list, but must be coded as one contiguous statement without continuation lines.

RESINV:  32000 bytes of storage are reserved for the user.

MSGPRT=CRITICAL

Only critical messages are printed on the message data set.

MSGDDN=SORTMSGS

Messages are written to the SORTMSGS data set.

SORTDD=ABCD

SORT uses ABCD as a prefix for all sort names.

SORTIN=MYINPUT

The ddname MYINPUT is used to reference the input data set.

SORTOUT=MYOUTPUT

The ddname MYOUTPUT is used to reference the output data set.

NOLIST: Control statements are not printed.

Example – 6

 SORT FIELDS=(3,4,CH,A) 
 OPTION COPY,SKIPREC=10,CKPT  
 MODS E15=(E15,1024,MODLIB),E35=(E35,1024,MODLIB)

SORT:  The sort statement is ignored because the COPY option has been specified.

COPY:  The copy processing is always done on a record-by-record basis. Each record is therefore read from SORTIN, passed to the E15 exit, passed to the E35 exit, and written to SORTOUT. (Contrast this with a sort, where all the records are read from SORTIN and passed to the E15 exit before any records are passed to the E35 exit and written to SORTOUT.)

SKIPREC:  Ten records are skipped before copying starts.

CKPT:  The checkpoint option is not used for copy applications.

Example – 7

 SORT FIELDS=(5,4,CH,A)  
 SUM FIELDS=(12,5,ZD,25,6,ZD)
 OPTION ZDPRINT

ZDPRINT: The positive summed ZD values are printable because DFSORT uses an F sign for the last digit.

NZDPRINT: means do not convert positive ZD summation results to printable numbers.

Note: ZDPRINT=YES can be used instead of ZDPRINT. ZDPRINT=NO can be used instead of NZDPRINT.

NOBLKSET: DFSORT does not use the Blockset technique for a sort or merge.

VSAMEMT: Specifies that DFSORT accepts an empty VSAM input data set and processes it as having zero records.

NVSAMEMT: Specifies that DFSORT terminates if an empty VSAM input data set is found.

VLSHRT: Specifies that DFSORT continues processing if a short control field, compare field, or summary field is found.

NOVLSHRT: Specifies that DFSORT terminates if a short control field, compare field, or summary field is found.

VLSCMP: Specifies that short variable-length compare fields are padded with binary zeros.

NOVLSCMP: Specifies that short variable-length compare fields are not padded.

VLLONG: Specifies that DFSORT truncates long variable-length output records to the LRECL of the SORTOUT or OUTFIL data set.

NOVLLONG: Specifies that DFSORT terminates if a long variable-length output record is found.

RESET: Specifies that DFSORT processes a VSAM output data set defined with REUSE as a NEW data set. The high-used RBA is reset to zero and the output data set is effectively treated as an initially empty cluster.

NORESET: Specifies that DFSORT processes a VSAM output data set defined with REUSE as a MOD data set. The high-used RBA is not reset and the output data set is effectively treated as an initially non-empty cluster.

Note: A VSAM output data set defined without REUSE is processed as a MOD data set.

Include Omit Condition: Click Here SYNCSORT Manual: Click Here

Admin

Share
Published by
Admin

Recent Posts

Increase Transparency and Collaboration Product Backlog

A well-maintained product backlog is crucial for successful product development. It serves as a single…

3 weeks ago

Product Backlog – Incremental value to the customer

Incremental value to the customer refers to the gradual delivery of small, functional parts of…

4 weeks ago

Product Market, Customer’s Desire, Need, and Challenges

A Product Market refers to the group of potential customers who might be interested in…

4 weeks ago

PAL-EBM Professional Agile Leadership – EBM Certification

The Professional Agile Leadership - Evidence-Based Management (PAL-EBM) certification offered by Scrum.org is designed for…

4 months ago

PAL I Professional Agile Leadership Certification

The Professional Agile Leadership (PAL I) certification, offered by Scrum.org, is designed to equip leaders…

4 months ago

Scrum Master Certification: CSM, PSM, SSM

Choosing the right Scrum Master Certification depends on your current experience and career goals. If…

6 months ago