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
 

 

initapi and creating socket in c

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: initapi and creating socket in c
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: 7989
Location: Bellevue, IA

PostPosted: Sat May 30, 2009 5:43 pm    Post subject:
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    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