Home > AS/400 Tips > iSeries programmer tips > Automatically download data for a PC
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ISERIES PROGRAMMER TIPS

Automatically download data for a PC


Thomas S. Wojcik
02.13.2003
Rating: -4.44- (out of 5)


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


Do you have any users who have a special request to download iSeries 400 data off the system, but they don't know SQL, don't know how to use iSeries commands or have access to a command line (thank goodness!), and can't find the Customer Master file for Client Access File Transfer even though it is obvious to anyone that it is MYCMPDTALIB/CSTMSTRP?

Oh, and by the way, they need that refreshed every morning before they start at 6:30 a.m., but you don't normally come in untill 8 a.m.

You know SQL, how to use commands and write programs to create extract files, and you can find the Customer Master file with one of your typing hands tied behind your back. BUT refreshed before 6:30 a.m. when your day doesn't usually end till 6:30 p.m. or later? Can this be done automatically without you coming in at 6 a.m.?

Absolutely -- if your users and the iSeries 400 are on a TCP network (Ethernet) and they are using Windows PCs. Since that includes probably 80% of the iSeries world, here's what you can do.

1. Set up a network shared drive off the your ROOT directory of your Integrated File System using Operations Navigator and make it accessible to users. This will be where you will put your downloaded file.

2. Make sure that your NetServer TCP server is started on your iSeries 400. One way that you can tell if it's working by opening up Windows Explorer on your PC and searching the Network Neighborhood for a system with the IP address of your iSeries. You should see the available shares. Your PC will just think of them as another hard drive on the network, which is what they are now.

3. Develop the code to create your download file using SQL, commands, programs, etc. or simply note the database file you want to make available.

4. Create a CL program that contains the code to create your download file and add the CPYTOIMPF command in the following format ... CPYTOIMPF FROMFILE(YOURLIB/DOWNLOADFL) TOSTMF('/sharedir/downldfile') STMFCODPAG(*PCASCII) RCDDLM(*CRLF).

5. Use the iSeries 400 Job Scheduler to run your CL program every morning at 5:00 a.m.

6. Send your user an e-mail telling them where they can find the file, that they can use Excel (does anyone not working for IBM use anything else?) to open the file, and when they are prompted whether the file is Delimited or Fixed Format say Delimited, click Next and then click Comma for a delimiter then click Finish.

Your users can then start analyzing, reporting, graphing, or whatever else they want to do with the data since they will have it in the spreadsheet format they know and love waiting for them when they come in each morning., nd you can continue to lead your wanton lifestyle with your 8:00 a.m. starting time.

*** BONUS TIP ***

ter you satisfy the first user request for automatically downloaded data you will undoubtedly get inundated with others. Not too much of a problem since duplicating the process is very easy after the first one. All you need to do is create and add download CL programs to the Job Scheduler.

The bonus tip is to not do the second, third, fourth, etc. requests too fast. Take a little time before you notify the user that the request has been completed. The extra time will let them develop an appreciation of the your skills and knowledge. Too fast and they think that your job is a piece of cake. They will also have time to change the specs on their download request before you do the job instead of after all your work is done like they usually do it.

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

The Best Web Links: tips, tutorials and more.

Ask your programming questions--or help out your peers by answering them--in our live discussion forums.

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


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.




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


RELATED CONTENT
iSeries CL programming
An automated CL method of moving a query from AS/400 to Excel
Changing user password expiration
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

iSeries programmer tips
What is an integrated database?
An automated CL method of moving a query from AS/400 to Excel
Using SQL on System i to create multicolored comment lines
Eight steps for creating program documentation using AS/400 utilities
DAYSPAST CLLE program for AS/400: Compares object creation date with today's date
Coloring source lines with COBOL and using a shortcut from within PDM
Date calculation commands for AS/400
There is very little RPG on System i can't do: From RPG nay to RPG yay!
Using SQL on System i to color source code and inline comments
Controlling spool files with APIs

RPG iSeries programming
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
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

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

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