On Sun, 22 Apr 2018 18:29:38 -0400, Hobart Spitz <[email protected]> wrote:
>That's said, I can answer the question, for C/C++, as follows. (I pose the >question for Java, below.) > >*With the *nix/C record and string models, there are these issues:* > > 1. Errant/unexpected/unintended pieces of binary data in a text > file/string can break something. > 2. Separate functions/methods/techniques must be used to manipulate text > files/strings versus binary files/string. You *must* know what you are > dealing with up front, and/or somehow code logic for both. (I'm not sure > the latter is possible in the general case.) > 3. Even with *nix/C oriented machine instructions, the need to inspect > all characters up to a target point results in performance killing cache > flooding. > 4. C++ does garbage collection resulting in "pauses" in forward > progress, and working set, caching, and CPU spikes, among other things. > >Let's call these attributes fragility, productivity, and efficiency, >respectively, for the convenience convenience. C has issue with these >characteristics. C and C++ do NOT have garbage collection; memory management is controlled by the programmer, with C++ providing a lot of assistance in the form of constructors and destructors. String manipulation can be done in a variety of ways; C++, in particular, provides counted strings and byte arrays with no restrictions on content. I've programmed in assembler, PL/I, COBOL and C/C++. If you are dealing with COBOL records that make extensive use of OCCURS DEPENDING ON, it probably make sense to stick with COBOL. Otherwise, it's quite easy to write robust, efficient code in C and C++ on z/OS. -- Jerry ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
