My experience with host computers is very limited, but depending on the type of your host you might want to consider the Perl/VMS build and look whether they have VSAM support or not. Other than that, I would try to program a client to the host program that sucks out the data through the 3270 terminal emulation if you have that kind of access to the host.

There are also some commercial products out there that (claim to) create code to read files from the COBOL PICT statements or copybooks. Many host programs also have the capability to generate lists as output (formerly intended to be printed), maybe you can rework those lists into something to be processed.

On the other side, the question is why move away from the host at all ? If you manage to achieve a critical mass of COBOL programmers (I guess 10 persons), you can even set up a COBOL shop and do work for other people.

Disclaimer: I don't find COBOL fun and haven't yet programmed a single line in it, but many host applications are old and do the work they were intended to - so never change a running system.

Update:As mikeB does point out to me, if you are lucky, you are on OS/390, there is also a Perl build for it, and I'd guess that there is some documented way of getting at VSAM files in some fashion. Also, a google search for Perl 390 VSAM gives http://pvhp.best.vwh.net/os390/OS390-Stdio/OS390-Stdio-0.005.html among others as a result, which discusses the OS390::Stdio module that exports some functions that sound interesting : vsamdelrec,vsamlocate and vsamupdate.

perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web

In reply to Re: How can I read Vsam files. by Corion
in thread How can I read Vsam files. by prgeorge

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.