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
 

 

creating socket using C

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

New User


Joined: 20 Nov 2007
Posts: 5
Location: India

PostPosted: Tue Nov 20, 2007 5:43 pm    Post subject: creating socket using C
Reply with quote

hi
i have been assigned to a new proj in c. its abt SSL programming. but i tried creating a socket but couldnt even create one. the following is the source code followed by JCL and the output i got. thanks in advance.please do tell me where i am wrong.

#include<stdio.h>
#include<sys/socket.h>
#include<sys/types.h>
#include<arpa/inet.h>
#include<netinet/in.h>
#include<netdb.h>
#include<errno.h>
void main()
{
int s;
struct sockaddr_in servaddr;
int portno=6000;
s=socket(2,1,0);
perror("hi:");
printf("%d",errno);
printf("%d",s);
exit(0);
}
Code:
               
//STEP1 EXEC EDCCLG,INFILE=H181345.TEST.C(S)                   
//COMPILE.SYSLIB DD DSN=CEE.SCEEH.SYS.H,DISP=SHR                     
//               DD DSN=CEE.SCEEH.ARPA.H,DISP=SHR                   
//               DD DSN=CEE.SCEEH.H,DISP=SHR                         
//               DD DSN=CEE.SCEEH.NETINET.H,DISP=SHR                 
//COMPILE.USERLIB DD DSN=H181345.TEST.H,DISP=SHR                     
//SYSPRINT DD SYSOUT=*                                               
//SYSOUT DD SYSOUT=*                                                 


hi:: EDC5156I Process initialization error.
******************************** BOTTOM OF DATA **
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Tue Nov 20, 2007 6:03 pm    Post subject: Reply to: creating socket using C
Reply with quote

Did You succeed in getting the "hallo_world" program compiled and running ??
( useful to check if the setup is correct )
Back to top
View user's profile Send private message
shankarramv

New User


Joined: 20 Nov 2007
Posts: 5
Location: India

PostPosted: Tue Nov 20, 2007 6:06 pm    Post subject:
Reply with quote

yes i did succed in running normal c programs.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Tue Nov 20, 2007 6:20 pm    Post subject: Reply to: creating socket using C
Reply with quote

Did You search and read the relevant messages and codes manual
LOOKS LIKE YOU DIDN' T .... I DID IT FOR YOU
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ceea9180/4.134?ACTION=MATCHES&REQUEST=EDC5156I&TYPE=FUZZY&SHELF=EZ2ZO10J.bks&DT=20070428035857&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT
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 Creating an 'Enter' event with IMS MF... dileep chirasani Java & MQSeries 1 Sat Aug 06, 2016 2:23 am
No new posts Creating a dynamic sort card in JCL u... ChitraChhabra DFSORT/ICETOOL 4 Wed Aug 03, 2016 6:15 pm
No new posts creating a physical sequential file i... Shaheen Shaik JCL & VSAM 8 Wed Jun 29, 2016 3:46 pm
No new posts CICS SOCKET shared between two transa... akont CICS 3 Mon Jun 27, 2016 1:27 pm
No new posts Faccing issues while creating a GDG V... sravindra_s JCL & VSAM 5 Thu Jun 23, 2016 11:26 am


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