Is there a way to use icetool to check to see if a file is empty or not. If the file is not empty, then i want to do skip some of the records and copy a certain number of records. I would like to do all this in one step.
For example.
If file1 is empty
set return code to 04
else
skip(20000) count(30000) to file2
end-if.
Joined: 15 Feb 2005 Posts: 4579 Location: San Jose, CA
If you want RC=4 instead of RC=12, you can use two steps instead of one step. The first step would have the COUNT operator with RC4. The second step would have the COPY operator. You could use JCL checking (e.g. IF) in the second step to decide whether to run or bypass the step based on the RC=0 or RC=4 from the first step.
Thanks Frank. That's exactly what I'm going to do. I'm going to use Icetool to check for the empty file. If not empty, then I will use IDCAMS to do the copy.