Dick described one correct approach. A DFSORT JOINKEYS job might be another way to do it. If you need more specific help with this, you need to provide more information.
Show an example of the records in each input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files.
Also, run this job and show the //SYSOUT messages you receive, so I can see what level you're at:
Thanks for the feedback Lads. I was originally playing around with SYMNAMES but I could only manage to get the system date into a useable symbol, I couldn’t get my ‘external’ date from the PDS into a symbol.
I have a PDS: MY.PDS(BUSDAY) which contains the following 10 byte date string: 31/03/2011 (DD/MM/CCYY).
My sort file has an 8 byte date field in the format CCYYMMDD starting in position 372. I want to omit records from the sort file whose dates are less than the date stored in: MY.PDS(BUSDAY).