Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP to the 400

Status
Not open for further replies.

LUEBBKEVIN

Programmer
Apr 30, 2002
35
US
I've not dealt with FTP (nor NDM) but have to do both in this project.
The FTP will be from a client IP address to our AS400 (I've created a workfile that will house the data which in turn will be used to produce a report)
How do I set up this FTP connection in a CLP?
 
What are you wanting the CLP to do?? If I understand the message all you want to do is ftp a file from a client to your as/400, is this right?
 
yes that's pretty much it. basically what i need to do is put the clp in robot to run around 10 am everyday to pull an error file from the client system. that data file (it's a flat file basically) would be uploaded to a file on the AS400 (preferably using today's date as the member). another program will then parse the information, do the needed processes to produce a report.
 
You could setup on the client a batch file to ftp the file to your 400. You could then use a scheduler to run the batch file or RUNRMTCMD from your host to run the batch. That would be cleaner since you can integrate that into your CLP, all you would have to maintain is the batch file on your client.

Here's a sample of a CLP that I have that creates a physical file with the date being the file name and the member the time. Hope this helps.

PGM

DCL VAR(&DATE) TYPE(*CHAR) LEN(6)
DCL VAR(&TIME) TYPE(*CHAR) LEN(7)
DCL VAR(&DAYR) TYPE(*CHAR) LEN(7)

MONMSG MSGID(CPF0000)

RTVSYSVAL SYSVAL(QDATE) RTNVAR(&DATE)
RTVSYSVAL SYSVAL(QTIME) RTNVAR(&TIME)

CHGVAR VAR(&DAYR) VALUE('D' *CAT &DATE)
CHGVAR VAR(&TIME) VALUE('T' *CAT &TIME)

CRTSRCPF FILE(VTXLOGF/&DAYR) RCDLEN(100) MBR(&TIME) +
TEXT('Log file for FTP transmit to Travelers')
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top