Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     WebFOCUS calling a mainframe COBOL DB2 subroutine

Read-Only Read-Only Topic
Go
Search
Notify
Tools
WebFOCUS calling a mainframe COBOL DB2 subroutine
 Login/Join
 
Member
posted
I had a WebFOCUS focexec that called a mainframe COBOL IDMS subroutine and it worked just fine. That subroutine has since been converted to COBOL DB2 and the focexec no longer works. I have opened a case with IBI and it has been sent to the product division but I'm hoping someone else may have some experience with this.

When I tested it through WebFOCUS, it brought down the EDA server so we then tested it with mainframe FOCUS. We got the following error:
DSNT408I SQLCODE = -927, Error: THE LANGUAGE INTERFACE (LI) WAS CALLED WHEN THE CONNECTING ENVIRONMENT WAS NOT ESTABLISHED. I verified the COBOL module was link edited with and INCLUDE issued for DB2(DSNELI).

We also tried CALLDB2 and were able to get that to work but the subroutine had to be link edited to DSNALI, which our tech support people would rather not do.

Does anyone know what has to be done differently to call a DB2 subroutine versus an IDMS subroutine? Any help would be appreciated.

Becky


7.6.11 on Win 2003/IIS 6/Apache Tomcat 5.5 - MRE, ReportCaster
Reporting Server z/OS 1.11, PDS Unified
Excel, PDF, HTML
 
Posts: 7 | Registered: December 28, 2005Report This Post
Expert
posted Hide Post
FYI to all,

Becky opened a case with Information Builders' Customer Support Services and received a working solution as following (many thanks to Becky for kindly sharing with all Big Grin):


In order to get the CALLDB2 to work, two changes had to be made on the COBOL subroutine side. First, the program was link edited with DSNALI interface as required by the CALLDB2 command. We were still getting -927 THE LANGUAGE INTERFACE (LI) WAS CALLED WHEN THE CONNECTING ENVIRONMENT WAS NOT ESTABLISHED. So, secondly, a CBL NODYNAM statement was added to the COBOL program and relinked with the DSNALI interface.

This allowed the CALLDB2 command to work and then it was a matter of playing with the format length of the subroutine output to get back what we needed. I made the parameter I passed to be the same length as what needed to be returned from the subroutine. Below is the WebFOCUS code that eventually worked.

-MRNOEDIT BEGIN
-SET &DCN = '01234567';
-SET &BLNK99 = ' ';
-SET &PARM = '' || DSNSB9A2P || &DCN || &BLNK99 || '';

SQL DB2 SET AUTOCLOSE ON FIN
-RUN

-SET &RUNSUB = CALLDB2('DCNSB9A2','SDCNPB01',&PARM);
-RUN
-SET &LNAME = SUBSTR(116, &RUNSUB, 52, 69, 18, 'A18');
-SET &NAME_SFX = SUBSTR(116, &RUNSUB, 70, 72, 3, 'A3');
-SET &FNAME = SUBSTR(116, &RUNSUB, 73, 84, 12, 'A12');
-SET &MNAME = SUBSTR(116, &RUNSUB, 85, 96, 12, 'A12');
-SET &DOB = SUBSTR(116, &RUNSUB, 97, 104, 8, 'A8');
-SET &RACE = SUBSTR(116, &RUNSUB, 105, 106, 2, 'A2');
-SET &SEX = SUBSTR(116, &RUNSUB, 107, 107, 1, 'A1');
-SET &SSN = SUBSTR(116, &RUNSUB, 108, 116, 9, 'A9');

SQL DB2 SET AUTOCOMMIT ON COMMAND
-RUN

-MRNOEDIT END


Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     WebFOCUS calling a mainframe COBOL DB2 subroutine

Copyright © 1996-2020 Information Builders