If you would like to pursue the Hybrid Batch / Perl Linux suggestion,
here's a sample Co:Z Launcher job that runs a perl program to read input
data from a z/OS dataset and write the output in .XLS format to another
dataset.  The perl program itself is a PDS member on z/OS, so nothing is
required on the Linux image except Perl and the Spreadsheet CPAN module.
 Linux can be on a zBX, Z IFL or any other remote linux server.

//RUNCOZK EXEC PROC=COZPROC,
//   ARGS='[email protected]'
//PERLSRC DD DISP=SHR,DSN=HLQ.PERL.SOURCE(MAKEXLS)
//INPUT   DD DISP=SHR,DSN=...
//OUTPUT  DD DSN=&&XLS,DISP=(NEW,PASS),
//        DCB=(RECFM=U,BLKSIZE=27998),
//        SPACE=(CYL,(3,3))

//COZCFG DD *
saf-cert=SSH-RING:RSA-CERT
//STDIN DD *
perl <(fromdsn DD:PERLSRC) <(fromdsn DD:INPUT) >(todsn -b DD:OUTPUT)
/*
//

=============== MAKEXLS Perl source ===================

#!/usr/bin/perl -w

    use strict;
    use Spreadsheet::WriteExcel;

    my $input = shift;
    my $output = shift;

    open (INPUT, $input) or die "$input: $!";

    my $workbook  = Spreadsheet::WriteExcel->new($output);
    my $worksheet = $workbook->add_worksheet();

    # Row and column are zero indexed
    my $row = 0;

    while (<INPUT>) {
        chomp;
        # Split on semicolon
        my @Fld = split(';', $_);

        my $col = 0;
        foreach my $token (@Fld) {
            $worksheet->write($row, $col, $token);
            $col++;
        }
        $row++;
    }

========================================================

This example uses the CPAN Spreadsheet module.  This article is a pretty
useful starting point:

http://www.linuxjournal.com/content/generating-native-excel-files-perl

The module documentation itself is here:

http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel-2.37/lib/Spreadsheet/WriteExcel.pm

--Steve
Dovetailed Technologies
www.dovetail.com

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to