Janice

There is an API called access() as I recall - and if you are on a new enough release (v5r3) you can use integer parameters by value. That is required to use this API in CL. Or use RPGLE - at any rate, it can be used to text existence of any object you can name using a path - including library objects. You don't even have to put a null at the end of the path name (x'00') in CLLE if you pass a literal - you do if you use a variable. At least it was just that way in V5R3 for me.

Example code -

PGM

DCL VAR(&RTNINT) TYPE(*INT) LEN(4)
DCL VAR(&PATH) TYPE(*CHAR) LEN(255)
DCL VAR(&NULL) TYPE(*CHAR) LEN(1) VALUE(X'00')
DCL VAR(&TESTVAL) TYPE(*INT) LEN(4) VALUE(0)
CHGVAR VAR(&PATH) VALUE('alltypes.slk' *TCAT &NULL)
CALLPRC PRC('access') PARM((&PATH) (&TESTVAL +
*BYVAL)) RTNVAL(&RTNINT)
CALLPRC PRC('access') PARM(('alltypes.slk') +
(&TESTVAL *BYVAL)) RTNVAL(&RTNINT)
ENDPGM

This is NOT reliable before V5R3!

HTH
Vern

-------------- Original message --------------
From: "Janice Chester" <janice@xxxxxxxxxxxxx>

I know this has been asked before, but I need assistance using a CL
program to monitor for an object in the IFS directory. I am "very" new
at this so any help would be appreciated.



Thanks,

Janice





Janice Chester

Tefron USA, Inc.

P.O. Box 100

720 Main Street

Valdese, NC 28690

janicechester@xxxxxxxxxxxxx

Phone: (828) 879-6518







--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.