To save any iSeries Library to a save file and copy it with CPYTOSTMF, run the following commands, where xxx is the name of the library to save and copy and yyy is where you are copying it to:

  1. CRTSAVF FILE(QGPL/xxx)
  2. SAVLIB LIB(xxx) DEV(*SAVF) SAVF(QGPL/xxx)
  3. CPYTOSTMF FROMMBR('/qsys.lib/qgpl.lib/xxx.file') TOSTMF('/home/xxx.savf')
  4. CVTDTA(*NONE) ENDLINFMT(*FIXED)
  5. CRTSAVF QGPL/yyy
  6. CPYFRMSTMF FROMSTMF('/home/xxx.savf') TOMBR('/qsys.lib/qgpl.lib/yyy.file')
  7. MBROPT(*REPLACE) CVTDTA(*NONE) ENDLINFMT(*FIXED) TABEXPN(*NO)
  8. CRTLIB yyy
  9. RSTLIB SAVLIB(xxx) DEV(*SAVF) SAVF(QGPL/yyy) MBROPT(*ALL) ALWOBJ
  10. DIF(*ALL) RSTLIB(yyy)

Still have questions? We can help. Submit a case to Technical Support.

Last Modified On: December 10, 2016