How to pause execution of a macro to allow user input of variable data in iSeries

5 pts.
Tags:
IBM iSeries
iSeries development
iSeries macros
I am exploring the possibilities to speed up input when testing by taking advantage of macros. The problem is when variable data has to be keyed into a field in the middle of the sequence. Reading the help-topics on WAIT I thought I could use the WaitForCursor-option, but it does not change the system mode to allow manual input. The steps are as follows: autECLSession.autECLPS.SendKeys "001" ‘Branch code is filled autECLMacro "[edit-paste]" ‘Customer No is filled autECLSession.autECLOIA.WaitForInputReady autECLSession.autECLPS.SendKeys "[tab]" ‘cursor is sent to Currency field MsgBox "Key base currency code" ‘ Now I want the macro execution to pause until I have entered a currency code <<manual input of currency code. Upon completion, cursor automatically positions i the next field at 5,27>> ‘the cursor automatically has positioned in the Account Code field autECLSession.autECLPS.WaitForCursor 5,27,10000 ‘Macro now to resume autECLSession.autECLOIA.WaitForInputReady autECLSession.autECLPS.SendKeys "250101" Hope you can help with the missing part.

Answer Wiki

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

How about using two macros? One to get to the input point, and a second to continue? Not a very “techie” solution, but simple.

Discuss This Question: 2  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
  • WoodEngineer
    If you have access to TAATOOLS, check out PMTOPR command. It is designed exactly for what you want. We've used it for many years. Works great. One really cool feature is that you can use the command to do some basic validation of the user's response. For example, if your program asks the user to enter "Y" to proceed or "N" to stop. the command can require the user to enter Y or N, relieving you from writing validation logic in your program.
    6,875 pointsBadges:
    report
  • MainframeMaster
    Hey! You can usethe InputBox function:
           Resposta = InputBox ("Message", "Caption","DefaultValue", xPos, yPos) 
    
    Where: [ol] [li]Message (string): an explanation on what you want the user to type;[/li] [li]Caption (string): the tile of the dialog;[/li] [li]DefaultValue (Variant): the value will be displayed and assumed if the does not enter anything;[/li] [li]xPos, xPos (integer): the coordinateds where to position the dialog;[/li][ol] A dialog with an editing field will be showed waiting for the user to type something and click either the [ ok ] button or [ cancel ] button; If the user click the cancel button the result of the function will be "" (null); Example:
        Resposta = InputBox ("Currency:", "Systems automation Inc.","********", 100, 300) 
    
    Obs: Passwords cannot be entered because the function always show the chars typed in.
    10 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