Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Add new line character to and ebcdic file

by Anonymous Monk
on Apr 15, 2013 at 10:29 UTC ( [id://1028717]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Add new line character to and ebcdic file
in thread Add new line character to and ebcdic file

Where did the newline go?
$ perl -MData::Dump -MConvert::EBCDIC -e " dd Convert::EBCDIC::ascii2e +bcdic(qq{hi\n}); " "\x88\x89%" $ perl -MData::Dump -MConvert::EBCDIC -e " dd Convert::EBCDIC::ascii2e +bcdic(qq{\r\n}); " "\r%" $ perl -MData::Dump -MConvert::EBCDIC -e " dd Convert::EBCDIC::ascii2e +bcdic(qq{\n}); " "%"

% must be ebcdic for \n

Replies are listed 'Best First'.
Re^4: Add new line character to and ebcdic file
by gkol0279 (Initiate) on Apr 15, 2013 at 11:20 UTC
    I can see '%' in my output file. Here is the sample of how it is being printed:
    ð÷ððððððððððòðòòðõñóðóñðóðððóùðòøøð +ðððððððððððððððððððððððððððÃððððððð +ððððððððððððððððððððððððððððððððððà +°Ã°Ã°Ã°Ã°Ã°Ã°Ã°Ã°Ã°Ã°Ã°Ã°Ã°Ã°Ã°Ã°Ã°Ã°Ã°Ã°Ãðððððððððððð%ð +÷ðòñ@@@@@@@ðñðñõòòðñóðòòôððóòñöóñðöùö@@ +@óðõòõñùòñöððððôùøöóùöõòðùõ@@ð@@ððõùð +ððððððð@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ðò@ððððððððððà +°Ã°Ã°Ã°Ã°Ã°Ã°Ã°Ã@@@@@@@@@@@@@@@@@@@@@@@@@%ð÷ðòñ@@@@@@@ðñðñõ +òòðñóðòòôððóòñöóñðöùö@@@óðõòõñùòñöðð +ðÃ÷ðóøøöòðððóðóôùøöóùöõòðùõ@@ð@@ððõùð +ððððððð@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ðò@ðððððÃ@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@%
    I need the above to be printed line by line not continously.
      I get an input file, which i read line wise and then convert each record from ascii to ebcdic format. After conversion, i have to write this to an output file. Then read the next record and do the same and print it in the next line.

      Why do you need to print out the ebcdic file into a human readable ascii format? In your op your requirement is to convert the input file record by record into ebcdic lines which you have done. This is then then sent to IBM. IBM will presumably do any necessary conversions into readable formats if they need to.

      Asked in different words: What you want is translate everything to EBCDIC except the newlines so that you can look at the output on your ASCII terminal?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1028717]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (8)
As of 2024-03-28 15:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found