This tutorial walks you through the process of modifying the SQLCLRTutorialSPCall solution to call a stored procedure using group variables.
You can pass group structured host variables to a SQL CLR stored procedure, receiving results as a group variable. The modifications to made in this tutorial to the SQLCLRTutorialSPCall solution demonstrate how to use group variables as parameters when working with stored procedures.
Modify the SQLCLRTutorialSPCall Solution
- If you have closed the SQLCLRTutorialSPCall solution, open it in
Enterprise Developer.
- From the Solution Explorer, replace the
SPCall.cbl file in the SPCall project with the
SPCall.cbl file located in the
%PUBLIC%\Documents\Micro Focus\Enterprise Developer\Samples\Mainframe\SQL\hcoss\JCLCallingSP\SPDGroupDemo\SPCall directory.
- Replace the
EMP.cpy,
GETHIRE.cbl, and
SQLCLRStoredProc.spd files in the SQLCLRTutorial project with files of the same names, located in the
%PUBLIC%\Documents\Micro Focus\Enterprise Developer\Samples\Mainframe\SQL\hcoss\JCLCallingSP\SPDGroupDemo\ SQLCLRTutorial\SQLCLRTutorial directory.
Rebuild the Solution
- From the Solution Explorer, right-click the
SQLCLRTutorialSPCall solution; then click
Rebuild Solution from the context menu.
Republish the SQLCLRTutorial.Publish Project
- Right-click the SQLCLRTutorial.Publish project; then select Publish from the context menu.
Restart the JCLSP Enterprise Server Region
- On the Server Explorer, right-click the
JCLSP region; then select
Restart from the context menu.
Submit the JCL
- From the Solution Explorer, right-click
SPCall.jcl; then select
Submit JCL from the context menu.
View JCL Execution Results
- In the
Enterprise Developer Output window, select
Enterprise Server from the
Show output from drop-down list.
- CTRL-click the job output link.
This opens the
JCLSP tab, showing the
Enterprise Server Job Output window.
- Click
SYSOUT.
This shows the output from the SQL CLR Stored Procedure.
- Close the
JCLSP tab.
Stop the JCLSP Enterprise Server Region
- On the Server Explorer, right-click
JCLSP; then select
Stop from the context menu.