General coding rules
See Inserting comment statements for an explanation of how to use comment statements, blank statements, and remarks. DFSORT program control statements and EXEC PARM options can also be specified together in a user-defined DD data set. See DFSPARM DD statement for special coding conventions that apply to this DD source.
All other DFSORT control statements have the same general format, shown in Figure 1. The illustrated format does not apply to control statements you supply in a parameter list. See Invoking DFSORT from a program for information on the special rules that apply.
- Label Field
A label can be specified on any control statement in SYSIN or SORTCNTL. A label is never required. If present, a label must begin in column 1 with any character other than a blank or asterisk (*). A label can be 1 to 70 characters and ends when a blank character is found. Any character can be used in a label. A label followed only by blanks is printed but otherwise not processed.
Labels cannot be specified in the parameter list, in DFSPARM or in continuation lines.
To skip the label, specify one or more blanks starting in column 1.
The following illustrates the use of control statements with and without labels:OPTION EQUALS MYSORT SORT FIELDS=(5,4,CH,A) OUTREC FIELDS=(1,20,51,30) OUT_1 OUTFIL FNAMES=OUT1,INCLUDE=(5,1,CH,EQ,C'A') OUT_2 OUTFIL FNAMES=OUT2,INCLUDE=(5,1,CH,EQ,C'B')
- Operation Field
This field can appear anywhere between column 2 and column 71 of the first line. It contains a word (for example, SORT or MERGE) that identifies the statement type to the program. In the example shown later in this section, the operation definer, SORT, is in the operation field of the sample control statement.
- Operand FieldThe operand field is composed of one or more operands separated by commas or semicolons. This field must follow the operation field, and be separated from it by at least one blank. No blanks are allowed within the parameters, but a blank is required at the end of all parameters. If the statement occupies more than one line, the operand must begin on the first line. Each operand has an operand definer, or parameter (a group of characters that identifies the operand type to DFSORT). A value or a list of values can be associated with a parameter. The five possible operand forms shown in this chapter are:
- parameter. Examples: CHALT, NOCHALT, REMOVECC
- parameter(c). Examples: DATE1(/), TIME2(:), Y2W(-)
- parameter=value. An operand shown in the form parameter=value can also be specified in the equivalent form parameter(value) or parameter=(value). Examples: AVGRLEN=100, AVGRLEN(100), and AVGRLEN=(100) are equivalent, DYNALLOC=SYSDA, DYNALLOC(SYSDA), and DYNALLOC=(SYSDA) are equivalent, SAMPLE=20, SAMPLE(20), and SAMPLE=(20) are equivalent.
- parameter=(list). An operand shown in the form parameter=(list) can also be specified in the equivalent form parameter(list). Examples: FIELDS=(21,5,CH,A) and FIELDS(21,5,CH,A) are equivalent, BUILD=(1,20,HEX) and BUILD(1,20,HEX) are equivalent.
- parameter=(value). An operand shown in the form parameter=(value) can also be specified in the equivalent form parameter(value). Examples: DATE=(4MD/) and DATE(4MD/) are equivalent, TIMENS=(12) and TIMENS(12) are equivalent, NOMATCH=(C'***') and NOMATCH(C'***') are equivalent.
The following example illustrates the parameter, parameter=value and parameter=(list) forms.
SORT EQUALS,FORMAT=CH,FIELDS=(10,30,A),STOPAFT=1000
The following example illustrates the parameter, parameter(value), parameter(list) and parameter=(value) forms.
SORT EQUALS,FORMAT(CH),FIELDS(10,30,A),STOPAFT=(1000)
The two previous SORT statements are equivalent.
- Remark Field
This field can contain any information. It is not required, but if it is present, it must be separated from the last operand field by at least one blank.
- Continuation Column (72)
Any character other than a blank in this column indicates that the present statement is continued on the next line. However, as long as the last character of the operand field on a line is a comma or semicolon or colon followed by a blank, the program assumes that the next line is a continuation line. The nonblank character in column 72 is required only when a remark field is to be continued or when an operand is broken at column 71.
- Columns 73 through 80
This field can be used for any purpose.