Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
IEW2456E error when link-editing a C to COBOL (DLL) call

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Senthilraj

New User


Joined: 26 Jun 2009
Posts: 5
Location: Chennai, India

PostPosted: Fri Oct 13, 2017 3:12 pm    Post subject: IEW2456E error when link-editing a C to COBOL (DLL) call
Reply with quote

I have a requirement to call a COBOL DLL from C in OMVS.

COBDLL1 is the COBOL program created as a DLL; It is compiled, link-edited in TSO and load placed in OMVS/USS.

LINK EDIT JCL is as follows
Code:
//*-------------------------------------------------------------------*
//* LINK EDIT MODULE, RESOLVING EXTERNAL REFERENCES                   *
//*-------------------------------------------------------------------*
//LKED EXEC PGM=IEWL,COND=(4,LT),                                       
// PARM=('RENT,LIST,XREF,LET,MAP,DYNAM(DLL),CASE(MIXED)')               
//SYSPRINT DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*                                                 
//SYSUT1   DD UNIT=VIO,SPACE=(TRK,(5,5))                               
//SYSLIB   DD DSN=SYS1.SCEELKED,DISP=SHR                               
//         DD DSN=SYS1.MQM.SCSQLOAD,DISP=SHR                           
//         DD DSN=SYS1.CSSLIB,DISP=SHR                                 
//         DD DSN=ABCDE.ABCDE.LOAD,DISP=SHR                                               
//SYSLMOD  DD PATH='/SYSTEM/var/tmp/ABCDE/COBDLL1',                   
//            PATHMODE=(SIRWXU,SIRGRP,SIXGRP,SIROTH,SIXOTH),           
//            PATHOPTS=(OCREAT,OWRONLY)                                 
//SYSDEFSD DD PATH='/SYSTEM/var/tmp/ABCDE/COBDLLSF',                 
//            PATHMODE=(SIRWXU,SIRGRP,SIXGRP,SIROTH,SIXOTH),           
//            PATHOPTS=(OCREAT,OWRONLY)                                 
//* SETOPT PARM('DYNAM=DLL,CASE=MIXED,EXTATTR=PGM')                     
//SYSLIN   DD  DSN=&&OBJPDS(&MEM),DISP=(OLD,DELETE)                     
//         DD  *                                                       
 SETOPT PARM(DYNAM=DLL,CASE=MIXED)                                     
 INCLUDE SYSLIB(@@CBL2C) -> for making cobol to C communication         
 INCLUDE SYSLIB(@@C2CBL) -> for making C to cobol communication         
 INCLUDE SYSLIB(CEESTART)                                               
 INCLUDE SYSLIB(CEEROOTB)                                               
 INCLUDE SYSLIB(CSQBSTUB)                                               
 INCLUDE SYSLIB(EDCSTART)                                               
 NAME   COBDLL1(R)                                                           
/*


CTOCOB1 is the C program written to call COBOL DLL (COBDLL1). The program is compiled using CCNDRVR and Pre-linked successfully in TSO.

Below LINK EDIT step is used for linking the C to COBOL call.
Code:
//*------------------------------------------------------------------- 
//* LINKEDIT STEP:                                                     
//*------------------------------------------------------------------- 
//LKED   EXEC PGM=HEWL,COND=((4,LT,COMPILE),(4,LT,PLKED)),             
//    REGION=4M,PARM='AMODE=31,MAP,RENT'                               
//SYSLIB   DD DSN=SYS1.SCEELKED,DISP=SHR                               
//         DD DSN=SYS1.MQM.SCSQLOAD,DISP=SHR                           
//         DD DSN=SYS1.CSSLIB,DISP=SHR                                 
//         DD DSN=ABCDE.ABCDE.LOAD,DISP=SHR                           
//SYSPRINT DD  SYSOUT=*                                                 
//SYSLIN   DD  DSNAME=*.PLKED.SYSMOD,DISP=(OLD,DELETE)                 
//         DD *                                                         
  SETOPT PARM(DYNAM=DLL,CASE=MIXED)                                     
  INCLUDE SYSLIB(@@CBL2C) -> for making cobol to C communication*/     
  INCLUDE SYSLIB(@@C2CBL) -> for making C to cobol communication       
  INCLUDE SYSLIB(CEESTART)                                             
  INCLUDE SYSLIB(CEEROOTB)                                 
  INCLUDE SYSLIB(CSQBSTUB)                                 
  INCLUDE SYSLIB(EDCSTART)           
  IMPORT CODE,'SYSTEM/var/tmp/ABCDE','COBDLL1' 
  NAME   CTOCOB1(R)                                         
//SYSUT1   DD  UNIT=SYSALLDA,SPACE=(32000,(30,30))         
//SYSIN    DD  DUMMY                                       
//SYSLMOD  DD PATH='/SYSTEM/var/tmp/ABCDE/CTOCOB1',       
//            PATHMODE=(SIRWXU,SIRGRP,SIXGRP,SIROTH,SIXOTH),
//            PATHOPTS=(OCREAT,OWRONLY)


Link-Edit of C program is failing with below reason code
Code:
IEW2456E 9207 SYMBOL COBDLL1 UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE DESIGNATED CALL LIBRARY.


I tried the below IMPORT CODE/INCLUDE statements; but no luck.

Code:
  IMPORT CODE,'SYSTEM/var/tmp/ABCDE/COBDLL1','COBDLL1'     
  IMPORT CODE,'/SYSTEM/var/tmp/ABCDE/COBDLL1','COBDLL1' 
  IMPORT CODE,'/SYSTEM/var/tmp/ABCDE','COBDLL1' 
  INCLUDE path='SYSTEM/var/tmp/ABCDE/COBDLL1'


I tried to include the HFS PATH as part of SYSLIB in Link EDIT step using LIBRARYDD, but it didn't work.
Code:
//SYSLIB   DD DSN=SYS1.SCEELKED,DISP=SHR                             
//         DD DSN=SYS1.MQM.SCSQLOAD,DISP=SHR                         
//         DD DSN=SYS1.CSSLIB,DISP=SHR                               
//         DD DSN=DPFCB.FLEXWEB.LOAD,DISP=SHR                       
//         DD DSN=DPFCBPP.PRODSTG2.LOAD,DISP=SHR                     
//         DD PATH='/SYSTEM/var/tmp/ABCDE/'                       
//*LIBRARYDD=SYSLIBPT                                               
//SYSPRINT DD  SYSOUT=*                                             
//SYSLIN   DD  DSNAME=*.PLKED.SYSMOD,DISP=(OLD,DELETE)               
//         DD *                                                     
  SETOPT PARM(DYNAM=DLL,CASE=MIXED)                                 
  INCLUDE SYSLIB(@@CBL2C) -> for making cobol to C communication*/   
  INCLUDE SYSLIB(@@C2CBL) -> for making C to cobol communication     
  INCLUDE SYSLIB(CEESTART)                                           
  INCLUDE SYSLIB(CEEROOTB)                                           
  INCLUDE SYSLIB(CSQBSTUB)                                           
  INCLUDE SYSLIB(EDCSTART)                                           
  INCLUDE SYSLIBPT(COBDLL1)                                         
  NAME   CTOCOB1(R)                                                 
//SYSUT1   DD  UNIT=SYSALLDA,SPACE=(32000,(30,30))                   
//SYSIN    DD  DUMMY               


Is there any way to concatenate the HFS path (where the COBOL DLL is present) in the SYSLIB? or is there any alternative way to link-edit the C program from TSO.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm
No new posts Reply MQ open error Vignesh Sid COBOL Programming 6 Thu Sep 07, 2017 6:02 pm
No new posts Error in SQL-PLIST3 'Above value tru... rikdeb DB2 4 Wed Sep 06, 2017 1:34 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us