Home > AS/400 Tips > iSeries programmer tips > FTP tips you might not know about
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ISERIES PROGRAMMER TIPS

FTP tips you might not know about


Tim Granatir, Search400.com expert
12.18.2002
Rating: -4.14- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



[TABLE]

FTP is a necessity when transferring files to and from the iSeries. This week site expert Tim Granatir provides a collection of miscellaneous FTP tips that address such subjects as the batch FTP process, logging FTP results to a file and getting to the Integrated File System. Check them out and see if there's anything you can add to your bag of tricks.

1. Example of transferring a file to an iSeries without having to create the save file on the target iSeries

You always need to use binary when transferring save files but the real key here is the use of the NAMEFMT 1 command. When you use NAMEFMT 1, you will need to specify your file names in the same way that you would if you were using the IFS.

2. Batch FTP process from the iSeries
This is similar to the DOS batch file approach but just slightly different.

Here is the example code for the CL program on the iSeries:

Here is the example for the Input file:

If you override the file INPUT before the FTP command, FTP will use the file you specified for your FTP commands. The file containing your FTP commands can either be a source file or a physical file.

3. Logging FTP results to a file
If you override the file OUTPUT before doing your FTP command, your FTP commands and results will be logged to the file you specified.

4. Running system commands on a remote iSeries
Using the SYSCMD function in FTP allows you to run system commands on the


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
iSeries programmer tips
Groovy programming on IBM i
EGL Rich UI on IBM i: Do you Dojo?
Running PHP open source applications: NOBODY needs authority
Programming for the Web on the IBM i, what is possible
Using geocoding on AS/400 to enhance your Web presence
The best technologies and tools for System i programmers in 2009
Seven IBM i project lessons learned in 2008
Documenting nested program structures on the AS/400
What is an integrated database?
An automated CL method of moving a query from AS/400 to Excel

PC/Windows Connectivity
CA Express utility helps you manage SSL certificates
Windows XP SP2 causes problem for iSeries Access
Top 10 tips from our experts
The registration facility helps you tailor your system -- Part II
20 FTP tips in 20 minutes
Are your terminal sessions secure?
Top advice on connecting to the iSeries
Fast guide to PC/Windows connectivity resources
The Lazy Coder: Find your iSeries using a DNS or name server
The Lazy Coder: Fun with TCP/IP

Application Development
iSeries calling an .exe
Top 10 programmer tips
Formatted work job scheduler
Convert system date and time
Mixing free format code with embedded SQL
SQL update a field in one file from a field in another file
Webcasts for iSeries programmers
Programming advice from the pros
Easy code copying via the drag and drop method
Setting FTP time-outs

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


remote system.

Example:
From a non-iSeries -- quote rcmd sndmsg msg(hello) tousr(myuser)

From iSeries to iSeries -- syscmd sndmsg msg(hello) tousr(myuser)

5. Increasing the amount of time before a connection automatically closes
Quote time 1000 -- Increases idle time to 1000 seconds

By default, FTP automatically disconnects after five minutes of inactivity. This will increase that amount of time.

6. Getting to the Integrated File System

After you make your FTP connection to the 400, go to the root directory and add your directories as needed. Example:

When you switch to the root directly, make sure you use a forward slash instead of a back slash. Also, when you change to the root directory, OS/400 changes the NAMEFMT to 1 for you.

7. FTP DOS extensions
I have used some of these extensions but not all of them. This is a useful reference if you need to do any DOS batch files with FTP.

---------------------------
About the author: Tim is vice president of Technical Services at Interlink Technologies in Maumee, Ohio, where he serves as chief architect for their warehouse management system. He has worked in the banking, insurance, healthcare and distribution industries in various positions, including programmer/analyst, systems analyst and DP manager. Tim has worked on IBM midrange platforms since 1983.

==================================
MORE INFORMATION
==================================


Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



iSeries Security - Security Tools, Physical Security and System Security
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts