I am using DB2 Mainframe V8 (z/OS).

I have an external stored procedure written in C. I have already compiled the C program and have obtained the binaries corresponding to the SQL part and the C part. Currently I copy the binaries as members of the DSN810.DBRMLIB.DATA and DSN810.RUNLIB.LOAD datasets respectively and then run the JCL for invoking them.

Can I copy the binaries to some other location and still run it correctly (i.e. still make sure the correct libraries are used etc.)? If yes, what are the changes I need to make to the JCL? This is the JCL I am using currently (ABC.ABC0 is the stored procedure and ABC0 is the C source file). Any input will be really appreciated. Thanks!!

//*
//DSN810 JCLLIB ORDER=DSN810.PROCLIB
//*
//JOBLIB DD DSN=CEE.SCEERUN,DISP=SHR
// DD DSN=DSN810.SDSNEXIT,DISP=SHR
// DD DSN=DSN810.SDSNLOAD,DISP=SHR
// DD DSN=DSN810.RUNLIB.LOAD,DISP=SHR
//*
//*******************************************
//* STEP 1: DROP OBJECTS
//*******************************************
//PH06TS01 EXEC PGM=IKJEFT01,DYNAMNBR=20
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DB8G)
RUN PROGRAM(DSNTIAD) PLAN(DSNTIA81) -
LIB('DSN810.RUNLIB.LOAD') -
PARM('RC0')
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *

DROP PROCEDURE ABC.ABC0 RESTRICT;
COMMIT;

//*
//********************************************
//* STEP 2: CREATE OBJECTS
//********************************************
//PH06TS02 EXEC PGM=IKJEFT01,DYNAMNBR=20,
// COND=(4,LT)
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DB8G)
RUN PROGRAM(DSNTIAD) PLAN(DSNTIA81) -
LIB('DSN810.RUNLIB.LOAD')
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *

CREATE PROCEDURE
ABC.ABC0(
IN VARCHAR(4096) CCSID EBCDIC,
OUT INTEGER,
OUT INTEGER,
OUT INTEGER,
OUT VARCHAR(880) CCSID EBCDIC )
LANGUAGE C
DETERMINISTIC
MODIFIES SQL DATA
EXTERNAL NAME ABC0
PARAMETER STYLE GENERAL WITH NULLS
COLLID ABC
WLM ENVIRONMENT DB8GENV1
ASUTIME LIMIT 50
STAY RESIDENT NO
PROGRAM TYPE MAIN
SECURITY DB2
NO DBINFO
RESULT SET 1
COMMIT ON RETURN NO;

//*
//**************************************************
//* STEP 3: BIND THE STORED PROCEDURE PACKAGE
//**************************************************
//PH06TS04 EXEC PGM=IKJEFT01,DYNAMNBR=20,COND=(4,LT)
//DBRMLIB DD DSN=DSN810.DBRMLIB.DATA,
// DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DB8G)
BIND PACKAGE(ABC) -
MEMBER(ABC0) ACT(REP) ISO(CS) ENCODING(EBCDIC)
//*