Tip

iSeries calling an .exe

From a CL, you can call the Windows standard calculator program.

              
 PGM
 STRPCO     PCTA(*YES)
 STRPCCMD  PCCMD('C:WINNTSYSTEM32CALC.EXE')
ENDPGM 

You can call any PC .EXE object as long as you know the path! The STRPCO command is part of Client Access, which most iSeries shops have. (I'm not sure if my tip will work without Client Access.)

C:WINNTSYSTEM32 is the path on my PC where the object - CALC.EXE exists, obviously you must specify the correct path using the above format.

You can replace CALC.EXE with:

NOTEPAD.EXE to launch the Notepad window, or EXPLORER.EXE to launch the Windows Explorer window (AKA - File Manager) or IEXPLORER.EXE to launch the Internet Explorer window.

Add these to an iSeries menu and really impress your audience.

Note: I could not get it to work for directory names that had spaces in them, i.e. program files

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

The Best Web Links: tips, tutorials and more.

Visit the ITKnowledge Exchange and get answers to your developing questions fast.

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


This was first published in December 2004

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

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
Sort by: OldestNewest

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:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.