Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Running a cprogram in mainframe

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
yoonuskv

New User


Joined: 07 Apr 2006
Posts: 3

PostPosted: Fri Apr 07, 2006 6:02 pm    Post subject: Running a cprogram in mainframe
Reply with quote

I am trying to run a simple c program using catalogued procedure EDCCLG

here is the jcl
Code:

//A398614A JOB (P944,#711235),'C/C++ - COMPILE',       
//        CLASS=R,MSGCLASS=X,NOTIFY=&SYSUID,           
// USER=A398614,PASSWORD=                               
//*                                                     
//*-----------------------------------------------------
//* COMPILE THE C SOURCE.                               
//*-----------------------------------------------------
//*                                                     
//C0010308  EXEC EDCCLG,                               
//          INFILE='A398614.TEST.PROG(CPROG)',         
//          OUTFILE='A398614.LOAD(CPROG)',             
//* CPARM='OPT(0) NOSEQ NOMAR RENT',                   
//            GPARM='STACK(10K)/'                       
//*         SYSOUT6='*'                                 
//LKED.SYSLMOD  DD  DSNAME=A398614.LOAD(CPROG),DISP=SHR
//COMPILE.USERLIB DD DSNAME=SYS1.CEE.SCEEH.H,DISP=SHR   


The compilation and link edit is success but the execution is failing.
its abending witha soc7 .
Its a simple c program with a printf statement.

DO i need anything extra to the jcl?

Has anybody tried it out?
Back to top
View user's profile Send private message

martin9

Active User


Joined: 01 Mar 2006
Posts: 287
Location: Basel, Switzerland

PostPosted: Fri Apr 07, 2006 6:50 pm    Post subject:
Reply with quote

hy yoonuskv,

you know, s0c7 is a data exception,
this you have to solve in your program yourself,
this is a run time abend.
if you would have any s0c4, i.e. storage protection,
or something similar....

look at the variable which contains the faulty data...

martin9
Back to top
View user's profile Send private message
yoonuskv

New User


Joined: 07 Apr 2006
Posts: 3

PostPosted: Fri Apr 07, 2006 7:23 pm    Post subject: Re: Running a cprogram in mainframe
Reply with quote

Thank You martin for ur reply

but i would like to point out that there is nothing much in the program

here is the program

#include"stdio.h"
MAIN() {
printf("hi") }

So i doubt this error is coming becoz of something ese
Back to top
View user's profile Send private message
yoonuskv

New User


Joined: 07 Apr 2006
Posts: 3

PostPosted: Fri Apr 07, 2006 7:26 pm    Post subject:
Reply with quote

Hi martin

i would like to add one more thing

i left out the ; in the program

but still it is giving the same error.

can u help me out pls
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP from Mainframe to Unix - with CRLF vasanthz All Other Mainframe Topics 7 Thu Mar 23, 2017 5:12 am
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts Determine Region with max bandwidth f... seahawk789 COBOL Programming 3 Mon Feb 27, 2017 8:26 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us