Batch FTP is a process where FTP can be done via batch process. This is widely used process where we
don't have any other alternative to send file to target system.
During batch FTP, commands are fired from file
with INPUT override and FTP log is written to file to OUTPUT
override file. Lets have an example
1.00 PGM
2.00 OVRDBF
FILE(INPUT) TOFILE(LIBRARY/QCLSRC) MBR(FTPCMDS)
3.00 OVRDBF
FILE(OUTPUT) TOFILE(LIBRARY/QCLSRC) MBR(OUT)
4.00 FTP
RMTSYS(REMOTESYS)
5.00 ENDPGM
Line 2 - FTPCMDS is a TXT type of
member which contains list of commands. System will automatically
read commands from FTPCMDS member and fire them one by one.
Line 3 – Member OUT with TXT
type is used to dump FTP log.
LIBRARY/QCLSRC) MBR(FTPCMDS) data (to
transfer savefile to target system) -
- username password
- cd library
- bin
- put filename filename
- quit
How to fire commands at remote system –
Commands that we use in AS400 (IBMi) via commandline or in CL program
can also be run at target AS400 sytem via FTP. To do this we just
have to add prefix 'quote rcmd' to the command that we running.
For example – If we want to create
TEST flat file of length 320 in LIBRARY then use
quote rcmd CRTPF FILE(LIBRARY/TEST)
RCDLEN(320)
No comments:
Post a Comment