I'm looking for some sample code on how to find the desired record from my DB.
The program will be passed a department code and needs to return the last check# recorded for that dept. I need the record with the latest date, and then the highest check number. The DDS for my file:
A R AHREC
A AHCHK# 7 0 COLHDG('CLAIM CHECK NUMBER')
A AHCKDT 8 0 COLHDG('CHECK' 'DATE')
A AHDEPT 3 0 COLHDG('DEPARTMENT' 'CODE')
A R AHREC PFILE(ACCPAYHS)
A K AHDEPT
A K AHCKDT
A K AHCHK#
how would you do this?