IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

creating socket using C


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 20, 2007 6:03 pm
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
Reply with quote

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 20, 2007 6:20 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Creating Unix Directory using COBOL i... COBOL Programming 2
No new posts Creating Report using SORT DFSORT/ICETOOL 7
No new posts Creating CSV file from Variable recs ... DFSORT/ICETOOL 11
No new posts Creating a VB file PL/I & Assembler 10
No new posts Creating filelist ps file JCL & VSAM 2
Search our Forums:

Back to Top