SCOUG Logo


Next Meeting: Sat, TBD
Meeting Directions


Be a Member
Join SCOUG

Navigation:


Help with Searching

20 Most Recent Documents
Search Archives
Index by date, title, author, category.


Features:

Mr. Know-It-All
Ink
Download!










SCOUG:

Home

Email Lists

SIGs (Internet, General Interest, Programming, Network, more..)

Online Chats

Business

Past Presentations

Credits

Submissions

Contact SCOUG

Copyright SCOUG



warp expowest
Pictures from Sept. 1999

The views expressed in articles on this site are those of their authors.

warptech
SCOUG was there!


Copyright 1998-2024, Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.

The Southern California OS/2 User Group
USA

SCOUG-Programming Mailing List Archives

Return to [ 11 | September | 1999 ]

<< Previous Message <<


Date: Sat, 11 Sep 1999 23:22:31 PDT
From: Peter Skye <pskye@peterskye.com >
Reply-To: scoug-programming@scoug.com
To: scoug-programming@scoug.com
Subject: SCOUG-Programming: Checking for program in REXX

Content Type: text/plain

Robert Blair wrote:
>
> Since REXX can execute anything I don't think
> there is a way to check except for the return
> code of the failure.
>
> RC = 1041 is not found.
>
> SYS1041: The name XXXXX is not recognized as an
> internal or external command, operable program
> or batch file.
> +++ RC(1041)

Yes, I guess I could trap the actual REXX error. I knew about the
SYS1041 but forgot I could trap it.

> That is unless you want to search the entire system
> looking for the program you are going to execute.
>
> Use SysSearchPath(env_path, file_name) to find a
> program if you think this is neccessary.

I'm a bit uneasy with this method because I don't know how well it works
with JOIN, SUBST, TVFS, etc.

I'll go with the SYS1041.

Incredibly simple, too. This works. :)

SIGNAL ON ERROR NAME nosuchprogram

"xyz"
say "Program XYZ ran successfully."
pause
return

nosuchprogram:
say "Program XYZ didn't run."
pause
return

The trick is knowing how to run a program so that it does nothing and
just returns. Most HELP requests do this, for example:

SOMEPGM /? >nul

or similar.

Thanks, Bob. Darn, maybe REXX isn't such an awful language after
all.

- Peter Skye

=====================================================

To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-programming".

For problems, contact the list owner at
"rollin@scoug.com".

=====================================================


<< Previous Message <<

Return to [ 11 | September | 1999 ]



The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA

Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.