Help with a simple script

15 pts.
Tags:
AS/400
AS/400 scripts
Firstly I should mention that my profession is controlling, not IT, but I assume my problem is rather simple. Unfortunately, I have not even basic knowledge how to solve my problem on an AS/400. I copy data from the AS/400 to the AS/400 notepad. Sometime I have longer lists, so I copy to the notepad, scroll down, copy to the notepad and so on. This is becoming tedious if I have a very long list to copy. So I created a simple script that looks like this: [wait app] [wait inp inh] [Edit Send to SP] [roll up] [Edit Send to SP] [roll up] [Edit Send to SP] [roll up] ... In other words, I repeat the same command for x times. Obviously I never perfectly match the number of screens to copy, the list is longer or shorter. If the list is shorter, I get a message kind of 'trying to scroll after the last page of the list'. What I need would be a loop...until or if...then construct that automatically stops as soon as the last page of a list is copied to the notepad. Can somebody help me with that?

Software/Hardware used:
AS 400
ASKED: May 2, 2013  6:53 PM
UPDATED: May 2, 2013  7:25 PM

Answer Wiki

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

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
  • TomLiotta
    The Help menu-bar item should have a 'Procedures' menu item. When that displays, open the index and review the [ goto ] entry. When that makes some sense, look over the discussions of [ wait condition ]. . The 'goto' macro statement lets you cause your macro to go back up to a :label that marks your 'Edit' point. The 'goto' might be right after your 'roll-up'. . You might have a condition that looks for 'More...' on the screen, and it keeps going back until 'More...' is no longer found. . It's not possible to be very specific without seeing a representative sequence of screens, but maybe you can make some progress or get enough added background to ask for a more useful answer. Not sure what can be added yet. . Tom
    125,585 pointsBadges:
    report
  • PetziMG
    Excellent, you pointed me excactly to help pages I needed. It took a bit until I found the right combination of goto and wait command, but now it works perfect! Most frustrating was indeed that I missed the space between 'More' and '...'. :-)
    15 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