Re: first 200 charactes of an EBCDIC file

From: Nick Landsberg (hukolau_at_NOSPAM.att.net)
Date: 03/11/04

  • Next message: Nick Landsberg: "Re: Question - reading command line parms inside a script."
    Date: Thu, 11 Mar 2004 00:12:54 GMT
    
    

    samuels@red.seas.upenn.edu wrote:

    > thanks.
    > i tried this but it only gets the first 200 characters of the file, not of every record within the file.
    > any other suggestions?
    > -maurice
    >
    > Ken Andrews (gobble@degook.com) wrote:
    > : <samuels@red.seas.upenn.edu> wrote in message
    > : news:c2nffv$4qns$1@netnews.upenn.edu...
    > : > hi,
    > : > i have a ebcdic file that contains variable length records, is there any
    > : unix command that i can use to take the first 200 characters of every
    > : > record from the file and output them to another file? i'm thinking i can
    > : use dd to do this but am not sure.
    >
    > : I don't have an EBCDIC file to test with, but at a WAG you might be able to
    > : use "cut -c 1-200".
    >
    > : With "dd" you might go "cat source | dd conv=ascii | cut -c 1-200 > target"
    >
    >

    It's been a LONG time since I've had to convert EDCBIC so some
    of this may be off base.

    The "cbs" parameter may be what you need to give to dd.

    dd conv=ascii cbs=200 if=source of=target

    No guarantees, but some old unused brain-cells clicked
    on that one.

    -- 
    Ñ
    "It is impossible to make anything foolproof because fools are so 
    ingenious" - A. Bloch
    

  • Next message: Nick Landsberg: "Re: Question - reading command line parms inside a script."

    Relevant Pages

    • Re: Threshold Aliens Lurk Offshore
      ... > Premiering Friday, Sept. 16, the CBS show focuses on the ... > top-secret squad of specialists brought together to determine the ... > characters, "they're plucked out of their lives by federal agents ...
      (rec.arts.tv)
    • Re: Best unseen character in tv history?
      ... Berneice Green from the 'Red Green Show' or actually a host of oither ... characters from Red Green Show, ... Or the Mayor's secretaries ... Jason "Didn't know there were any networks besides CBS until 1982" Todd ...
      (rec.sport.pro-wrestling)
    • Re: Cell validation
      ... I'm beginning to think the only "foolproof" way to do this might be this formula... ... although I do note some ALT+0### "type-able" keyboard characters will pass the test; however, it would be foolproof for the "normal" keyboard characters. ... First 5 should be alphabets, next 4 should be numbers and the ...
      (microsoft.public.excel.worksheet.functions)
    • Re: Lyles names for Dave
      ... best thing they've had since Johnny Dark Oldest CBS Page. ... Too bad, by their very nature, these characters only have a limited ...
      (alt.fan.letterman)
    • Re: Racism Hits Televised Poker
      ... like when there is a sitcom on NBC / CBS / FOX featuring mainly ... characters, they mandate that there be a white main character too. ...
      (rec.gambling.poker)