The contents in an unsorted file can be reversed using the JCL SORT utility. This can be achieved by adding a temporary sequence number preferably after the logical file length and then trimming this sequence number using OUTREC build.

//EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*

//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=<input file>,
//        DISP=SHR
//SORTOUT  DD DSN=<output file>,
//        DISP=(NEW,CATLG,DELETE)
//SYSIN DD *
  INREC OVERLAY=(80:SEQNUM,4,ZD)
  SORT FIELDS=(80,4,CH,D)
  OUTREC BUILD=(1,80)
/*

Suppose the infile length is 80 bytes. The INREC OVERLAY adds a sequence number after 80 bytes and this sequence number is sorted in descending order. Now to eliminate this temporary sequence number, the output file is built with OUTREC BUILD with the initial file length. 

Sample Input:

DAY 1 

DAY 2

DAY 3

TOTAL DAYS - 3

Sample Output:

TOTAL DAYS - 3

DAY 3 

DAY 2

DAY 1

Suppose there are some constraints with file length or available free space in file, a workaround can be thought of by copying this input file to a temporary file with larger spaces and performing the above operation.