[Info-vax] Coding Excel files...
VAXman- at SendSpamHere.ORG
VAXman- at SendSpamHere.ORG
Wed Feb 12 15:31:24 EST 2014
In article <ldg9ak$soa$1 at news.albasani.net>, Jan-Erik Soderholm <jan-erik.soderholm at telia.com> writes:
>{...snip...}
>
>Not at all. The data is usualy in some Rdb table (written by the
>Cobol applications) and some batch job runs Python and creates
>the XLS files (using the Python Rdb interface and the Excel
>tools). Sometimes the Cobol code submittes the batch job or
>it can be done using a table trigger.
Good grief. I hate COBOLlers LIB$SPAWNing shit all over the place. I hate
it even more when the LIB$SPAWN a SUBMIT command.
>Another Cobol app writes data to a table and a table trigger
>submittes a job that uses the Python PDF ("ReportLab") tools
>to create PDF reports (accessed through the web server, WASD).
So, if I've read you right, you're running a Python script in a BATCH job to
convert tabled data to XLS.
>I'm sure Perl works fine also, but I personaly don't like Perl. :-)
>Python feels more "modern" and structured.
No real PERL (save to figure out how well the class libraries handled the
Excel output. I link those bits into C code which the customer can call
from their COBOL. The most COBOL I ever wrote was to show them how to do
the call. Strange, they'd never seen the:
INSPECT blah-blah TALLYING blah-blah-LEN FOR CHARACTERS BEFORE SPACES.
...syntax before I'd used it. I thank Google for that COBOL syntax.
They then invoke the call:
CALL "Table2Excel" USING BY DESCRIPTOR table-data-descriptor
BY DESCRIPTOR Excel-FILE(1:Excel-FILE-LEN)
BY DESCRIPTOR Image-FILE(1:Image-FILE-LEN)
BY DESCRIPTOR "Orange" <==header bg color
BY DESCRIPTOR "Black" <==header fg color
GIVING RET-STATUS.
There's no need for unnecessary process creation and waiting about for
that process to complete. It's all done, and quite quickly too, in the
context of the caller.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG
Well I speak to machines with the voice of humanity.
More information about the Info-vax
mailing list