C Compiler

This forum provides the support of Dezhi Mainframe systems. Please post your questions about logon, usage of our mainframe environment.

Moderators: sysprog, prino, sfan, steve-myers, Tim001

C Compiler

Postby deskware » Mon 14 Sep 2015, 02:56

Hello,

My name is Matt Dean and I am new to the Dezhi mainframe. I am intersted in testing out compiling some source from the cobolscript interpreter that I have, if someone can direct me to some template JCL for compiling C I would apprecaite it. Also, any reference to the type of C library on the mainframe as I will need to reference to items for compatability. Also, thanks again.



Best Regards,


Matt Dean
dean@deskware.com
deskware
 
Posts: 2
Joined: Thu 10 Sep 2015, 17:41
Location: Chattanooga, TN

Re: C Compiler

Postby steve-myers » Mon 14 Sep 2015, 05:03

The Fandezhi system is not to be used for commercial work of any sort. Your userid will be blocked as soon as the admins detect its use for prohibited activities. Based on what I can see, your userid will not last very long.

The Fandezhi system has the C++ compiler and library that came with z/OS 1.6. It is documented in the standard publications in the usual online locations. Users of the Fandezhi system are expected to know how to use these resources. Most batch cataloged procedures in the Fandezhi system are in SYSFAN.PROCLIB, which has always struck me as strange,
steve-myers
 
Posts: 452
Joined: Tue 04 May 2010, 15:43

Re: C Compiler

Postby prino » Mon 14 Sep 2015, 07:36

steve-myers wrote:The Fandezhi system is not to be used for commercial work of any sort. Your userid will be blocked as soon as the admins detect its use for prohibited activities. Based on what I can see, your userid will not last very long.

Steve,

I think here we have a borderline case between what is and what isn't allowed on FanDeZhi. Obviously CobolScript, as a scripting language, (probably) doesn't run on the system, and its developer does probably have the resources to pay for commercial access (or his own zPDT system), but if he were to make a somewhat feature-challenged version available to z/OS users, say via the CBT Tape site, I think the admins should at least give him some leeway.

My eur 0.02...
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
Some programming here :mrgreen:
prino
 
Posts: 479
Joined: Sat 06 Jun 2009, 21:41
Location: Vilnius, Lithuania

Re: C Compiler

Postby steve-myers » Mon 14 Sep 2015, 14:00

Matt - If you are used to C on toy machines (whether Linux or Windoze) or baby machines there are 4 issues.
  • Character set - Two commonly used characters in C are not well defined in EBCDIC: [ and ] are not implemented in a way that I think reasonable people would regard as correct. There are games you can play, which I honestly do not understand so I cannot repeat them here so they upload in a fashion the mainframe C compiler accepts. One option is to transform [ and ] to "trigraph" characters the compiler tolerates, but then your source becomes somewhat unreadable. Other C characters, like {, } and \ seem to work well even though they are not really well defined EBCDIC characters.
  • I/O - The I/O model on baby and toy machines is a streaming model with no well defined record boundaries. The I/O model on the mainframe is a record oriented model. The C library adapts to this model very well. Something like fprint('First line\nSecond line\n") will produce the end result you will expect. There are issues, of course. These issues are discusssed in the appropriate documentation.
  • Other functions. Generally speaking, the other C library functions work the way a reasonable person would expect.
  • Floating point arithmetic. Until the 1990s the only floating point implementation on the mainframe was a strange implementation now known as "hexadecimal" floating point. In the 1990s a reasonable implementation of the IEEE floating point standard was added to the mainframe hardware. In the 1960s when the System/360 hardware was defined the IEEE standard did not exist; "hexadecimal" floating point was added to the hardware almost as a second thought so IBM could claim, "yes, we have floating point." The default floating point is hexadecimal floating point. You can get IEEE "binary" floating point, but it is sort of non-standard.
steve-myers
 
Posts: 452
Joined: Tue 04 May 2010, 15:43

Re: C Compiler

Postby deskware » Mon 14 Sep 2015, 19:07

Thanks for the feedback. The interpreter is commercial software, so it sounds like compiling the source to see if it could be made available for this platform is outside of your governance model. If anything changes with this, or if anyone has any other related ideas feel free to reach out to me.

Best Regards,


Matt Dean
dean@deskware.com
deskware
 
Posts: 2
Joined: Thu 10 Sep 2015, 17:41
Location: Chattanooga, TN


Return to Dezhi systems: Mainframe

Who is online

Users browsing this forum: No registered users and 0 guests

cron