Tuesday, 25 November 2025

More about the FILELIST program

The normal way of executing this program is as follows (STACK_ERR because I'm using the -R flag)

SELECT SQL.TMPFILE INTO :ST6 FROM DUMMY; :CHKDIR = SYSPATH ('LOAD', 0); EXECUTE FILELIST :CHKDIR, :ST6, '-R', '-d', SQL.TMPFILE; LINK STACK_ERR TO :ST6; SELECT * FROM STACK_ERR FORMAT; /* this is in Windbi */

If one omits the final parameter (SQL.TMPFILE), then the following is displayed

the option '-msg_file' is required but missing Positional arguments: --dirname arg directory name --linked_stack_file arg link to STACK6 or STACK_ERR for results --msg_file arg text file for return messages General arguments: --u names lowercased (result in STACK6 by default) --l names uppercased (result in STACK6 by default) --f forces resuts to be written to STACK_ERR --R performes subdirectories scan (result in STACK_ERR) --d put directory names in result --A

The option '-msg_file' presumably refers to SQL.TMPFILE that I omitted from the procedure call. I have no idea where else this technique of omitting 'the text file for return messages' can be used in order to get a program's help. COPYFILE and MOVEFILE don't have such a parameter, although they do allow an optional STACK parameter that can be checked for program success or failure.

No comments:

Post a Comment