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.