Amduus Open Source collection

This book is the index of the Amduus Open Source collection, created by Scott Augé.
You can find the complete repository at http://www.oehive.org/amduus/


Amduus Information Works Ezine Archive

An index of Ezines.


Blue Diamond

Blue Diamond allows programmers familiar with Progress Software Corporation’s E4GL programming language and 4GL language to extend their applications to the web interface without the use of Webspeed Transaction Server or Webspeed Workshop.

VARs that use E4GL to construct their applications for Webspeed can modify those programs in a very simple manner to run it on Blue Diamond.

The BlueDiamond code and documentation is here: http://www.oehive.org/amduus/BlueDiamond/


Cache manager

Often in web applications we will need to draw up a large set of result data stored in a table. This often takes a lot of time to pull out of the main tables, collate, and join together fields. This can become expensive on pages only meant to display a portion of the data at a time (the concept of “paging” the data so the web page is manageable to read.) By using a cache manager, it will be easier to store the result set to disk and use some procedures to pull back “pages” of data that we desire.
This manager can be used in Web 1.0 as well as in AJAX type web applications.

DISCUSSION

The cache manager is a persistent procedure. One can have many caches in a given program. This is achieved by merely creating new persistent procedures to store different result sets to be cached and manipulated.

We also need the cache manager to be flexible enough to handle multiple types of tables or temp-tables.
This code can handle both types though temp-tables will likely be most useful.

The cache manager will be able to store multiple types of fields and different collections of fields.

More documentation and the code are in the "amduus" repository: http://www.oehive.org/amduus/CacheMgr/


Denkh HTML Reporter

More and more often companies are asking for output in PDF files. They can be more visually sophisticated with fonts, bolding, lines, bar graphs, etc. One of the problems with HTML is the lack of page numbering on listings. This can be accomplished in PDF with headers and footers available too!

Denkh is in the "amduus" repository: http://www.oehive.org/amduus/Denkh/


DOM Tool Kit

Working with the DOM ABL statements can be a bit grueling. This tool kit makes four easy to use procedures and functions to read any given instance of an XML document tag's data or it's attributes based on the ideas found in Javascript.

A sample use:

Given

 
<?xml version="1.0" ?>
<Books>
  <Book>
     <Title subject="SciFi" entry="one">War OF The Worlds</Title>
  </Book>
  <Book>
     <Title subject="SciFi" entry="two">Battlestar Galactica</Title>
  </Book>
  <Book>
     <Title subject="SciFi" entry="three">Star Wars</Title>
  </Book>
</Books>


RUN DOMParse.p PERSISTENT SET hDOM.

RUN LoadXMLDoc IN hDOM ("\\osxlaptop\scottauge\Desktop\DOM\test.xml").
RUN GetError IN hDOM (OUTPUT cErr).
IF NOT cErr BEGINS "000" THEN DO:
DISPLAY cErr.
RETURN.
END.

RUN NumOfTags IN hDOM ("Title", OUTPUT iCount).

RUN getElementByTagname IN hDOM ("Title", 2, OUTPUT cData).
DISPLAY cData.

RUN getAttributeByTagname IN hDOM ("Title", 2, "entry", OUTPUT cSubject).
DISPLAY cSubject.

DISPLAY iCount.

DELETE OBJECT hDOM.

Where to find it?
http://www.oehive.org/amduus/DOM/


Dynamic Query Tool Kit

A set of routines to aid with developing software containing dynamic queries. It greatly simplifies coding and readability.

With Progress Version 9.1, a very powerful feature was added to the language – dynamic queries.

Great as they are – it takes a lot of work to make use of this new feature. It is the purpose of this tool kit to aid with simplifying dynamic queries for the developer.

The tool kit provides a set of functions that can be used to open, navigate, extract data from, and close dynamic queries in a straight forward and easy to use manner.
In my opinion it is the way it should have been done in the first place – but hey – gives me a chance to shine with my programming.

This tool kit should allow you to work in GUI, CHUI, WWW, and CLI based environments effortlessly.

One simple example to start with:

{dyntoolkit.i}

DEFINE VARIABLE h AS HANDLE NO-UNDO.

ASSIGN h = dyn_open("FOR EACH Job NO-LOCK").
DISPLAY cDyn_ErrCode cDyn_ErrMsg FORMAT "x(30)".
REPEAT:
   dyn_next(h).
   IF dyn_qoe(h) THEN LEAVE.
   DISPLAY dyn_getvalue(h, "Job.JobID")
           dyn_getvalue(h, "Job.Name")
           dyn_getvalue(h, "Job.Priority")
           dyn_getvalue(h, "Job.ErrCode").
END.
dyn_close(h).

** Where to find the package
http://www.oehive.org/amduus/DynToolKit/


EQN

The software began as a simple algebraic calculator. Send it an algebraic expression in a string and it would return a string representing the numeric result.

The idea was that software using the system would be able to keep equations in a parameter file or database table allowing the user to manipulate not just the numbers for a value in the system, but how to calculate that value to begin with!
Imagine allowing a user to not only tweak numbers of an inventory level equation, but to configure the actual equation to determine inventory levels!

Soon it became obvious we should have the ability to have user defined formulas available to the application. Users needed some formula’s that would be used in other formulas. Having a notation and ability for the system to know about all the formulas without programmer intervention was needed.

Users being users soon discovered that under some conditions values needed to be evaluated in one fashion and under other conditions they needed it evaluated in another fashion. Formulas are good for functional decomposition, but they were evaluated the same way all the time. Sometimes formulas needed to be evaluated multiple times with different values. User’s needed the power to set a formula for a value under varied conditions, and so they needed a language to aid in when to calculate a value and when to define how to calculate a value.

More: browse the EQN project:
http://www.oehive.org/amduus/EQN/


Kitty chatboard

Kitty is a simple chat board written for use with Webspeed and Progress.

Features:
- Generating web pages from data in the database
- Login security
- Control over who has access to what information
- Using a state table to storeWIP info (instead of exposing it all as HTML form hidden values the user can mess with.)

Browse the code: http://www.oehive.org/amduus/Kitty/


Natural Language

dollars.p - converts decimal amount to text

http://www.oehive.org/amduus/NaturalLanguage/


pro2jdbc

pro2jdbc - Progress to JDBC interface

pro2jdbc.p usage:

  1. Run pro2jdbc.p as persistent procedure then open server connection usging jdbcOpenConnection() (that two steps might be done at the beginning of your application).
  2. Run several selects using jdbcExecuteQuery(), retrieve records using jdbcGetRecord().
  3. Finally close connection using jdbcCloseConnection() and remove persistent procedure (that two steps might be done at the end of your application).

http://www.oehive.org/amduus/pro2jdbc/


pro2my or pro2myv2

Pro2My is a simple group of PROGRESS source code routines that can be run against any PROGRESS database greater than version 6 to produce a series of files containing MySQL format SQL statements. These files can be used to produce a MySQL database that is a mirror of the PROGRESS database. The routines provide a method of:

browse the code (protomyv2): http://www.oehive.org/amduus/pro2myv2/


pro2mysql

Interface for Progress 4GL to query mysql databases.
Functions work like they do in php.

code: browse the code in the Subversion repository http://www.oehive.org/amduus/pro2mysql/

contributed by Matthew Lang


pro2myv2 amduus edition

Use of CLI tools for exporting of Progress schema and data to MySQL with Amduus modifications to Mark Newnham's Pro2myv2 Open Source tool.

The open source tool pro2myv2 has been modified by Amduus to be more UNIX oriented. (It originally was GUI oriented and can still be used in a GUI environment.) This way it can be used from a non-GUI environment and from cron for automatic data exporting and loading from Progress to MySQL.

Attn: This tool requires a developers or query license for the version of Progress it is being used on.

Attn: This tool has been tested for compatibility on Version 8, Version 9, and Version 10 of Progress.

The command exportschema.bash is used to export the schema of the database attached to via the -pf argument of the script. It will export the database as MYSQL_logicalnameofdb.SQL. This file can be directly imported into a MySQL database cluster via the mysql command.

browse the code: http://www.oehive.org/amduus/pro2mysql_amduus_edition/


pro2pgsql (Progress to PostgreSQL)

A set of 4Gl routines to migrate schema and data from a Progress DB to a PostgreSQL database.

** Package:

http://www.oehive.org/amduus/pro2pgsql/


prosql

Often I have needed to integrate Progress Databases with other applications. These applications have a horrible time talking to Progress. Yes, I know, “But, but, but there is the ODBC and JDBC connections!”
Well, that is nice if you are on Windows. I am on UNIX or some non-Progress supported operating system or using some form of middle-ware (read that as PHP, Perl, etc.) to make the integration with. Sometimes it has ODBC, sometimes it doesn't.
Sometimes it is a device that needs to interact with Progress DBs and the infrastructure just is not there.
I am also usually on a budget (hence no message-ware.)
If all you want to be able to do is open a connection to the database, throw some SQL statements to the thing, get some results and error information, and be done with it – then this is the software for you.
Hence this tool's creation. It most certainly can be improved upon – but it IS functional.

click here to browse the code: http://www.oehive.org/amduus/prosql/


Session Variable Manager

The variable manager is a super procedure which can replace the functionality usually provided by SHARED and GLOBAL-SHARED variables, as well as adding functionality such as access permissions.

See "SessionVariableManager" in Amduus code repository: http://www.oehive.org/amduus/

by Tim Keuhn


WSWiki

What is it? A wiki for Webspeed or other Webspeed source code compliant alternatives
Where to get it? http://sourceforge.net/projects/wswiki/


Zammi application compiler

In the AppBuilder there is a propath compiler – of sorts. It is more like a collection of paths and it is up to the programmer to sort it all out. Once you move onto another project – that's right, you loose all those configurations should you need to come back.

This is something distinctly missing from the web based programming tools too. There doesn't seem to be a tool that will walk up and down the propath looking for HTML to convert and .p/.w's to compile. I have encountered applications with so many files in them, the File Tools in
Web Tools funks out if one tries to compile them all at the same time.

There are other propath based compilers out there – but often they are parts of other tools and that means a lot of baggage for one piece of functionality. I don't like to wade through a bunch of other stuff (often poorly documented) only to do 1% of what it is capable of doing. The UNIX way is to have a certain tool to do a certain piece of functionality.

Another thing is with the AppBuilder, one cannot have nightly compiles (aka “builds.”)
Sometimes it takes an hour or so to compile stuff up. Might as well do it at night and have a report made available in the morning.

Sometimes on a tricky install, you simply want to compile the whole works in case the client decides to add fields to tables, etc. on their own.

If you can understand a script similar to this:

./compile \
-propath "/appl/schdeve/work:/appl/schdeve/source" \
-xref \
-listing \
-dlc /prg/101a \
-pf /appl/schdeve/parm/all.pf

You pretty much have it under control.

Where to find the latest downloads?
http://www.oehive.org/amduus/Zammi/


Zeno process-spawner

The Zeno processor is a framework of scripts and code that allows the user to spawn off on or more processes on one or more machines to handle requests.

Browse the code (and documentation): http://www.oehive.org/amduus/Zeno/