Use Run Task to Create a Save File on i5/OS

In this RUN TASK statement submitted from z/OS or z/OS, the first command CRTSAVF is used to create a save file named SAVFILE. The file has the text description CREATED BY PROCESS TEST. The second command SAVLIB saves the library TESTDT1 in the save file created in the first command.

STEP1  RUN TASK  (PGM=AS400)
                  SNODE
                  SYSOPTS=\"\
                          \CMD(\
                          \CRTSAVF\
                          \FILE(TEST/SAVEFILE)\
                          \TEXT(‘CREATED BY PROCESS TEST’)
                          \)\
                          \CMD(\
                          \SAVLIB\
                          \LIB(TESTDT1)\
                          \DEV(*SAVF)\
                          \SAVF(TEST/SAVEFILE)\
                          \)\
                          \"\