You shouldn’t need to do a CPYF as well as the CPYFRMSTMF. The CPYFRMSTMF should be enough. Depending on what you need to do in your CL program, QSHELL may offer an alternative for you.
At the very end of <a href=”http://www.brucevining.com/Presentations/PPT_Presentations/How_to_Use_the_Most_Common_APIs.pdf”>this presentation</a> are two sample CL programs. The first writes data to an IFS text file, the second then reads the data. The “rules” of using the IFS directly can be found earlier in the presentation where the RPG example is given. You do not need to copy the IFS file to a database file in order to access the data from any of the high level languages (CL included).