Page 1 of 1

How to run a C/C++ program using a jcl in z/OS

PostPosted: Wed Feb 15, 2012 1:11 pm
by Nara_513
Hi All...

Can any one let me know the JCL that is used to run a C/C++ program...?

Re: How to run a C/C++ program using a jcl in z/OS

PostPosted: Wed Feb 15, 2012 1:12 pm
by BillyBoyo
Someone at your site will be a good bet. They'll know the specifics for your site,

Re: How to run a C/C++ program using a jcl in z/OS

PostPosted: Wed Feb 15, 2012 1:29 pm
by enrico-sorichetti
if the system has been properly setup a c/c++ program will be <run> the same way any other program
unless the question was badly posed and You are asking how to compile

 ****** ***************************** Top of Data ******************************
 000001 //ENRICO@C JOB (ACCT#),'$$RUN',NOTIFY=ENRICO,                           
 000002 //             CLASS=A,MSGCLASS=H,MSGLEVEL=(1,1)                       
 000003 //*                                                                     
 000004 //G       EXEC PGM=HELLO                                               
 000005 //STEPLIB   DD DISP=SHR,DSN=ENRICO.TEST.LOAD                           
 000006 //*                                                                     
 000007 //SYSPRINT  DD SYSOUT=*                                                 
 000008 //STDOUT    DD SYSOUT=*                                                 
 000009 //STDERR    DD SYSOUT=*                                                 
 ****** **************************** Bottom of Data ****************************



 SDSF OUTPUT DISPLAY ENRICO@C JOB06847  DSID   101 LINE 0       COLUMNS 02- 81 
 COMMAND INPUT ===>                                            SCROLL ===> CSR 
********************************* TOP OF DATA **********************************
C     said...  Hello World!                                                     
******************************** BOTTOM OF DATA ********************************

Re: How to run a C/C++ program using a jcl in z/OS

PostPosted: Thu Feb 16, 2012 1:15 am
by steve-myers
It works this way:

//stepname EXEC PGM=cpgm,PARM='command-line data'

If I remember correctly, stdout and stderr are directed to the dataset specified by a DD statement with DD name SYSPRINT; stdin may be SYSIN, though I have direct memory about stdin, but it might be SYSIN. The fopen function can specify dataset names directly that are allocated using dynamic allocation, or dd:DD name in place of a dataset name.

Re: How to run a C/C++ program using a jcl in z/OS

PostPosted: Fri Feb 17, 2012 10:00 pm
by Nara_513
Thanks all...for ur quick reply...i got it... :-)