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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

downloading AS400 file to PC

Status
Not open for further replies.

nickpatel

Programmer
Jan 5, 2004
41
US
What steps do I need to take on AS400 to download files to PC using FTP? Do I have to configure anything on AS400 or PC?

Thanks
Nick
 
Well obviously you have to have TCP/IP running, and the FTP server running. That kind of goes without saying. You may have to have the database server running also. All my downloads I do thru Client Acces.. Are you having a problem??
 
Thanks for replying. Well I tried the ftp command and put in my ip number to my machine and it told me:


Previous FTP subcommands and messages:
Connecting to remote host XX.XX.XX.XX using port 21.
Cannot connect to host XX.XX.XX.XX at address XX.XX.XX.XX. Try again
later.

It must be a service I not running. I wish there was a way to download this file to pc as Acrobat PDF. Anyway, how do I check if tcpip is running (I ping and it verify correctly)? Also how do I start the ftp server?

Nick
 
You can do a STRTCPSVR,, then F4, and then F1, to look at what servers can be started,, or you can do *all. And this will remain in effect until the next IPL.
 
Nick,
To setup the FTP server so that it starts automatically, do the following, On any command line:

Selection or command
===> go cfgtcp Press Enter
Then take option 20
20. Configure TCP/IP applications
Then take option 10
10. Change FTP attributes

your screen should look much like this:
Change FTP Attributes (CHGFTPA)

Type choices, press Enter.

Autostart servers . . . . . . . AUTOSTART *YES
Number of initial servers . . . NBRSVR 3
Inactivity timeout . . . . . . . INACTTIMO 3000
Coded character set identifier CCSID 00819
Server mapping tables: TBLFTPOUT
Outgoing EBCDIC/ASCII table . *CCSID
Library . . . . . . . . . .
TBLFTPIN
Incoming ASCII/EBCDIC table . *CCSID
Library . . . . . . . . . .
Initial name format . . . . . . NAMEFMT *LIB
Initial directory . . . . . . . CURDIR *CURLIB
Initial list format . . . . . . LISTFMT *DFT
New file CCSID . . . . . . . . . CRTCCSID *CALC

Whenever TCP starts, the FTP server will also start (autostart *yes). Inactivity defaults to 5 minutes (300), I'm set to 50 minutes (3000). The NAMEFMT param tells the server the default file system to use. *LIB is for the LIB/FILE system on the OS/400 side. *PATH is used to access the IFS/Windows side.
You should access the 400 from the PC, unless you have a PC based FTP server running in which case, the 400 can put files to that server. When working interactively, remember to use the namefmt ftp command to switch between the LIB/FILE system and the IFS/Windows system. NAMEFMT 0 is for the LIB and NAMEFMT 1 is for IFS.

As for converting to PDF, search the with splf2pdf as the search term. There a several do it yourself java solutions out there. There are some commercial products available as well.

HTH
 
Thanks for answering back os400. . will issuing the command CHGFTPA wipe out any FTP servers already running?

thanks
Nick Patel
 
Nick,
if want the change immediately, key in:
endtcpsvr *ftp Press enter
count to 10
then:
strtcpsvr *ftp

of course you don't want to do this during a file transfer.
 
Ok I tried that but when I go to FTP 'xx.xx.xx.xx' it tells Cannot connect to host. Maybe I'm understanding this ftp stuff all wrong. Let me see if I am on right track by asking a few questions.

Can I ftp to my computer by putting in FTP and ip number?
Do I need to run something on my PC to recieve the file from AS400?

I don't have anything running on my pc, is this the missing link?

thanks
Nick
 
Nick,

To access the 400 from your PC.
C:\FTP as400.ip.address.enter

This starts the windows ftp client on your PC.
In this case the 400 is the server and PC is the client. Use the std FTP commands to get/put files. Remember, NAMEFMT 0 is for lib/file and NAMEFMT 1 is for the windows side of the 400.

To access your PC from the 400, you MUST have an FTP server running on your PC.
 
Thank you very much for clearing that up for me.

Nick Patel
 
Also one thing to note. If you have DSN setup. You should be able to just enter

FTP (your as400 dsn name)
example:

ftp as400, then you should be prompted to sign on.

 
Thanks jmd0252, I took you advise and was able to transfer to AS/400.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top