How to handle the Automatic screen advance in RPG program

When the record format is displayed on the screen, I want the format to wait for sometine for the user response and then go in the loop to check some condition and again display the format. Before displaying the screen once again We will check for some status in the file and act accordingly.
aprashupAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gary PattersonVP Technology / Senior Consultant Commented:
0
tliottaCommented:
Gary:

I read the question as more basic than that. It seemed to me that the question was more like "How do I display a screen, receive input from the user, process the input, and then redisplay the screen for the next input?"

It might simply be that a description of the EXFMT op-code in a loop would be sufficient.

Or auto-refresh might also be the answer. Clarification might be needed.

Tom
0
Gary PattersonVP Technology / Senior Consultant Commented:
Tom,

Good point.  I considered that possibility until I saw that aprashup rated himself as "advanced" on this topic.  I probably should have covered both eventualities for completeness sake.

I read the desired flow as:

1) Display record on screen
2) Wait for input from user or until some predefined timeout period occurrs
3) Return control to the program.
4) Check conditions and file status and loop to step 1.

"When the record format is displayed on the screen, I want the format to wait for sometine [sic] for the user response and then go in the loop to check some condition and again display the format. Before displaying the screen once again We will check for some status in the file and act accordingly.

I inferred that "wait for sometime" indicated a timeout.

aprashup,

Tom is correct, if you just need the format to stay on the screen indefinitely until the user presses Enter, you just use EXFMT in a loop.  It will wait forever for the user to take action.

If you need to wait for the user to take action, OR for a timeout interval to expire, then the data queue technique described in the link above is a perfect solution.

- Gary Patterson

0
tliottaCommented:
Gary:

Yeah, "sometime" seems like a good interpretation. Not sure why, but it got in my head as "something". Probably just because of the "n".

A few links, and then I'll leave:

Basic IBM pseudo-code:
http://publib.boulder.ibm.com/infocenter/iadthelp/v7r0/index.jsp?topic=/com.ibm.etools.iseries.langref2.doc/explq.html

A couple examples:
http://www.mcpressonline.com/tips-techniques/rpg/techtalk-using-data-queues-for-automatic-screen-painting.html
http://search400.techtarget.com/tip/1,289483,sid3_gci855472,00.html

Gary knows everything needed for data queues and how they can relate to display files; so he can cover any confusion.

Tom
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.