There is a huge trade related file which needs to be purged based on certain criteria in archive library. The question here is on main screen where we enter trade ID as key field and after entering it, PGM1 shows data related to this trade id and what the requirement is, if suppose after purging logic is applied then there will no longer be any data available on this screen,then there needs to be put a function key which will advice please press F4 to see data from archive library. And if some one press F4 then it should chain on archive library and then should also display on top of the screen that this data is being displayed from archive library. And if suppose from very first screen after entering trade id on display file if it does not not exist then there should be message displayed on below "please press F4 to enquire in archive library.''
If data coming from archive Lib. After pressing F4, then somewhere on top it should say that it 's from archive lib.
Kindly suggest suitable programming approach to do it.