We’ve created a generic CL program which accepts 2 parameters. The first parameter is the “From” Library and the 2nd parm is the “TO” Library. The “TO” library is the library that you want to copy the data to and of course the “From” is where it’s coming from. We do a chkobj to verify that both libraries exist then we do a display object description DSPOBJD of all files in that library to an outfile. We do an ovrdbf to that outfile and then rcvf. We then check the object attribute and if it’s not a type PF we just skip it and read the next one. We continue doing this and when we get to a PF we do a cpyf. We have monitor message for empty files and we count the number of files read in and the number of files copied and log this at the end. It’s pretty simple but works well when you are trying to refresh data from one environment to another for testing or QA.