Did that my problem now Is that I am getting unresolved in the Assembler program which is calling my DLL, the DLL exported function which is a C program
Here is the C function I am trying to export #pragma export(opendata) <====== void *sysadata_ptr; #pragma export(sysadata_ptr) #pragma csect(CODE,"SYSADATA") extern void __ceetest(void); #pragma map(__ceetest,"CEETEST") #pragma linkage(CEETEST,OS_NOSTACK) #pragma map(opendata,"opendata") void opendata(char *filename) { …. } This is the binder report my question is how come the DLL column for my exported function and data opendata and sysada_ptr are blank it should have the name of my DLL SYSADATA DDNAME SYSLMOD Below is the JCL I used to compile and link and below that is the binder JCL for the Calling Assembler program with the Report Thanks *** E N D O F C R O S S R E F E R E N *** I M P O R T E D A N D E X P O R T E D S Y ------- SOURC IMPORT/EXPORT TYPE SYMBOL DLL DDNAME SEQ ------------- ------ ---------------- ---------------- -------- --- IMPORT CODE64 fopen CELQV003 SYSLIN 03 IMPORT CODE64 fread CELQV003 SYSLIN 03 IMPORT CODE64 malloc CELQV003 SYSLIN 03 EXPORT CODE64 opendata EXPORT DATA64 sysadata_ptr *** E N D O F I M P O R T E D A N D E X P O R T E D *ISFPCU4 This the JCL I use Precompile step //*TEP0100 EXEC PGM=CCNDRVR,REGION=0M,PARM='LONGNAME,RENT,TEST(ALL),LIS //*TEP0100 EXEC PGM=CCNDRVR,REGION=0M,PARM='RENT,TEST(ALL),LIST,SOURCE, //* LONGNAME,NOOPT' //STEP0100 EXEC PGM=CCNDRVR,REGION=0M,PARM=('PP(COMMENTS,NOLINES)') //STEPLIB DD DISP=SHR,DSN=CBC.SCCNCMP //SYSLIN DD DUMMY //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSCPRT DD SYSOUT=* //SYSLIB DD DSN=IBMUSER.DBGR.MACLIB,DISP=SHR //SYSUT1 DD UNIT=SYSDA,SPACE=(32000,(30,30)), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200) //SYSUT5 DD UNIT=SYSALLDA,SPACE=(32000,(30,30)), // DCB=(RECFM=FB,LRECL=3200,BLKSIZE=12800) //* LONGNAME,NOOPT' //STEP0100 EXEC PGM=CCNDRVR,REGION=0M,PARM=('PP(COMMENTS,NOLINES)') //STEPLIB DD DISP=SHR,DSN=CBC.SCCNCMP //SYSLIN DD DUMMY //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSCPRT DD SYSOUT=* //SYSLIB DD DSN=IBMUSER.DBGR.MACLIB,DISP=SHR //SYSUT1 DD UNIT=SYSDA,SPACE=(32000,(30,30)), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200) //SYSUT5 DD UNIT=SYSALLDA,SPACE=(32000,(30,30)), // DCB=(RECFM=FB,LRECL=3200,BLKSIZE=12800) //SYSUT6 DD UNIT=SYSALLDA,SPACE=(32000,(30,30)), // DCB=(RECFM=FB,LRECL=3200,BLKSIZE=12800) //SYSUT7 DD UNIT=SYSALLDA,SPACE=(32000,(30,30)), // DCB=(RECFM=FB,LRECL=3200,BLKSIZE=12800) //SYSUT8 DD UNIT=SYSALLDA,SPACE=(32000,(30,30)), // DCB=(RECFM=FB,LRECL=3200,BLKSIZE=12800) //SYSUT9 DD UNIT=SYSALLDA,SPACE=(32000,(30,30)), ===> Scroll ===> CSR //SYSUT10 DD DSN=IBMUSER.TEST.SOURCE(SYSADATA),DISP=SHR //SYSUT14 DD UNIT=SYSALLDA,SPACE=(32000,(30,30)), // DCB=(RECFM=FB,LRECL=3200,BLKSIZE=12800) //SYSUT16 DD UNIT=SYSALLDA,SPACE=(32000,(30,30)), // DCB=(RECFM=FB,LRECL=3200,BLKSIZE=12800) //SYSUT17 DD UNIT=SYSALLDA,SPACE=(32000,(30,30)), // DCB=(RECFM=FB,LRECL=3200,BLKSIZE=12800) //SYSIN DD DSN=IBMUSER.DBGR.SERVER(SYSADATA),DISP=SHR //* T // compile step //STEP0110 EXEC PGM=CCNDRVR, // PARM='DEBUG(FORMAT(DWARF),NOHOOK((LINE,NOBLOCK,NOPATH,NOCALL,NOFUNC,* // ))),SOURCE,LONGNAME,RENT,DLL,LP64' //STEPLIB DD DISP=SHR,DSN=CBC.SCCNCMP //SYSLIN DD DSN=&&LOADSET,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE), // DCB=(LRECL=80,RECFM=FB,BLKSIZE=27920) //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSCPRT DD DSN=IBMUSER.TEST.SYSPRINT(SYSADATA),DISP=SHR //SYSUT1 DD UNIT=SYSDA,SPACE=(32000,(30,30)), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200) //SYSUT5 DD UNIT=SYSALLDA,SPACE=(32000,(30,30)), // DCB=(RECFM=FB,LRECL=3200,BLKSIZE=12800) //SYSUT6 DD UNIT=SYSALLDA,SPACE=(32000,(30,30)), // DCB=(RECFM=FB,LRECL=3200,BLKSIZE=12800) //SYSUT7 DD UNIT=SYSALLDA,SPACE=(32000,(30,30)), // DCB=(RECFM=FB,LRECL=3200,BLKSIZE=12800) //SYSUT8 DD UNIT=SYSALLDA,SPACE=(32000,(30,30)), // DCB=(RECFM=FB,LRECL=3200,BLKSIZE=12800) //SYSUT9 DD UNIT=SYSALLDA,SPACE=(32000,(30,30)), // DCB=(RECFM=VB,LRECL=137,BLKSIZE=882) //SYSUT10 DD SYSOUT=* //SYSUT14 DD UNIT=SYSALLDA,SPACE=(32000,(30,30)), // DCB=(RECFM=FB,LRECL=3200,BLKSIZE=12800) //SYSUT16 DD UNIT=SYSALLDA,SPACE=(32000,(30,30)), // DCB=(RECFM=FB,LRECL=3200,BLKSIZE=12800) //SYSUT17 DD UNIT=SYSALLDA,SPACE=(32000,(30,30)), // DCB=(RECFM=FB,LRECL=3200,BLKSIZE=12800) //SYSIN DD DSN=IBMUSER.TEST.SOURCE(SYSADATA),DISP=SHR //SYSCDBG DD DSN=IBMUSER.CDBG(SYSADATA),DISP=SHR //* link step //***************************************************************** //* LINK EDIT THE PROGRAM * //***************************************************************** //STEP0200 EXEC PGM=IEWL,COND=(4,LT,STEP0110), // PARM='AMODE(64),LIST,MAP,XREF,RENT,REUS,DYNAM=DLL' //STEPLIB DD DISP=SHR,DSN=CEE.SCEERUN // DD DISP=SHR,DSN=CEE.SCEERUN2 //SYSDEFSD DD DUMMY //SYSLOUT DD SYSOUT=* //SYSPRINT DD SYSOUT=* //SYSDBOUT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSLIB DD DISP=SHR,DSN=SYS1.SIEASID // DD DISP=SHR,DSN=SYS1.SIEALNKE // DD DISP=SHR,DSN=CEE.SCEELKED // DD DSN=CEE.SCEEBND2,DISP=SHR //SYSLIN DD DSN=*.STEP0110.SYSLIN,DISP=(OLD,DELETE) // DD DSN=CEE.SCEELIB(CELQSCPP),DISP=SHR // DD DSN=CEE.SCEELIB(CELQS003),DISP=SHR // DD DSN=CEE.SCEELIB(C64),DISP=SHR // DD DSN=CBC.SCLBSID(IOSX64),DISP=SHR //* DD DDNAME=SYSIN //SYSDEFSD DD DSN=IBMUSER.DBGR.SIDDECK(SYSADATA),DISP=SHR //SYSLMOD DD DISP=SHR,DSN=IBMUSER.DBGR.DLLLIB(SYSADATA) // Calling assembler Bind step /* //***************************************************************** //* LINK EDIT THE PROGRAM * //***************************************************************** //STEP0200 EXEC PGM=IEWL,COND=(0,LT,STEP0100), // PARM='AMODE(64),LIST,MAP,XREF,RENT,REUS,DYNAM=DLL' //SYSPRINT DD SYSOUT=* //SYSDEFSD DD SYSOUT=* //SYSLIB DD DISP=SHR,DSN=IBMUSER.DBGR.DLLLIB // DD DISP=SHR,DSN=CEE.SCEEBND2 // DD DISP=SHR,DSN=CEE.SCEELKED //SYSLMOD DD DISP=SHR,DSN=IBMUSER.DBGR.DLLLIB //SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(3,2)),DSN=&SYSUT1 //SYSPRINT DD SYSOUT=*,DCB=(RECFM=FB,BLKSIZE=3509) //SYSLIN DD DSN=&&HEXOBJ(TESTPRGD),DISP=(OLD,PASS) // DD DSN=CEE.SCEELIB(CELQS003),DISP=SHR // DD DDNAME=SYSIN //SYSIN DD * IMPORT CODE64,SYSADATA,opendata ENTRY CELQSTRT NAME TESTPRGD(R) /* // C R O S S - R E F E R E N C E T A B L E _________________________________________ EXT CLASS = C_WSA64 -------------- R E F E R E N C E -------------------------- T A R G E T --- CLASS ELEMENT | OFFSET SECT/PART(ABBREV) OFFSET TYPE | SYMBOL(ABBREV) SECTION (ABB | 8 MYPSECT 8 V-CON | opendata $UNRESOLVED *** E N D O F C R O S S R E F E R E N -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Barry Lichtenstein Sent: Thursday, August 22, 2019 6:11 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: 64 bit Assembler DLL app PSECT parm The value of R5 on entry to an XPLINK (which include AMODE 64) function is not the address of the WSA in its entirety (as R0 was in non-XPLINK), but rather the value of the "environment" of that function, which is somewhere within the WSA of that module (executable file). (As implemented I believe it's the same for the entire compilation unit, but the specification is that it corresponds to the function.) The environment address comes from the caller loading the function descriptor -- the R-con/V-con pair for that function. Where V(function) gives the address of the code, R(function) gives the address of the "environment". That then gives the function the base location for its "writable-static area" on entry -- the non-reentrant area containing writable data items and static data items. Thus when an XPLINK function is to call another function (exception OS linkage), it needs a descriptor to do so. As the address of the environment is unique to each instance of the program (LE enclave), the descriptor of a RENT-compiled program has to live in the WSA so that it can be updated with the environment address of the target program, unlike a V-con which can be relocated during load time. (The V-con in the descriptor also needs to be updated in support of DLLs, i.e. if the function being called is not within the calling module). The net of this is that in XPLINK you need the PSECT in concert with the call macro (CELQCALL), and that call macro automatically takes care of allocating the descriptor. The manual says only under the CELQCALL usage notes: 2. This macro requires that a PSECT was defined by the CELQPRLG prolog macro Though I don't see where there is a similar note, CEEPDDA and CEEPLDA also both require a PSECT for XPLINK (perhaps because these macros also work for non-XPLINK DLLs). These allow you to define and reference data items your environment (WSA) which are exportable/importable respectively. On 21 Aug 2019 11:17:24 AM Joseph Reichman <reichman...@gmail.com <mailto:reichman...@gmail.com> > wrote: > Just looked thru LE book shelf would be nice If they had programming > examples Or at the very least documentation on the parameters used for > the EDC macros ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu <mailto:lists...@listserv.ua.edu> with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN