¿ªÔÆÌåÓýAm 06.06.2022 um 02:30 schrieb Mark A.
Stevens via groups.io:
To be honest, I don't like either, as they both appear to be a kludge. If I had to pick, I would recommend the first and forget the second. That and $3 might buy you a cup of coffee ;-) and if it matters and you have to or want to keep the external characteristics in the code, I'd recommend, as those extra items would come after the 'standard' C parameters. The syntax of the IBM compilers is as follows: fopen("my.file","w,recfm=v,lrecl=300,blksize=304"); that is, the second parameter which contains the mode and all the
additional options I understand the challenge is dealing with record based I/O rather than stream I/O. Is this a case of not putting that information in the code and leaving it to a FILEDEF to handle the external characteristics? Then your code would be more portable because you would be externalizing those items which are specific to IBM. This is, of course, possible with VM and with MVS; you can specify all the options on FILEDEF or on DD statements (in MVS JCL); the parameters on fopen are just an additional method which must not be used. I never use it, just to keep my programs as portable as possible, so that they run with minimum changes on Linux and Windows etc. and on the mainframe environments. HTH kind regards Bernd |