This articles describes some additions to Mainframe Express that make Stored Procedure processing easier.
Problem:
Running stored procedures using Mainframe Express and SQL Option used to be unwieldy. We have made some changes to simplify this process.
Resolution:
First, you no longer need to add information in the xdb.ini to invoke stored procedures. This can all be controlled from the IDE and the SP test tool.
From within the IDE, you can now select the location you wish to run your program against by specifying an XDB Location under Data Library in the Workgroup tab of the Mainframe Express project.
You should be able to specify multiple XDB locations. The first one you check will be the location to which the user connects. This is true with or without stored procedures.
You can also use the Load LibrariesWorkgroup tab to search for stored procedures on the remote system. If a directory exists on a remote server, you have to add that Load Library to the IDE. Debugging of stored procedures can be started when debugging a COBOL client program that invokes the stored procedure by checking Enable Stored Procedures Debugging on the Start Debugging dialog.
In order to define functions in Mainframe Express:
- A user defined scalar function is implemented as a stored procedure but it is not called as a stored procedure. A user defined scalar function is invoked like any other scalar function. It is merely part of the SQL text. Therefore, the restrictions for invoking stored procedures via the XDB Link do not apply to user defined scalar functions.
- A user defined scalar function is invoked by either a two part name or a one part name using the SQL PATH. The SQL PATH is a comma separated list of schema names. Through the Link, this can be set either by a SET PATH statement issued dynamically or by using the PATH option when binding/rebinding packages.
We enhanced the BIND utility in Mainframe Express 3.1 WS 04 to add the SQL PATH to the bind options as shown below:
#EnterpriseDeveloper
#MFDS




