DYNALLOC PARM: This option requests the dynamic allocation of SORTWK data sets. DYNALLOC=OFF can be specified to override a DYNALLOC=ON installation default. If DYNALLOC has been specified on the SORT control statement as well as in the PARM field, the PARM specification will take precedence.
ZDPRINT PARM: This option applies to the SUM, DUPKEYS SUM, and DUPKEYS AVG features. ZDPRINT specifies if positive ZD summed or averaged results are to be converted to printable numbers. ZDPRINT, the default, enables conversion to printable format. NZDPRINT prevents the conversion.
Example: //STEP1 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //SORTIN DD DSN=INPUT.FILE1,DISP=SHR // DD DSN=INPUT.FILE2,DISP=SHR //SORTOUT DD DSN=&&OUTPUT,DISP=(,PASS),UNIT=3390, // SPACE=(CYL,(5,1)),DCB=(LRECL=22) //SYSIN DD * OMIT COND=(5,1,CH,EQ,C'M') SORT FIELDS=(20,8,CH,A,10,3,FI,D) SUM FIELDS=(16,4,ZD) OPTION DYNALLOC,ZDPRINT OUTREC FIELDS=(10,3,20,8,16,4,2Z,5,1,C' SUM') //*
OMIT statement. COND specifies that input records with a character M in position 5 are to be omitted from the output data set.
SORT statement. FIELDS specifies an ascending 8-byte character control field starting at position 20 and a descending 3-byte fixed-point control field starting at position 10.
SUM statement. FIELDS specifies a 4-byte zoned-decimal summary field starting at position 16. Whenever two records with the same control fields (specified in the SORT statement) are found, their summary fields (specified in the SUM statement) are to be added and placed in one of the records, and the other record is to be deleted.
OPTION statement. DYNALLOC specifies that work data sets are to be dynamically allocated using the installation defaults for the type of device and number of devices. ZDPRINT specifies that positive ZD SUM fields are to be printable.
OUTREC statement. FIELDS specifies how the records are to be reformatted for output. The reformatted records are 22 bytes long and look as follows:
Position Content
1-3 Input positions 10 through 12
4-11 Input positions 20 through 27
12-15 Input positions 16 through 19
16-17 Zeros
18 Input position 5
19-22 The character string ‘ SUM’
EQUALS: specifies that the original sequence must be preserved.
NOEQUALS: specifies that the original sequence need not be preserved.
For sort applications, the sequence of the output records depends upon the order of:
For merge applications, the sequence of the output records depends upon the order of:
//EXEC PGM=SYNCSORT,PARM='EQUALS'
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INPUT.FILE1,DISP=SHR
// DD DSN=INPUT.FILE2,DISP=SHR
//SORTOUT DD DSN=OUTPUT.FILE,
// UNIT=3490,VOL=SER=246809,
// DISP=(NEW,KEEP)
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,20) 7
//SYSIN DD * 8
SORT FIELDS=(1,9,ZD,A,10,2,BI,A) 9
SUM FIELDS=(12,4,PD) 10
/*
VLTEST PARM: It allows you to do the following when variable-length records are processed:
A primary use of VLTEST instructs the sort/merge in the handling of “short” variable length records, i.e., records not long enough to contain all of the control fields specified in the SORT/MERGE control statement. The delivered default for VLTEST is 1.
0* No record length validity testing of variable-length records.
1 If any input record does not contain all SORT/MERGE control fields, terminate. This is the default.
2* If any input record is longer than the maximum LRECL or l2 value, terminate.
3 If either or both of the conditions in tests 1 and 2 are satisfied, terminate.
4* If any input record is longer than the output LRECL or l3 value, terminate.
5 If either or both of the conditions in test 1 or 4 are satisfied, terminate.
6* If any input record is longer than the maximum input LRECL or l2 value, or longer than the output LRECL or both, terminate.
7 If any of the conditions in test 1, 2, or 4 are satisfied, terminate.
//STEP EXEC PGM=SORT,PARM=’VLTEST=1′
VLTESTI PARM: It specifies how to process variable-length records that do not contain all specified INCLUDE or OMIT fields. VLTESTI applies to the INCLUDE and OMIT control statements as well as OUTFIL and JOINKEYS INCLUDE/OMIT processing. It does not apply to the WHEN and KEYBEGIN sub parameters of the IFTHEN parameter of the INREC, OUTREC, and OUTFIL control statements. It also does not apply to the TRLID Sub parameter of the IFTRAIL parameter of the OUTFIL control statement.
The delivered default of 0 instructs MFX to terminate if a record does not completely contain all INCLUDE or OMIT fields. A WER250A critical error message is generated to indicate this condition.
When VLTESTI=1 is specified, a record that does not completely contain all INCLUDE/OMIT fields is treated as having failed the comparison. MFX will omit the record if INCLUDE is being used or include the record if OMIT has been specified.
When VLTESTI=2 is specified, MFX will treat comparisons to fields not completely contained within the record as false and decide a record’s status for inclusion or omission from fields that are available. If all fields are not present, the record will be processed as having failed the comparison. MFX will omit the record if INCLUDE is being used or include the record if OMIT has been specified.
//STEP EXEC PGM=SORT,PARM='VLTESTI=1'
Temporarily overrides the VSAMEMT installation option, which specifies whether DFSORT should accept an empty VSAM input data set.
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.
Note: VSAMEMT=YES can be used instead of VSAMEMT. VSAMEMT=NO can be used instead of NVSAMEMT.
//STEP EXEC PGM=SORT,PARM='VSAMEMT=YES'
PARM | Description |
DYNALLOC | Requests the dynamic allocation of work data sets. |
ZDPRINT/ NZDPRINT | Specifies whether positive summed or averaged ZD fields will be converted to a printable format |
EQUALS/ NOEQUALS | EQUALS acts to preserve the order of equal-keyed records. It is not available with PARASORT. |
VLTEST=(n/ 1 , ON /OFF /OFF4) | Indicates the type of validity testing to be done when processing variable-length records. |
VLTESTI=n/ 0 | Indicates action to be taken when a variable-length record does not contain all fields referenced by INCLUDE or OMIT processing. |
VSAMEMT= NO /YES | Specifies the processing of empty VSAM data sets provided as input to a sort, merge, or copy. |
Read JCL blogs : Click Here
SYNCSORT Manual : Click Here
A well-maintained product backlog is crucial for successful product development. It serves as a single…
Incremental value to the customer refers to the gradual delivery of small, functional parts of…
A Product Market refers to the group of potential customers who might be interested in…
The Professional Agile Leadership - Evidence-Based Management (PAL-EBM) certification offered by Scrum.org is designed for…
The Professional Agile Leadership (PAL I) certification, offered by Scrum.org, is designed to equip leaders…
Choosing the right Scrum Master Certification depends on your current experience and career goals. If…