I have Date of birth in filed position 20:8, and effective date field in position 30:8 both are in yyyymmdd format. My requirement is that check the effective date field value, whether it is in range of current year Date of birth to (current year date of birth - 12 months).
For example DOB having value 20071231, we have to check the Effective date field is in range of 20081231 to 20091231.
Help me to write sort card for this.
Your description is rather unclear. Please show an example of the records in the input file for various combinations of the two date fields and what you expect for output. Give the RECFM and LRECL of the input file.
Is the range you want to use DOB yyyymmdd to DOB zzzzmmdd where zzzz=yyyy+1 or is it something else? Please be specific.
Hi Frank Yaeger,
Here are some sample input
DOB EFF. dt
out put file will have only rec1, rec3.
Becoz incase of Rec1 the Eff. dt 20091001 is in the range of 20081231 to 20091231 and
in case of Rec3 the Eff.dt 20081201 in the range of 20080101 to 20090101.
The file having LRECL= 40. dob is in position 20:8 and eff.dt in position 30:8.
I hope this will give you clear picture about my requirement
On what basis you are checking the effective date between the dates you have mentioned?
I beleive, for first record, DOB is 20071231(YYYYMMDD) so you are checking between 20081231(YYYY+1 and MMDD of DOB) and 20091231(YYYY+2 and MMDD of DOB). That means, you are checking Effective Date between YYYY+1 (of DOB) and YYYY+2 (of DOB) dates. is this correct?
If you are expecting correct reply, explain all the conditions properly. Above is my guess, others may have some other guess also. so, please try to explain everything clearly.