S. Lott

Software developer with over 30 years of experience.


Blog

S. Lott - Software Architect

Books

Mastering Object-Oriented Python

Python for Secret Agents

More to follow... Stay tuned.

Self-Publishing

Building Skills in Programming

Building Skills in Python

Building Skills in Object-Oriented Design

Stingray

Stingray Schema-based File Reader

There are three kinds of flat files that are in common use for file transfers.

In all cases, the common theme is a schema to control file processing.

The value of Stingray is that application programs can be immune from physical format considerations. Various spreadsheet formats, include CSV, TAB, and Fixed format files can all be handled transparently.

Application programs can use the schema information to handle variability in logical layout. This makes applications simpler and more flexible.

This obsoletes the older COBOL DDE project.

When dealing with "flat files" from legacy COBOL problems, there are several problems that need to be solved.

  1. The files have a fixed field layout, without delimiters. This means that the offset of each field must be used to decompose the record into it's individual elements.

  2. Developing the offsets, signs, alignment, and redefines can only be done by parsing the "Copy Book", which has the original COBOL source definition for the file.

  3. Numeric fields can have an implied decimal point, making if difficult to determine the value of a string of digits. The "Copy Book" is essential for parsing the file contents.

  4. COBOL can make use of numeric data represented in a variety of "Computational" forms. The "Computational-3" ("COMP-3") form is particularly complex because decimal digits are packed two per byte and the trailing half-byte encodes sign information.

  5. The string data may be encoded in EBCDIC.

  6. COBOL encourages the use of data aliases (or "unions") via the REDEFINES clause. Without the entire suite of COBOL programs, the handling of REDEFINES can become an insoluable problem.

This library builds a schema via parsing DDE's to determine the offset, size, and encoding of each field. This information can be used by Python programs to process files that originate from COBOL systems.

PyVIX2

PyVIX2

A simple wrapper around VMware VIX that uses Python ctypes.

This allows simple and relatively complex access to the VIX functionality from Python. The idea is to allow sys admins to automate their VMware work flows.

PyWeb

pyWeb Tool 2.1

Literate programming is an attempt to reconcile the opposing needs of clear presentation to people with the technical issues of creating code that will work with our current set of tools.

Presentation to people requires extensive and sophisticated typesetting techniques. Further, the "narrative arc" of a presentation may not follow the source code as layed out for the compiler.

pyWeb is a literate programming tool that combines the actions of weaving a document with tangling source files. It is independent of any particular document markup or source language. Is uses a simple set of markup tags to define chunks of code and documentation.

The pyweb.w file is the source for the various pyweb module and script files, plus the pyweb.html file. The various source code files are created by applying a tangle operation to the .w file. The final documentation is created by applying a weave operation to the .w file.

Revised 9/26/2011