| f the more commonly asked questions I see in forums | | | | software automatically converts the spool file into plain |
| and by end users is how do you get your data from | | | | text format and downloads it to your computer. |
| the AS400 down to the PC in a text file format or as | | | | Operations Navigator will also convert spool files into |
| an Excel based spreadsheet. And fortunately with | | | | Adobe pdf format. |
| modern tools and software this is a very simple | | | | From here it's a very simple and straight forward |
| problem to solve. Now a days there are many | | | | process to import the plain text file directly into an |
| different ways to tackle it depending on what exactly | | | | Excel spreadsheet. You launch Excel and open the |
| your needs are and what skill-set you or your users | | | | new file, excel will recognize the format and prompt |
| have. | | | | you to add the column breaks. This method is so easy |
| First up you can roll your own tools. RPG and CL are | | | | and straight forward it can even be done by end |
| a couple of the native programming languages for the | | | | users with a little bit of training and over the shoulder |
| platform and if you can write RPG and CL programs | | | | help. |
| then you can really automate the whole data | | | | Now you can also query your AS400 directly from a |
| download process from the AS400 environment | | | | Windows client using an ODBC or OLE driver to |
| without any additional tools. You simply create a CL | | | | access the underlying database. This can be done |
| program that reads a spool file or an RPG program to | | | | using your favorite programming or scripting language |
| query a database table and write that out to another | | | | of choice that can access ODBC, which should be just |
| temporary physical file that can be queried. | | | | about all of them. Using this method you need to know |
| Manipulating a spool file this way has the advantage of | | | | how to construct an SQL statement that will be used |
| breaking it apart into the appropriate fields from the | | | | to query the data set you need. |
| source data. Once you have this information put | | | | In fact using this method before I have created Perl |
| together you can simply have the program email it. | | | | scripts to query a specific set of information, in this |
| One very simply method of emailing from the AS400 | | | | case it was daily invoices using a date parameter. All |
| is the SNDDST command. But SNDDST can be a bit | | | | the data was downloaded and dumped into a newly |
| of a pain to get working since it takes some | | | | created spreadsheet and them subsequently emailed |
| configuring. | | | | to a list of people. The whole thing was then |
| From a Windows based PC you have many many | | | | automated every day by adding it into the task |
| options to get at the data. To download a spool file | | | | scheduler on the client system. And if I recall correctly |
| you simply launch Operations Navigator, search | | | | this whole script was less than fifty lines of Perl code. |
| through the output queues for the report you want to | | | | How is that for quick and easy? |
| download and click and drag it to your desktop. The | | | | |