If you have StarTool--or its ancestor PDS(E)--you can assign an alias to a load module with a simple command. You do need to have a matching entry point in the load module.
. . JO.Skip Robinson SCE Infrastructure Technology Services Electric Dragon Team Paddler SHARE MVS Program Co-Manager 626-302-7535 Office 323-715-0595 Mobile [email protected] From: "McKown, John" <[email protected]> To: [email protected] Date: 03/18/2011 01:35 PM Subject: Re: Dynamic calls from COBOL Sent by: IBM Mainframe Discussion List <[email protected]> CALL2222 needs to be an ALIAS to DCALLEE when you do the binding (LKED step). Do you use the NAME(ALIAS) compiler option? You either need that or put in an ALIAS CALL2222 command in your link step. -- John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * [email protected] * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM > -----Original Message----- > From: IBM Mainframe Discussion List > [mailto:[email protected]] On Behalf Of Phil Smith > Sent: Friday, March 18, 2011 3:03 PM > To: [email protected] > Subject: Dynamic calls from COBOL > > Hoping someone here has more experience with dynamic linking > than I do. I'm trying to get something to be dynamically > callable from COBOL on z/OS. This is old-style dynamic > calling, not DLL stuff. So I've found > http://publib.boulder.ibm.com/infocenter/pdthelp/v1r1/index.js > p?topic=/com.ibm.entcobol.doc_4.1/PGandLR/ref/rpsub08.htm and > have followed that (I believe), but get S806 ABENDs when > calling the *second* entry point in the target module. So > either I've missed something, the example is wrong, I'm using > some wrong option on the linkedit, or it's gremlins. > > The callee, with entry points DCALLEE and CALL2222 (yeah, > stupid names, but I've been tinkering): > ------------------------------------------- > Identification Division. > Program-ID. DCALLEE. > Environment Division. > Configuration Section. > Data Division. > Working-Storage Section. > > Procedure Division. > Display "DCALLEE got called". > goback. > Entry "CALL2222". > Display "CALL2222 got called". > GOBACK. > End Program "DCALLEE". > ------------------------------------------- > > JCL to compile/linkedit the callee: > ------------------------------------------- > //IGYWC PROC > //COBOL EXEC PGM=IGYCRCTL,REGION=2048K, > // PARM='LIB,DYNAM,NODLL' > //STEPLIB DD DISP=SHR,DSNAME=IGY340.SIGYCOMP > //SYSPRINT DD SYSOUT=* > //SYSLIB DD DISP=SHR,DSN=PHS.PDS.SOURCE(DCALLEE) > // DD DISP=SHR,DSN=VSH.BASE230.SAMPLIB > //SYSLIN DD DISP=SHR,DSN=PHS.PDS.OBJ(DCALLEE) > //SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,1)) > //SYSUT2 DD UNIT=SYSDA,SPACE=(CYL,(1,1)) > //SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(1,1)) > //SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(1,1)) > //SYSUT5 DD UNIT=SYSDA,SPACE=(CYL,(1,1)) > //SYSUT6 DD UNIT=SYSDA,SPACE=(CYL,(1,1)) > //SYSUT7 DD UNIT=SYSDA,SPACE=(CYL,(1,1)) > // PEND > // EXEC IGYWC > //* > //COBOL.SYSIN DD DSN=PHS.PDS.SOURCE(DCALLEE),DISP=SHR > //* > //LKED EXEC PGM=IEWBLINK,COND=(8,LT), > // PARM='LIST,AMODE=31,MAP,LET,RENT,DYNAM(NO)' > //SYSPRINT DD SYSOUT=* > //SYSLIB DD DISP=SHR,DSN=CEE.SCEELKED > //TESTPGMS DD DISP=SHR,DSN=PHS.PDS.OBJ > //SYSLMOD DD DISP=SHR,DSN=PHS.PDS.LOAD > //SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(3,1)) > //SYSLIN DD * > INCLUDE TESTPGMS(DCALLEE) > NAME DCALLEE(R) > /* > ------------------------------------------- > > The caller: > ------------------------------------------- > PROCESS DYNAM NODLL > Identification Division. > Program-ID. "DCALLER". > Environment Division. > Configuration Section. > Data Division. > Working-Storage Section. > 77 pgm Pic X(8). > Procedure Division. > move "DCALLEE " to pgm. > call pgm. > move "CALL2222" to pgm. > call pgm. > Stop Run . > End Program "DCALLER". > ------------------------------------------- > > JCL to compile/linkedit/run the caller: > ------------------------------------------- > //IGYWC PROC > //COBOL EXEC PGM=IGYCRCTL,REGION=2048K, > // PARM='LIB,DYNAM,NODLL' > //STEPLIB DD DISP=SHR,DSNAME=IGY340.SIGYCOMP > //SYSPRINT DD SYSOUT=* > //SYSLIB DD DISP=SHR,DSN=PHS.PDS.SOURCE(DCALLER) > // DD DISP=SHR,DSN=VSH.BASE230.SAMPLIB > //SYSLIN DD DISP=SHR,DSN=PHS.PDS.OBJ(DCALLER) > //SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,1)) > //SYSUT2 DD UNIT=SYSDA,SPACE=(CYL,(1,1)) > //SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(1,1)) > //SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(1,1)) > //SYSUT5 DD UNIT=SYSDA,SPACE=(CYL,(1,1)) > //SYSUT6 DD UNIT=SYSDA,SPACE=(CYL,(1,1)) > //SYSUT7 DD UNIT=SYSDA,SPACE=(CYL,(1,1)) > // PEND > // EXEC IGYWC > //* > //COBOL.SYSIN DD DSN=PHS.PDS.SOURCE(DCALLER),DISP=SHR > //* > //LKED EXEC PGM=IEWBLINK,COND=(8,LT), > // PARM='LIST,AMODE=31,MAP,LET,RENT,DYNAM(NO)' > //SYSPRINT DD SYSOUT=* > //SYSLIB DD DISP=SHR,DSN=CEE.SCEELKED > //TESTPGMS DD DISP=SHR,DSN=PHS.PDS.OBJ > //SYSLMOD DD DISP=SHR,DSN=PHS.PDS.LOAD > //SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(3,1)) > //SYSLIN DD * > INCLUDE TESTPGMS(DCALLER) > NAME DCALLER(R) > /* > //RUN EXEC PGM=DCALLER,REGION=0K > //* > //STEPLIB DD DISP=SHR,DSN=PHS.PDS.LOAD > //SYSOUT DD SYSOUT=* > //SYSPRINT DD SYSOUT=* > //* > ------------------------------------------- > > Any and all ideas greatly appreciated! > -- > ...phsiii > > Phil Smith III > [email protected] > Voltage Security, Inc. > www.voltage.com > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: GET IBM-MAIN INFO > Search the archives at http://bama.ua.edu/archives/ibm-main.html > > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

