× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



The access() C-function will do the trick for you. If you are at v5r3 or newer, you can do it in CL - need the *BYVAL parameter on CALLPRC. This code will work

PGM DCL VAR(&PATH) TYPE(*CHAR) LEN(255) DCL VAR(&MODE) TYPE(*INT) LEN(4) DCL VAR(&RTRN) TYPE(*INT) LEN(4) DCL VAR(&NULL) TYPE(*CHAR) LEN(1) VALUE(X'00') CHGVAR VAR(&PATH) VALUE('/home/vern' *CAT &NULL) CALLPRC PRC('access') PARM((&PATH) (&MODE *BYVAL)) +
RTNVAL(&RTRN) CHGVAR VAR(&PATH) VALUE('/home/vorn' *CAT &NULL) CALLPRC PRC('access') PARM((&PATH) (&MODE *BYVAL)) +
RTNVAL(&RTRN) ENDPGM
Return value of zero means the path exists - path can be a directory or a stream file.

Also easily done in RPG

Musselman, Paul wrote:
Surely "someone" has written a CHKIFSOBJ command to check for things in
the IFS...

Use this command to see if the Folders fo Interest really exist before
you try to save them...

Paul E Musselman

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.