I want to write to an MVS dataset with println and all of the other PrintStream methods, but I don't want to be limited to STDOUT. Is there a way to do this?
Thanks in advance,
Earl Hodil
Open Software Technologies
Write an MVS dataset with println?
Re: Write an MVS dataset with println?
If you open a z/OS Dataset in text mode with ZFile, you can use getOutputStream() to return a java.io.OutputStream. You can then wrap this in a PrintStream.
See also the FileFactory class, which gives you a shortcut for making streams or readers on datasets.
See also the FileFactory class, which gives you a shortcut for making streams or readers on datasets.
Re: Write an MVS dataset with println?
Thanks, I've done that and now I'm finding that I get 2 records for every record that I write!
Any clue?
Earl Hodil
Any clue?
Earl Hodil
Re: Write an MVS dataset with println?
I figured it out. I just had the wrong DCB parameters. BTW, does the fopen() that underlies java, work like regular MVS OPEN? Does the program's DCB override the JCL?