If you have a look at the Language Enrvironment documentation you'll get part of your answer. Or google.
I'd take a wild guess for the second part: compile it; link it; exec pgm=it.
I do suspect you'll be able to find a manual through google. Make that a wide selection of manuals from IBM, you can sort out what is and is not relevant to your requirement. They will included sample code, sample JCL etc.
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
If your environment permits use of C, there should already be compile jcl available on your system. Use the standard compile jcl (and do not make up your own). Once compiled/linked, submit jcl to run the program.
Joined: 03 Oct 2009 Posts: 1783 Location: Bloomington, IL
can anyone tell me, if we can run a C program in Mainframes
and if yes please tell me how can we do it.
The usual way.
All host programs, no matter what language they are written in, compile to the same System z machine language (unless a Java-style pseudo-compile is actually being done); it does not matter if the source for FOO is COBOL, PL/I, C, FORTRAN, Ada, or RPG II, the load module is invoked in the same way, via JCL in batch, or CLIST or Rexx in TSO (foreground or background).
If you seeking a method of compiling a C program, then, as Mr. Scherrer says, you should use the site-mandated procedures and inquire of your site support or your senpai as to uncertainties. If there are no local procedures for compiling C, that is a strong hint that doing so can lead undesirable consequences, up to and including termination.