Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu Jul 22, 2004 3:25 pm Post subject:
Programmer1,
EQUALS guarantees that the first of a series of equal-keyed records is either first-in (SORT) or from the lowest numbered SORTINnn data set (MERGE). With NOEQUALS, there is a random element to the order in which records with identical control fields will appear in the output. With or without EQUALS, MERGE preserves the order of equal-keyed records within any one data set.
When used in conjunction with SUM, EQUALS indicates which of the equal-keyed records will be preserved, containing the sum: the record occurring first in SORTIN (for a sort), or drawn from the SORTINnn data set with the lowest nn number (for a merge) will contain the totaled fields.
The EQUALS option can also be specified on the SORT/MERGE control statement. The specification on the control statement takes precedence over the specification in the PARM field.
1.C' OUTFIL FNAMES=BATCH' means write a text of OUTFIL FNAMES=BATCH
2.SEQNUM,3,ZD, means write a seqnum for a length of 3 bytes in numeric format.
3.C',STARTREC=', means write a text of ,STARTREC=
4.+1,ADD,3,8,ZD, means add +1 to the value at postion 3 which is 8 bytes long and
5.EDIT=(TTTTTTTT) means print out the result after the arthimetic operation is complete
6. C',ENDREC=00000000', means write out a text of ',endrec=00000000'
7.80:X) means pad spaces to the 80th byte.
8.SEQNUM,8,ZD means write a seqnum for a length of 8 bytes in numeric format.
9.OUTFIL FNAMES=BT,INCLUDE=(1,2,CH,EQ,C'BT') means write out all the records which have 'BT' in the first 2 bytes to the file associated to the DD name BT
10. 49X means put 49 spaces in the first 49 bytes. This is done so that endrec count is
lined up with endrec parm on the header file.
11. +1,SUB,3,8,ZD means subtract 1 from the value at postion 3 which is 8 bytes long and
12. EDIT=(TTTTTTTT) means print out the result after the arthimetic operation is complete
13. 80:X) means pad spaces to the 80th byte.
14. SEQNUM,8,ZD means write a seqnum for a length of 8 bytes in numeric format.
All times are GMT - 5 Hours Goto page Previous1, 2
Page 2 of 2
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum