Client Access Express macro for getting to compile errors quickly

Learn how attaching macros to your customized keyboard layout can really save time

Attaching macros to your customized keyboard layout can really save time -- for example, I frequently want to see

the errors generated by my compile while I'm in SEU, so I set up this simple macro to help automate the task.

To create the macro, go into Edit Preferences Macro/Script and press Customize. Go into the File menu, choose New and select VB Script. Paste the code (below) into the "Macro Statements" box, pull down the File menu and Save As ERROR.

Now attach the macro to the keyboard by pulling down Edit, Preferences, Keyboard and choose Customize. Use the mouse to select the E key by clicking on it, and then use the Macro/Script dropdown to pick out the new ERROR macro. Press the "->" button next to Ctrl to set Ctrl E to run the macro. Pull down File, choose Exit, and click the Yes button to save the changes to the keyboard. Hit OK to leave keyboard setup.

To use the new macro, open a source in SEU and press Ctrl E. The macro presses F15, selects option 2 (spool file), presses Enter, then finds *ERR – the first error in the compile listing.


[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)
autECLSession.autECLPS.SendKeys "[pf15]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "2"
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "f *err"
autECLSession.autECLPS.SendKeys "[enter]"

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Ask your programming questions--or help out your peers by answering them--in our live discussion forums.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.

This was first published in September 2004

Dig deeper on iSeries CL programming

0 comments

Oldest 

Forgot Password?

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

Your password has been sent to:

SearchEnterpriseLinux

SearchDataCenter

Close