Post-deployment Script Requirements

Restriction: This topic applies only to Visual Studio projects that include a stored procedure program called by Java, and also includes a stored procedure definition file that specifies the DATETIME2 parameter.

Java routines cannot call a SQL COBOL stored procedure that contains a TIMESTAMP parameter. Therefore, TIMESTAMP parameters in stored procedures that are called by Java routines must be changed to DATETIME2 to be compatible with Java calls. However, Microsoft does not support DATETIME2 parameter types under .NET. During compilation and deployment with Visual COBOL, DATETIME2 is changed to DATETIME. In this scenario, you must provide a post-deployment script that changes the DATETIME parameter back to DATETIME2 to ensure compatibility with Java. To do this:

Once all of this is in place, any DATETIME2 parameter that you code into the SPD file automatically generates the appropriate post-deployment code in the post-deployment script file.