I've got some crude functionality so far, but I've got some puzzling behavior: more often than not, it runs into an error trying to get rid of the root of what's being deleted. For example, if I have the following tree structure:
/frobozz /frobozz/foo /frobozz/foo/boz /frobozz/bar /frobozz/bar/boz /frobozz/baz /frobozz/baz/boz and give it: DELTREE /frobozz/fooit gets rid of /frobozz/foo/boz, and the files therein, and all the files in frobozz/foo, but instead of deleting frobozz/foo, it blows up with a SYSOUT screen, bearing the message, "rm: 001-2136 Error found removing link to //frobozz/foo. Resource busy."
It works fine if I enter the rm command from the QSHELL command line, or if I manually pass it to QSHELL on an OS/400 command line. Why is a CL program different?
On a related note, having a completion message turn on the terminal's message light on successful completion is a bit crude. Is there a way for the CL program to catch the message? Perhaps with a RCVMSG? If so, how?