Data purging in AS/400

1590 pts.
Tags:
AS/400
Hi, 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.''
Main things:
  1. 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.
Thanks!

Answer Wiki

Thanks. We'll let you know when a new response is added.

I believe its a VDU Program right?
The easiest approach would be a CL Program as a middle layer which will help to override file from archiev library.  This CL Program to be called only when the data in original library is already purged.

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • philpl1jb

    Perhaps program is in RPGLE

    Where do you want this F4 to appear ..

    - on Main display

    - on a New display

    - on Pgm1 display

     

    50,205 pointsBadges:
    report
  • 6r
    Main dspl

    1,590 pointsBadges:
    report
  • 6r
    And if data coming from archive library then i want same to be highlighted on window subfile header that data coming from arc. Lib. Also my cl would just set lib. List if some one presses f4 means it will just put arc. Lib on top of lib

     List and if someone again press f4 means toggle it then by default live data lib. Should be on top of lib. List so that based on this lib. List we can put header of window subfile with correct information that now data is populating from archive lib.
    It needs to be texted in border of window subfile itself.
    Like if we pass any parameter with information like currently some one pressed f4 then arc. Lib is on top of lib. List and once it is on top then will pass this parm to next calling  module from 1st rpgle program and then it will read(module) will read some where in its code that value is now pointing to arc lib so that end users by just seeing that window which populates by pressing f4 should be aware about archive data
    Thanks
    1,590 pointsBadges:
    report
  • aceofdelts

    I suggest a logical file that points to the Archive library instead of messing around with changing libl on the fly.

    So chain to main file. If not found then chain to logical.

    1,930 pointsBadges:
    report
  • 6r
    Actually approach is to use CL program which will just set lib. list on top based on toggling of function key F4.
    By the way can  we pass parameter from RPGLE program  to called module which is called by  CALLB and check based on value of passed parameter that suppose if arc. lib. is on top of lib. list then it should write in the border of window subfile that data coming from archive lib. or by defaault it will show live data as usual.
    Thanks 
    1,590 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following