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:
Where ScriptPath\Name is the full path and filename of the post-deployment script file. If the path or filename contains spaces, enclose the entire path and filename in quotes. DefaultNameSpace is the default namespace used in the project, and which is used by the generated ALTER statement in the post-deployment script file. You can see the default namespace on the Application tab of your project properties.
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.