This SORT example is to add Header and Trailer to the sorted file along with the total number of records. Header –> A Name along with the current System date Trailer–> A static message along with number of input records count Example Sort Card: [crayon-5e2b499e37f37640161591/] Header1 –> It has a Static message which start from
JCL Trick to write the output file in reverse order of input using SORT. If the input file has some records in Random order ( not in sorted order) and if the out file needs to be written exactly in reverse order. This can be achieved by using the SORT Overlay along with OUTREC BUild.