SAP Knowledge Base Article - Preview

2019819 - ESQL/Cobol - Output parameter not SET

Symptom

We have cobol program that calls sql stored procedure provided by vendor that works with Sybase 12.5 32 bit and Micro Focus 32 bit. When we compile the same program with Sybase 15.7 64bit and Micro Focus Cobol 64 bit, the stored procedure is invoked and it updates the value in the database but does not return that value to working storage for display.

One thing I notice is the /usr/sybase/rel157/OCS-15_0/include/sybhesql64.cbl is different then /usr/sybase/rel1205/OCS-12_5/include/sybhesql.cbl is different (as expected).

However when I make changes in /usr/sybase/rel157/OCS-15_0/include/sybhesql64.cbl as highlighted in red below, it works (changes were only made to investigate the issue). 

Following is part of listing of sybhesql64.cbl (rel157) and sybhesql.cbl (rel1205) in its original format:

/usr/sybase/rel157/OCS-15_0/include/sybhesql64.cbl /usr/sybase/rel1205/OCS-12_5/include/sybhesql.cbl

01 SQL--DFMTDFMT-NAME. 01 SQL--DFMTDFMT-NAME.
05 SQL--NM PIC X(256). 05 SQL--NM PIC X(132). 
05 SQL--NMLEN PIC S9(9) comp value is 0. 05 SQL--NMLEN PIC S9(9) comp value is 0.
05 SQL--DATATYPE PIC S9(9) comp value is 100. 05 SQL--DATATYPE PIC S9(9) comp value is 100.
05 SQL--FORMAT PIC S9(9) comp value is 1. 05 SQL--FORMAT PIC S9(9) comp value is 1.
05 SQL--MAXLENGTH PIC S9(9) comp value is 0. 05 SQL--MAXLENGTH PIC S9(9) comp value is 0.
05 SQL--SCALE PIC S9(9) comp value is 0. 05 SQL--SCALE PIC S9(9) comp value is 0.
05 SQL--PRECISION PIC S9(9) comp value is 18. 05 SQL--PRECISION PIC S9(9) comp value is 18
05 SQL--STTUS PIC S9(9) comp value is 0. 05 SQL--STTUS PIC S9(9) comp value is 0. 
05 SQL--COUNT PIC S9(9) comp value is 1. 05 SQL--COUNT PIC S9(9) comp value is 1
05 SQL--USERTYPE PIC S9(9) comp value is 0. 05 SQL--USERTYPE PIC S9(9) comp value is 0.
05 SQL--LOCALE PIC S9(18) comp value is 0. 05 SQL--LOCALE PIC S9(9) comp value is 0

After changing the /usr/Sybase/rel157/OCS-15_0/include/sybhesql64.cbl:

01 SQL--DFMTDFMT-NAME. 01 SQL--DFMTDFMT-NAME.
05 SQL--NM PIC X(132). 05 SQL--NM PIC X(132). 
05 SQL--NMLEN PIC S9(9) comp value is 0. 05 SQL--NMLEN PIC S9(9) comp value is 0.
05 SQL--DATATYPE PIC S9(9) comp value is 100. 05 SQL--DATATYPE PIC S9(9) comp value is 100.
05 SQL--FORMAT PIC S9(9) comp value is 1. 05 SQL--FORMAT PIC S9(9) comp value is 1.
05 SQL--MAXLENGTH PIC S9(9) comp value is 0. 05 SQL--MAXLENGTH PIC S9(9) comp value is 0.
05 SQL--SCALE PIC S9(9) comp value is 0. 05 SQL--SCALE PIC S9(9) comp value is 0.
05 SQL--PRECISION PIC S9(9) comp value is 18. 05 SQL--PRECISION PIC S9(9) comp value is 18
05 SQL--STTUS PIC S9(9) comp value is 0. 05 SQL--STTUS PIC S9(9) comp value is 0. 
05 SQL--COUNT PIC S9(9) comp value is 1. 05 SQL--COUNT PIC S9(9) comp value is 1
05 SQL--USERTYPE PIC S9(9) comp value is 0. 05 SQL--USERTYPE PIC S9(9) comp value is 0.
05 SQL--LOCALE PIC S9(9) comp value is 0. 05 SQL--LOCALE PIC S9(18) comp value is 0



Read more...

Environment

SAP SDK 15.7 64bit and Micro Focus Cobol 64 bit

Product

Sybase SDK 15.7 ; Sybase Software Developer Kit 15.7

Keywords

KBA , BC-SYB-SDK , SDK , Bug Filed

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.