locked
Cobol files and C# RRS feed

  • Question

  • Does anyone have a routine to read cobol files and send it to a readable txt file or to a mdb, dataset ??? Something that we can work with ?

    Thanks

    Tuesday, August 1, 2006 3:02 PM

All replies

  • how exactly do you mean "read cobol files" ?

    are cobol files plain files where you can view them from say notepad when you open a cobol file?

    You can read any file using a StreamReader:

     

    StreamReader theReader = new StreamReader("Filename.ext");

     

    Then you can read the entire file:

     

    string theContentsOfFile = theReader.ReadToEnd();

     

    Before continuing, are you able to tell us what you mean by "reading cobol files" - how does a cobol file look like? (the source file). Is it "readable" to us humans if we opened the cobol source in notepad?

    Tuesday, August 1, 2006 4:27 PM
  • It's a file that, I don't anything about it, I can open with the notepad but I can't copy it to paste here....it just paste a "0~" nothing more... the files extension is .idx and .dat

     

     

    Tuesday, August 1, 2006 4:32 PM