CL equivalent FTP subcommands for IBM i FTP server |
FTP subcommands equivalent to IBM i FTP server
The File Transfer Protocol (FTP) client communicates with the FTP server using server subcommands.
IBM i FTP server subcommands have some commands that are equivalent and abbreviated names of IBM i CL commands. The names of these commands must be 4 characters in length to comply with the FTP limits. When the FTP server receives these subcommands, then the names of these subcommands are interpreted as follows:
- ADDM: ADDPFM (Add Physical File Member)
- ADDV: ADDPVLM (Add Physical File Variable Length Member)
- CRTL: CRTLIB (Create Library)
- CRTP: CRTPF (Create Physical File)
- CRTS: CRTSRCPF (Create Source Physical File)
- DLTF: DLTF (Delete File)
- DLTL: DLTLIB (Delete Library)
You can also use the FTP server subcommand RCMD to send any CL subcommand to the FTP server. Please refer the example using RCMD command in IBM i.
ADDM(Add Physical File Member)
The ADDM IBM i FTP server subcommand adds a member to a physical file.
FTP server subcommandADDM parameters
The parameters to this subcommand are same as for the ADDPFM CL command.
ExampleTo add a member MBR1 to the physical file PF1 in library EASYCLASS1, use below FTP server subcommand with parameter.
ADDM FILE(EASYCLASS1/PF1) MBR(MBR1)
ADDV(Add Physical File Variable Length Member)
The ADDV IBM i FTP server subcommand adds a variable-length member to a physical file.
FTP server subcommandADDV parameters
The parameters to this subcommand are same as for the ADDPVLM CL command.
ExampleTo add a member MBR2 to the physical file PF1 in library EASYCLASS1, use below FTP server subcommand with parameter.
ADDV FILE(EASYCLASS1/PF1) MBR(MBR2)
CRTL(Create Library)
The CRTL IBM i FTP server subcommand creates a Library.
FTP server subcommandCRTL parameters
The parameters to this subcommand are same as for the CRLIB CL command.
ExampleTo create a library TESTLIB, use below FTP server subcommand with parameter.
CRTL TESTLIB
CRTP(Create Physical File)
The CRTP IBM i FTP server subcommand creates a physical file.
FTP server subcommandCRTP parameters
The parameters to this subcommand are same as for the CRTPF CL command.
ExampleTo create a physical file PF2 in library EASYCLASS1 with a record length of 100 with *NOMAX members, use below FTP server subcommand with parameter.
CRTP FILE(EASYCLASS1/PF2) RCDLEN(100) MAXMBRS(*NOMAX)
CRTS(Create Source Physical File)
The CRTS IBM i FTP server subcommand creates a source physical file.
FTP server subcommandCRTS parameters
The parameters to this subcommand are same as for the CRTSRCPF CL command.
ExampleTo create a source physical file QRPFLESRC in library EASYCLASS1, use below FTP server subcommand with parameter.
CRTS FILE(EASYCLASS1/QRPGLESRC)
DLTF(Delete File)
The DLTF IBM i FTP server subcommand deletes a file.
FTP server subcommandDLTF parameters
The parameters to this subcommand are same as for the DLTF CL command.
ExampleTo delte file PF2 in library EASYCLASS1, use below FTP server subcommand with parameter.
DLTF FILE(EASYCLASS1/PF2)
DLTL(Delete Library)
The DLTL IBM i FTP server subcommand deletes a library.
FTP server subcommandDLTL parameters
The parameters to this subcommand are same as for the DLTLIB CL command.
ExampleTo delte a library TESTLIB, use below FTP server subcommand with parameter.
DLTL TESTLIB