Joined: 06 Jun 2008 Posts: 8279 Location: Dubuque, Iowa, USA
C programs and MVS files coexist, sort of. You need to review the requirements carefully -- there are ways to do what you want but the manual needs to be referenced to ensure you do it correctly. For example, I thought fputs worked with null-terminated strings; just how do you get a null-terminated string from an input file record?
You need to open both files, read a record from the input file, and write to the output file, repeating until EOF -- which implies a loop is needed. Remember that files under Unix (and C) are not anything like MVS files.