Plankton has asked for the wisdom of the Perl Monks concerning the following question:

Friends,
Where freinds aren't we?

I have to write IBM OS standard label EBCDIC formatted data to a tape on a Solaris system. I looked on CPAN and there doesn't seem to be anything there other that a ASCII to EBCDIC conversion module. I don't know anything about "IBM OS" I believe it is MVS. Hopefully a monk might know where I can find a Perl script to help me.

Plankton: 1% Evil, 99% Hot Gas
  • Comment on Writting IBM OS standard label EBCDIC tapes with Perl?

Replies are listed 'Best First'.
Re: Writting IBM OS standard label EBCDIC tapes with Perl?
by BrowserUk (Patriarch) on Sep 11, 2003 at 22:10 UTC

    This (courtesy of google) might give you a starting point.

    Perhaps the easiest way would be to 'obtain' a tape (perhaps from whomever you are preparing this for?) formatted to the correct requirements and see if you can read it! Then, if you can, try and emulate it.

    From my memory of the late durassic period when I was last involved in playing with IBM standard tape drives, writing a "tape mark" was a single (ioctl?) call to the device. Hopefully your drive has a similar, compatible facility.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
    If I understand your problem, I can solve it! Of course, the same can be said for you.

Re: Writting IBM OS standard label EBCDIC tapes with Perl?
by submersible_toaster (Chaplain) on Sep 12, 2003 at 01:48 UTC

    <oozing sympathy>Poor Monk</oozing>
    Someone has really dropped you in it here haven't they? I hope you didn't smile an nod to this job before it landed on your desk.

    Knowing next to nothing about IBM OS, I would suggest you arm yourself with documentation about.

    • IBM OS
    • the application used to generate the tapes
    • the whole EBCDIC ASCII ball of mud

    Some things that will trip you up like variable block sizes/record lengths you have already discovered. Getting OT now but your question might have generated more responses if you explained a little more about the environment you are working on the tapes in.

    Do you hate Talking to Magnetic Tapes too?


    I can't believe it's not psellchecked
Re: Writting IBM OS standard label EBCDIC tapes with Perl?
by dmitri (Priest) on Sep 11, 2003 at 21:36 UTC
    dd(1) just might do the trick.
      dd does convert asscii to ebcdic but it does NOT write the IBM OS standard label. Also later I need to read EBCDIC tapes created on a IBM mainframe that have variable lenght records. dd seems to completely ignore files on the tape where written like that.
      Plankton: 1% Evil, 99% Hot Gas.
        Unfortunately, I don't even know what that means :) I just threw it in as a suggestion -- instead of writing a converting module, one can just use dd.
Re: Writting IBM OS standard label EBCDIC tapes with Perl?
by waswas-fng (Curate) on Sep 12, 2003 at 01:42 UTC
    have you messed arount with the conv=ebcdic setting and dd? I have used it in the past to make IBM readable tapes.

    -Waswas