Please help newbee in unix!
There is a task which runs on the DB2 via the task center:
task:
I need to create a unix shell to:
(1) ftp MEMBER.IXF and other files to another server (masys)
(2) if ftp transfer return code = 0 then delete files from DB2 server.
(3) send e-mail with "task successful" message
someting like this:
cd bin
THANKS A LOT FOR YOUR HELP!
There is a task which runs on the DB2 via the task center:
task:
Code:
connect to ali user ali using ali;
export to "/sanbasys/basysload/MEMBER.IXF" of IXF select * from MEMBER;
export to .....
connect reset;
I need to create a unix shell to:
(1) ftp MEMBER.IXF and other files to another server (masys)
(2) if ftp transfer return code = 0 then delete files from DB2 server.
(3) send e-mail with "task successful" message
someting like this:
cd bin
Code:
vi ftp_file:
#!/bin/ksh
machine masys login masys password masys
lcd "home/BK_DIR"
put member.ixf member.ixf
if ftp=0 then
rm member from ali
end
mail "taks is good"
rm member*
end
good buy
THANKS A LOT FOR YOUR HELP!