View previous topic :: View next topic
|
Author |
Message |
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Greetings fellow bitheads,
Is there a specific flavor of "C" on a Mainframe? I have the opportunity to convert CICS/Assembler to CICS/C and was debating whether I should run towards this or just run away?
All comments welcome....
Regards, |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Are we talking C/370 (z/OS C) or *nix C? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Bill, you might want to look at this z/OS XL C/C++ Library. IBM does have a definite standard C/C++, but there's a lot of leeway allowed by the various compiler directives that can be specified. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
C/370.... |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
In addition to Mr. Sample's link, I'd mention that the z/OS C library has I/O functions that treat data sets as data sets (as opposed to the streams common under LUW). I don't believe that the library functions will allow a data set to be treated as a stream, although I concede that I never tried. |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 581 Location: London
|
|
|
|
For interest, I struck and issue with it where the datasets created by a C++ program on Z/OS cannot exceed 65535 tracks. Not sure if it is still the case:
2.9.1.10 Large format sequential data sets
z/OS V1R7 introduced support for large format sequential data sets. A large format sequential data set is a modification to traditional sequential data sets that allows for more than 65535 tracks of data per volume. Large format sequential data sets can be single or multivolume, and can reside on SMS managed or non-SMS managed direct access storage devices.
A large format sequential data set is specified using the DSNTYPE=LARGE keyword on a JCL DD statement or using the dynamic allocation equivalent. z/OS XL C/C++ does not support the allocation of a large format sequential data set using fopen() or freopen().
As of z/OS V1R7, z/OS XL C/C++ supports processing of large format sequential data sets opened for read (r, rb), and concatenated large format sequential data sets opened for read (r, rb) or read/update (r+, rb+), provided that the data sets have no more than 65535 tracks of data on each volume.
As of z/OS V1R8, z/OS XL C/C++ provides complete read and write support for large format sequential data sets when noseek is requested and honored. See "Access method selection" in topic 2.9.1.12 for more information on when noseek is requested but not honored.
Within the same C process, attempting to open a large format sequential data set for read with repositioning (not specifying the noseek keyword), while the data set is already opened for write (or append) with noseek, is not supported. The fopen() or freopen() will fail. This failure occurs because the writer could extend the data set beyond 65535 tracks, but the reader is restricted to data sets no larger than 65535 tracks.
When a C standard stream is allocated to a large format sequential data set, the stream will be opened without repositioning (noseek). The C standard streams can also be redirected to large format sequential data sets. If this occurs, the stream will be reopened without repositioning (noseek). In both of these situations, the open (or reopen) is initially attempted with repositioning (seek), fails with an ABEND 213-14 or 213-16, and the stream is then opened (or reopened) without repositioning |
|
Back to top |
|
|
|