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

initapi and creating socket in c


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
arkabag

New User


Joined: 10 Apr 2009
Posts: 3
Location: India

PostPosted: Sat May 30, 2009 5:10 pm
Reply with quote

Hi,

I am writing a TCP/IP client program in C. I tried creating a socket but it was showing an error,

Code:

socket: EDC5156I Process initialization error. (errno2=0x00000000)


So I first did an initapi() call before socket call.But inspite of including the header file <manifest.h> from TCPIP.SEZACMAC, I am still getting the linking error

Code:

IEW2456E 9207 SYMBOL INITAPI UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE DESIGNATED CALL LIBRARY.


Please suggest if I am going wrong somewhere?

Piece of code:
Code:

int max_soc = 50;
char subtaskid<:8:> = "        ";
rc = initapi(max_soc, subtaskid);
if (rc < 0)                     
{                               
    perror("initapi");           
    exit(-1);                   
}                               
else                             
{                               
    printf("\nInitapi success");
}                               

s = socket(2, 1, 0);                 
if (s < 0)                           
{                                     
    perror("socket");                 
    exit(-1);                         
}                                     
else                                 
{                                     
    printf("\nCreate socket success");
    printf("\nSocket no: %d",s);     
}                                     


jcl:
Code:

//STEP1 EXEC EDCCLG,CPARM='SOURCE,LIST,NORENT',       
//           INFILE=BMXARK.TCP.SOURCE(BATCLNT)       
//COMPILE.SYSLIB DD DSN=TCPIP.SEZACMAC,DISP=SHR       
//               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 
//SYSPRINT DD SYSOUT=*                               
//SYSOUT DD SYSOUT=*                                 
//LKED.SYSLIB DD DSN=CEE.SCEELKED,DISP=SHR           
//            DD DSN=TCPIP.SEZATCP,DISP=SHR           
//            DD DSN=TCPIP.SEZACMTX,DISP=SHR         
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Sat May 30, 2009 5:43 pm
Reply with quote

Did you look up the error code in the manual? I did and found:
Quote:
EDC5156I Process initialization error.

Explanation: A process initialization error has occurred. A further explanation can be found in z/OS UNIX System Services Programming: Assembler Callable Services Reference or z/VM: OpenExtensions Callable Services Reference.

Programmer Response: Use the function errno2() to retrieve the value of the UNIX System Services kernel reason code to determine further information from z/OS UNIX System Services Programming: Assembler Callable Services Reference or z/VM: OpenExtensions Callable Services Reference.

System Action: Process does not start.

Symbolic Feedback Code: EDC514
so what's the output of the ERRNO2 function?
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