Home > Ask the AS/400 Experts > iSeries Application Development Questions & Answers > A program to access stored text files
Ask The iSeries 400 Expert: Questions & Answers
EMAIL THIS

A program to access stored text files

John Blenkinsop EXPERT RESPONSE FROM: John Blenkinsop

Pose a Question
Other iSeries 400 Categories
Meet all iSeries 400 Experts
Become an Expert for this site


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


>
QUESTION POSED ON: 17 March 2005
I would like to find out whether it is possible to write a program using RPG LE or CL to access text files stored in folders on Windows NT. I'd like to write directly to a DB2 file (flat file) on iSeries. i.e., there are three text files in the folder, and my RPGLE/CL programs are to read all three text files and write to the DB2 file in iSeries.

>
EXPERT RESPONSE
I have done this myself recently and used an excellent article from Scott Klement in iSeries News magazine, "RPG and the IFS; Text Files in the World". (You may have to subscribe to review these articles and to download the code.)

I also used other articles by Scott: "Don't Submit, Spawn!" to execute a directory list command, and "Communicating through a Pipe" to read the directory listing in my program. These articles are also available on the iSeries Network website, and came through Club Tech Programming Tips to those who subscribe to them. I have created a *MODULE object containing all the relevant procedures (and a few more). You can view the source code here.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Visit the ITKnowledge Exchange and get answers to your developing questions fast.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.


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


RELATED CONTENT
iSeries Application Development
Monitoring escape messages and using RCVMSG for diagnostic messages
Listing contents of multiple FTP directories on AS/400
Chain operation error after converting RPG3 to ILE RPG (RPGIV)
Space offset X'0015FF00' or X'0000000000000000' is outside current limit for object QIGC2424C
Searching fields for values
Searching part of a name or address in AS/400
iSeries application display subfiles with other program windows
Passing parameters in an ILE RPG module
What's happening to my subfile?
What happening to my subfile?

RPG iSeries programming
Eight steps for creating program documentation using AS/400 utilities
Application modernization for the iSeries: Why bother?
RPG application gets a Web revamp at Pinnacle Foods
There is very little RPG on System i can't do: From RPG nay to RPG yay!
Chain operation error after converting RPG3 to ILE RPG (RPGIV)
RPG application modernization for i5
RPG dynamic value calculation versus hard-coded values
COMMON product round-up: Modernizing the IBM System i
Top 10 System i white papers
System i date conversions in RPG

iSeries CL programming
Eight steps for creating program documentation using AS/400 utilities
DAYSPAST CLLE program for AS/400: Compares object creation date with today's date
Advanced Job Scheduler help
How do I retrieve the source for an output queue description to put in to a CL program?
Top 10 programmer tips YTD
Ways to put QSHELL to work in your day-to-day programming life
Writing to a file from CL -- revisited
Code examples to determine future end of month based on any given date
Slow system performance
Changing the font size

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



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice

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

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




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