RE: Stored Procedures

RE: Stored Procedures

 

  


1) Create and compile your cobol pgm on mvs like you normally compile cobol db2 pgms - for example, in my case my load module name is CDRP0020.

2) execute your CREATE PROCEDURE statment from SPUFI specifying the name of the load module as the external name - in this case CDRP0020. Also important is to specify an appropriate COLLID dependent on your shop requirements - in my case, the COLLID for this procedure is PROD_CDRP0020. Finally, specify your appropriate WLM environment name - for me this is DB2WENVG - this is shop specific.


CREATE PROCEDURE schema.procedure_name
(OUT SQLCODE INTEGER ,
IN DRAWELMT INTEGER ,
INOUT P3 CHAR(100) )
DYNAMIC RESULT SETS 1
EXTERNAL NAME 'CDRP0020'
LANGUAGE COBOL PARAMETER STYLE GENERAL NOT DETERMINISTIC FENCED
CALLED ON NULL INPUT MODIFIES SQL DATA NO DBINFO
COLLID PROD_CDRP0020 WLM ENVIRONMENT DB2WENVG
ASUTIME NO LIMIT STAY RESIDENT NO PROGRAM TYPE MAIN
SECURITY DB2 INHERIT SPECIAL REGISTERS COMMIT ON RETURN NO ;
COMMIT;


-----Original Message-----
From: Marimuthu Udhaya Ait
[mailto:db2udbdba-ezmlmshield-x33454567.[Email address protected]
Sent: Wednesday, June 29, 2005 9:14 PM
To: LazyDBA Discussion
Subject: Stored Procedures


Hi all,

My requirements is to write a DB2 stored procedures ro read a file and process it and send the message to the main program.

I have not worked with the stored procedure earlier.I tried to create the Procedure but it says that language and external clause is invalid.I require the language to be COBOL .When I select the sysibm.sysprocedures , I can find one row has been created for Assembly language.Is that it means stored procedures installation is done or We have to do any initial installation for cobol -DB2 stored procedures .I require some details so that I can create and do the coding ..

Suggestion pls...

Regards,
Udhaya


---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html



CONFIDENTIALITY NOTICE

This e-mail and any attachments, as well as any documents from a file server of International Truck
and Engine Corporation or its affiliates, are intended for the addressee and may contain information
that is privileged, confidential, proprietary, or otherwise protected by law. Any dissemination,
distribution, or copying is prohibited. If a confidentiality or nondisclosure agreement exists
between International and the recipient or the recipient's employer, this e-mail and any attachments
hereto, as well as any documents from a file server of International Truck and Engine Corporation or
its affiliates, this notice serves as marking as CONFIDENTIAL information of International Truck and
Engine Corporation or its affiliates. If you have received this communication in error, please
contact the original sender.

DB2 & UDB email list listserv db2-l LazyDBA home page