IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Mainframe C


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu May 16, 2013 11:09 pm
Reply with quote

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? icon_wink.gif

All comments welcome....

Regards,
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu May 16, 2013 11:29 pm
Reply with quote

Are we talking C/370 (z/OS C) or *nix C?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu May 16, 2013 11:42 pm
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu May 16, 2013 11:42 pm
Reply with quote

C/370....
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu May 16, 2013 11:54 pm
Reply with quote

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
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 581
Location: London

PostPosted: Fri May 17, 2013 2:41 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Mainframe openings in Techmahnidra fo... Mainframe Jobs 0
No new posts Mainframe Programmer with CICS Skill... Mainframe Jobs 0
No new posts How to Reformat a file using File Man... All Other Mainframe Topics 14
No new posts NDM getting stuck - mainframe/JCL All Other Mainframe Topics 13
Search our Forums:

Back to Top