0

I am having an issue while converting ebcdic to ascii format. The ebcdic file which is on mainframe has creation and modification time back in 1990 and when I migrated them to Linux, their modification time became 2018. How can I change back so that all the files which I migrated from mainframe to Linux will have the same timestamp which is from 1990?? What kind of script will help to this problem? or maybe commands.. Anything would be helpful! Thank you

flow
  • 63
  • 6
  • AFAIK, you're going to need a data translator, or build one yourself (you'll need character conversion tables to do it) -- I don't think there is a "built in" way with Linux `Shell` or `Bash` to get these dates directly "translated" into ASCII format .. I think you're going to be stuck programming to "build" one, or find specific software that has it built in. Like I said, this is AFAIK -- I hope someone else has better news! – Zak Oct 23 '18 at 20:27
  • Yeah, the problem is that I already migrated all the files but the creation time is from today, and in mainframe they start from 1990. I don't know how to solve this issue... – flow Oct 23 '18 at 20:33
  • if you don't have any table or file or mainframe directory listing that has the correct dates, I don't see how you can fix this. You need the correct dates with filenames, put those in a file called datemap.txt. Then you can read thru that file and create a `touch -t ${oldDate} $file` command that will change the modified datestamp of the linux file to the mainframe date. Not that difficult if you know shell scripting, but not something I can work on. Search here for `[bash] touch change modified time` and you might find some good starting places. Good luck. – shellter Oct 23 '18 at 22:19

0 Answers0