The example JCL that I posted offloads the Perl processing to a Linux server - that part of the "hybrid batch" job doesn't run on z/OS.
IBM Ported Tools for z/OS Perl ( http://www-03.ibm.com/systems/z/os/zos/features/unix/ported/perl/index.html) supports Perl version 5.8.7. But, as is often the case, I have no idea if the SpreadSheet CPAN module will work on z/OS or how much porting would be required to use it on z/OS Unix. So, offloading the Perl to a real Linux image using a Co:Z Hybrid Batch job step avoids that issue - you can install any version of Perl on the target Linux image that you want. --Steve Dovetailed Technologies www.dovetail.com On Mon, Sep 17, 2012 at 12:00 PM, Scott Ford <[email protected]> wrote: > Excellent, what version of Perl is supported on Unix System Services, v5 ? > > Scott ford > www.identityforge.com > > On Sep 17, 2012, at 11:52 AM, Steve Goetze <[email protected]> wrote: > > > 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 > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
