Have you thought of abandoning CL for SQL stored procedures? There are SQL
services to check for IFS existence, locks, etc. To me this is a much
better solution than calling out to APIs, shoehorning SQL into CL, etc.
Besides, it's a comfortable way to learn SQL stored procedures. In August
I'll have 40 years on this job and I'm not too old to change.

On Fri, Mar 13, 2026 at 3:24 PM Stephen Richter <stephenrichter@xxxxxxxxx>
wrote:

my man Grok is insisting that the CHKDIR command exists on the IBM i. Is
that true?

here is what Grok says:

Since you're on IBM i 7.5 (V7R5M0) and the CHKDIR command is not found,
that means your system does not have the required Technology Refresh (TR)
level installed yet.The CHKDIR command was introduced in relatively recent
TRs:

- IBM i 7.5 → first available around TR2 or TR3 (late 2022 / early 2023
timeframe)
- IBM i 7.4 → TR5 or TR6

Many 7.5 systems shipped initially without the latest cumulative PTFs or
group PTFs, so CHKDIR is missing until you apply the appropriate PTFs.

Google AI says no:

IBM i does not have a native, IBM-supplied CL command named CHKDIR to
check if an Integrated File System (IFS) folder exists. Instead, developers
commonly use the CHKIFSOBJ
<
https://www.google.com/search?q=CHKIFSOBJ&sca_esv=5176837d497f6a28&rlz=1C1VDKB_enUS1192US1192&biw=1270&bih=718&sxsrf=ANbL-n4MuOo86r3gE5WGT-hrhE7WO-ps9Q%3A1773429262865&ei=DmK0aYOvNL_l5NoPkL2W4QU&ved=2ahUKEwjAxe_dzJ2TAxXGjYkEHQ9OOWYQgK4QegQIARAB&uact=5&oq=does+the+ibm+i+have+a+command+named+CHKDIR%3F++Used+to+check+if+an+IFS+forder+exists&gs_lp=Egxnd3Mtd2l6LXNlcnAiUmRvZXMgdGhlIGlibSBpIGhhdmUgYSBjb21tYW5kIG5hbWVkIENIS0RJUj8gIFVzZWQgdG8gY2hlY2sgaWYgYW4gSUZTIGZvcmRlciBleGlzdHNI_twBUOQJWKfYAXACeACQAQKYAa8BoAHsQqoBBTU1LjMyuAEDyAEA-AEBmAI_oAK9M6gCEMICCBAAGLADGO8FwgILEAAYsAMYogQYiQXCAgUQIRigAcICBxAjGCcY6gLCAgcQLhgnGOoCwgIXEAAYgAQYkQIYtAIY5wYYigUY6gLYAQHCAgoQIxiABBgnGIoFwgIEECMYJ8ICChAuGIAEGCcYigXCAgsQABiABBiRAhiKBcICCxAAGIAEGLEDGIMBwgIREC4YgAQYsQMY0QMYgwEYxwHCAgUQABiABMICChAjGPAFGCcYngbCAhAQABiABBixAxhDGIMBGIoFwgIIEAAYgAQYsQPCAggQLhiABBixA8ICDhAAGIAEGLEDGIMBGIoFwgIEEAAYA8ICBhAAGBYYHsICCxAAGIAEGIYDGIoFwgIFEAAY7wXCAggQABiABBiiBMICBRAhGJ8FwgIFECEYqwLCAgcQIRigARgKmAMm8QVFLhumBht1bogGAZAGBboGBggBEAEYAZIHBTI3LjM2oAfYygSyBwUyNS4zNrgH6zLCBwswLjIwLjM2LjYuMcgHugKACAA&sclient=gws-wiz-serp

command
(from the Easy400 IFSTOOL library) or CHKLNK
<
https://www.google.com/search?q=CHKLNK&sca_esv=5176837d497f6a28&rlz=1C1VDKB_enUS1192US1192&biw=1270&bih=718&sxsrf=ANbL-n4MuOo86r3gE5WGT-hrhE7WO-ps9Q%3A1773429262865&ei=DmK0aYOvNL_l5NoPkL2W4QU&ved=2ahUKEwjAxe_dzJ2TAxXGjYkEHQ9OOWYQgK4QegQIARAC&uact=5&oq=does+the+ibm+i+have+a+command+named+CHKDIR%3F++Used+to+check+if+an+IFS+forder+exists&gs_lp=Egxnd3Mtd2l6LXNlcnAiUmRvZXMgdGhlIGlibSBpIGhhdmUgYSBjb21tYW5kIG5hbWVkIENIS0RJUj8gIFVzZWQgdG8gY2hlY2sgaWYgYW4gSUZTIGZvcmRlciBleGlzdHNI_twBUOQJWKfYAXACeACQAQKYAa8BoAHsQqoBBTU1LjMyuAEDyAEA-AEBmAI_oAK9M6gCEMICCBAAGLADGO8FwgILEAAYsAMYogQYiQXCAgUQIRigAcICBxAjGCcY6gLCAgcQLhgnGOoCwgIXEAAYgAQYkQIYtAIY5wYYigUY6gLYAQHCAgoQIxiABBgnGIoFwgIEECMYJ8ICChAuGIAEGCcYigXCAgsQABiABBiRAhiKBcICCxAAGIAEGLEDGIMBwgIREC4YgAQYsQMY0QMYgwEYxwHCAgUQABiABMICChAjGPAFGCcYngbCAhAQABiABBixAxhDGIMBGIoFwgIIEAAYgAQYsQPCAggQLhiABBixA8ICDhAAGIAEGLEDGIMBGIoFwgIEEAAYA8ICBhAAGBYYHsICCxAAGIAEGIYDGIoFwgIFEAAY7wXCAggQABiABBiiBMICBRAhGJ8FwgIFECEYqwLCAgcQIRigARgKmAMm8QVFLhumBht1bogGAZAGBboGBggBEAEYAZIHBTI3LjM2oAfYygSyBwUyNS4zNrgH6zLCBwswLjIwLjM2LjYuMcgHugKACAA&sclient=gws-wiz-serp
.
Alternatively, API calls like access() or stat() are used within RPG/C, or
QSH commands in CL.
[image: www.scottklement.com]www.scottklement.com +4
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2026 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.