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



Help for C/C++ for MVS, OS/390 C/C++, z/OS C/C++ and C/C++ Productivity Tools for OS/390

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

Postby Nara_513 » Wed Feb 15, 2012 1:11 pm

Hi All...

Can any one let me know the JCL that is used to run a C/C++ program...?
Nara_513
 
Posts: 44
Joined: Fri Dec 02, 2011 1:11 am
Has thanked: 0 time
Been thanked: 0 time

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

 

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

Postby BillyBoyo » Wed Feb 15, 2012 1:12 pm

Someone at your site will be a good bet. They'll know the specifics for your site,
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

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

Postby enrico-sorichetti » Wed Feb 15, 2012 1:29 pm

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 ********************************
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2925
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 154 times

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

Postby steve-myers » Thu Feb 16, 2012 1:15 am

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.
steve-myers
Global moderator
 
Posts: 2070
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 228 times

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

Postby Nara_513 » Fri Feb 17, 2012 10:00 pm

Thanks all...for ur quick reply...i got it... :-)
Nara_513
 
Posts: 44
Joined: Fri Dec 02, 2011 1:11 am
Has thanked: 0 time
Been thanked: 0 time


Return to C, C++

 


  • Related topics
    Replies
    Views
    Last post