Untested but here you go. Basically encapsulating your code in a PREP_PROCESS which grabs filenames
...
P.S. you could use a WAIT as the 2nd parameter of the ACTIVATE_UC_OBJECT instead of looping a while statement
Good idea — thanks. I had forgotten about the WAIT option. I believe your change would work with wildcards.
Also, ideally, I would prefer to avoid launching a separate job to change the mode of each file. I thought about making a string array to hold the list of files, and then passing this variable to the job that sets the mode. However, an array must be created with a specific size, and I don’t know ahead of time how many files will match the pattern. Nor does there seem to be an attribute containing the number of files that were transferred. KB article
KB0011630 claims to provide a solution to this, but it is wrong. The RECORDS option of GET_STATISTIC_DETAIL does not work as explained in the article. It always returns 0 for binary transfers, and the number of lines for text transfers.
I suppose the PostProcess could look in the report and count the lines corresponding to successful file transfers, and then do another PROCESS loop to fill the array with the file names. Or I could use CREATE_OBJECT to make a temporary VARA to store the file list. With VARAs, you do not need to know the size ahead of time.
In any event, I cannot make progress on this until I fix an error I am currently seeing whenever I try to use wildcards:
U0063016 FT '3225582': The file '/home/uc4a/testfile*.txt' does not exist.
The file definitely exists. If you know what might be causing this problem, I would be glad to learn of your ideas.