Thank you for your answer Satid. But unfortunately, changing the file descriptor limit didn't help.
But this morning I read again https://www.ibm.com/support/pages/argument-number-limits-ls-rm-and-other-qshell-commands-qsh-001-0078-process-ended-signal-5
I could see that the limit is 16383 arguments.
So I changed the limits for mtime to select less files, and I run the job several times. That way it worked.
------------------------------
Denis Roche
------------------------------
Original Message:
Sent: Wed August 14, 2024 09:20 AM
From: Satid S
Subject: Copy selected files from one IFS folder to another
Dear Denis
>>>> But then I get error message : qsh: 001-0078 Process ended by signal 5. I understand that this is due to a QSHELL limitation in the arguments number <<<<
Did you use a default or maximum value for supported file descriptor of Qshell? If the default one, you can try expanding it to the max value supported. I hope this Technote should be of help to you in this matter: File Descriptor Limits In the Qshell and PASE Environments at https://www.ibm.com/support/pages/file-descriptor-limits-qshell-and-pase-environments
------------------------------
Satid S
Original Message:
Sent: Wed August 14, 2024 07:50 AM
From: Denis Roche
Subject: Copy selected files from one IFS folder to another
Hello
I have an IFS folder containing around 320.000 files.
I need to select some of them depending on last modified date and content, and then copy them to another folder. Then I'll zip and export that folder.
The number of files in the result is around 24.000 for 124 MB.
I tried first with Agent Ransack. I could find the files, but then I can only copy bunches of few files from the result windows. Not usable.
Then I tried QSHELL with the following command in a CL:
cp $(find /folder1 -type f -mtime -8 -mtime +5 | xargs grep -l 'TEXT1[[:space:]][[:space:]]TEXT2') /Folder2/
It works when I test on a folder1 containing few files.
But then I get error message : qsh: 001-0078 Process ended by signal 5.
I understand that this is due to a QSHELL limitation in the arguments number when passing from one command to another.
Has someone an idea about how I can achieve the copy of the files ?
This is a one time job. So I won't buy a tool for this. Either I can with what I have or I can't.
------------------------------
Denis Roche
------------------------------