I am doing a sort. My input file has a date field (mm/dd/yyyy).In the output data set i want only records where this date field is not equal to todays date. Please explain me how this can be don using a JCL.
You can use a DFSORT job like the following to do what you asked for. I assumed you 'mm/dd/yyyy' date is in positions 1-10 and your input file has RECFM=FB and LRECL=80, but the job can be changed appropriately for other positions and/or attributes.
The code you have given works fine in some cases.
My file has a record lenght of 125 and the date field which i need to compare does not start at column no:1. So i modified the code as given below
When I run with an input file having RECFM=FB and LRECL=125 and those control statements, I get RC=0 - no error message. Are you sure those are the control statements you're actually using? If so, then please post the complete output you received in //SYSOUT.