Home > AS/400 Tips > iSeries programmer tips > Dynamically transfer files via FTP
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ISERIES PROGRAMMER TIPS

Dynamically transfer files via FTP


Tim Granatir, Search400.com expert
08.27.2003
Rating: -4.33- (out of 5)


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


Here is a general-purpose program that dynamically creates an AS/400 FTP script, runs the FTP and then checks for errors. This program can be called from a job stream to dynamically transfer a file. Although this program is fully functional as is, I prefer to think of it more as a starting point for more specific types of processes.

If you are using to this to transfer save files from one AS/400 system to another, you'll want to make sure that the binary is added to your FTP script file. Also, when transferring save files, I prefer to add NAMEFMT 1 to my FTP script file so that I don't have to pre-create the save file on the system that will be receiving the save file. If you use NAMEFMT 1, you will have to specify file names in a directory type format such as /qsys.lib/mylib.lib/mysavf.savf


[TABLE]

In the manuals, it says that FTP errors should begin with a 4 or a 5 and the program FTP20C will catch those and report those types of errors. In reality, I've found a couple nuances to this approach. The first one is that if you have an incorrect system name to start the FTP, that error does not begin with a 4 or a 5. The second thing I've found, and I've only seen this when working with systems when one of


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


RELATED CONTENT
RPG iSeries programming
Migrating from RPG to EGL on IBM i
Allow access to data from a stored procedure result set using COBOL or RPG
EGL Rich UI on IBM i: Do you Dojo?
Programming for the Web on the IBM i, what is possible
A taste of COMMON: ILE, IBM releases, Web applications and new products
Documenting nested program structures on the AS/400
How to: Sort arrays using RPGIV
How to: Create an RPGLE array
How to use an embedded SQL statement and display the result in a subfile
Eight steps for creating program documentation using AS/400 utilities

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

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 GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
Report Program Generator  (Search400.com)

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


them was not an AS/400, is that some errors that I would consider warnings show up in the error file. The FTP still completes normally, but an error is logged. Your options at that point are to change your FTP script to not generate the warning or monitor for it in your error-checking program (FTP20C).

Some information about the program

FTP10C is the program that creates the FTP script, does the FTP transfer and calls the error-monitoring program. I prefer to create the FTP script file (FILFTP) in qtemp so that multiple users can run this program at the same time without interfering with one another.

A description of the parms:





---------------------------
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.




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