Joseph L. LeBlanc
homeportfoliojoomlabiocontactblog
articles
guides
tutorials
all
forum
Subscribe in NewsGator Online

Learning Joomla! for the first time? Buy the Joomla! 1.5 Essential training CD-ROM or watch it on Lynda.com.

 

Welcome to Joseph LeBlanc's Joomla resources. First time visitors will find the Daily Message Component Tutorial to be helpful. (Daily Message for Joomla 1.0 is also available, as well as many other tutorials based around it). In addition to the tutorials, there are articles covering conceptual topics, such as the oft-asked question "What is the difference between a component and a module?" To receive alerts for new tutorials and articles, choose a newsfeed at the right appropriate for your newsreader.

PDF Print E-mail
The Balance Extractor
The Balance Extractor sifts through the output of an Oracle server to get desired information. The original output is formatted for printing, rather than  further digital use. The data is extracted into fixed-width columns, along with the account numbers, so that Microsoft Excel can import it. Several issues prevent the client from importing the data straight from the Oracle server output. Click here to see a sample of the original output, with numbered points indexing problems. (Confidential information has been blacked out.)

These are the challenges presented by this output:

1. The desired data. All of the information the client really was is on one line. Each of the values on that line need to be extracted and put into column format so that Excel could import them.
2. Different account identifiers. Two different kinds of account numbers are used. One has 7 digits with two letters while the other has an '@' symbol, followed by eight digits. Both have to be detected.
3. Duplicated account identifiers. Every time there is a page break in the Oracle output, the account number repeats. This extraneous number must be ignored.
4. Page banners. Each page break in the output also introduces a page banner that must be detected and ignored.

After analyzing the problem, a Perl program is written to extract the account balances and write them out to a text file in fixed-width columns. Microsoft Excel easily reads this file and allows the client to complete his task. An example of the results of the Perl program may be viewed here.