![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtUgqBQP5b-gSJY9h4na6JqGqFWq-9isPCfbWHq_lzQmQNISYpTcvFPcrmaruKRebZL4Zytv-iVFwlsCrZTnMlB4ciIr6LBvwwE28L6Ljuo9RiRyUbqj_d43vm6EEMeLprkEFViw-E5cTlid6P8U9iWijonKXf5O327kkn5gcvvrgCcgMJWuekvqow3tQ/s200/cl.png)
Someone asked me how I would write a program to copy all of the members in source files to separate files in the IFS, where they could then me imported into a GiT. I can see a program like this being more useful overtime as more people move from using source files to using a GiT repository.
In this example I will be copying all the source members from the source file DEVSRC in the library MYLIB to the IFS directory /home/MyFolder. The files in the IFS would all be named in the following way: source_member_name.source_member_type, for example: TESTRPG.RPGLE
My first attempt at creating a program to do this was to use RPG. I was going to use the CPYTOIMPF command within the QCMDEXC Scalar function. Alas, several hours of creating program I received the following message when running the RPG program for the first time: