Yes there is, and it is a wonderful thing.. I am sure othere here will show you different ways to use the LDA (Local Data Area). but here is just one,, starting first with CL, and then going to RPG.
DCL VAR(&RFDAT) TYPE(*CHAR) LEN(6)
DCL VAR(&TFDAT) TYPE(*CHAR) LEN(6)
SNDUSRMSG MSG('ENTER MONTH BEGIN DATE - MMDDYY') +
TOMSGQ(*) MSGTYPE(*INQ) MSGRPY(&RFDAT)
SNDUSRMSG MSG('ENTER MONTH ENDING DATE - MMDDYY') +
TOMSGQ(*) MSGTYPE(*INQ) MSGRPY(&TFDAT)
CHGDTAARA DTAARA(*LDA (1 6)) VALUE(&RFDAT)
CHGDTAARA DTAARA(*LDA (7 6)) VALUE(&TFDAT)
OVRDBF FILE(LABORP) TOFILE(*LIBL/LABORP) SHARE(*YES)
I UDS
I 1 60FDATE
I 7 120TDATE
The above 2 fields are the date fields reference via the CL.