If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > COBOL and DB2 UDB for workstations

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-09-03, 02:44
ulfnsc ulfnsc is offline
Registered User
 
Join Date: May 2003
Location: SWEDEN
Posts: 10
COBOL and DB2 UDB for workstations

The problem we have is that we want to use the same COBOL code,locally for UDB v7(fix 9) and on mainframe for DB2 7.2(it works OK on mainframe) to fetch a result set from a target SQL procedure.
ALLOCATE CURSOR
ASSOCIATE LOCATOR
SQL TYPE IS RESULT-SET-LOCATOR
Is this not possible?
/uffe
Reply With Quote
  #2 (permalink)  
Old 05-09-03, 08:08
Rick-dba Rick-dba is offline
Registered User
 
Join Date: Apr 2003
Location: Florida
Posts: 79
I know it is possible to perform remote UDB database calls through mainframe Cobol.... Is that what you are trying to do? If so, Cobol on mainframe must perform a remote bind on UDB.

We got it working once a few years ago, but killed the project - If you decide this is what you want I can try and get more information on the procedures.

Rick
Reply With Quote
  #3 (permalink)  
Old 05-12-03, 04:54
ulfnsc ulfnsc is offline
Registered User
 
Join Date: May 2003
Location: SWEDEN
Posts: 10
Hej Rick.
We are trying to use the same COBOL code, locally for database calls to UDB and on mainframe for database calls to DB2 to fetch a result set from a target SQL procedure.

I got an answer from IBM that "this is not possible, because DB2 UDB doesn't support this data type (Result-Set-Locators)". And that "there is no plan to change this behavior in a future release".
/uffe


Quote:
Originally posted by Rick-dba
I know it is possible to perform remote UDB database calls through mainframe Cobol.... Is that what you are trying to do? If so, Cobol on mainframe must perform a remote bind on UDB.

We got it working once a few years ago, but killed the project - If you decide this is what you want I can try and get more information on the procedures.

Rick
Reply With Quote
  #4 (permalink)  
Old 05-12-03, 08:09
Rick-dba Rick-dba is offline
Registered User
 
Join Date: Apr 2003
Location: Florida
Posts: 79
That sounds right.... We are not calling an SQL procedure on UDB, the Cobol programs are bound on UDB to access the tables only. I didn't know SQL procedures were not supported - but I certainly will remember that!

Rick
Reply With Quote
  #5 (permalink)  
Old 05-12-03, 09:04
ulfnsc ulfnsc is offline
Registered User
 
Join Date: May 2003
Location: SWEDEN
Posts: 10
Hej Rick.
Stored Procedures are supported in DB2 UDB, the one i have problem with is using a cursor. Because DB2 UDB doesn't support data type Result-Set-Locators in COBOL.....
Thanks from a Sunny SWEDEN.
/uffe

Quote:
Originally posted by Rick-dba
That sounds right.... We are not calling an SQL procedure on UDB, the Cobol programs are bound on UDB to access the tables only. I didn't know SQL procedures were not supported - but I certainly will remember that!

Rick
Reply With Quote
  #6 (permalink)  
Old 08-07-03, 17:25
ekwongffic ekwongffic is offline
Registered User
 
Join Date: Aug 2003
Location: Novato, CA
Posts: 1
Question Remote Bind to AIX UDB from MVS

I am trying to bind a MVS Cobol with DB2 to an AIX database and I got this when binding the package. I can select the table thru SPUFI using the id FRF1TAY. Also, I had successfully bound another vendor package which handles only dynamic SQL and is working. Any helps will be appreciate. Thanks in advance.


READY
DSN SYSTEM(DB2A)
DSN
BIND PACKAGE ( PR0YPT01.FRPP900B) ACTION
RELEASE ( COMMIT ) ISOLATION ( CS ) VALIDAT
LIBRARY ( 'FRP1EKK.DBRMLIB' ) MEMBER ( FRPP
ERROR ( NOPACKAGE ) CURRENTDATA ( NO )
DSNT271I -DB2A THE FOLLOWING SQLCA INFORMATION WAS RETURNED FROM
SQLRPRIV
SQLCODE = -551
SQLSTATE = 42501
SQLERRMT = FRF1TAY SELECT IPSR0T00.PS_BUS_UNIT_TBL_GL
SQLWARN 0= ,1= ,2= ,3= ,4= ,5= ,6= ,7= ,8= ,9= ,A=
STATEMENT= 335
DSNT270I -DB2A THE FOLLOWING SQLCA INFORMATION WAS RETURNED FROM
SQLJSBND
SQLCODE = -917
SQLSTATE = 42969
SQLERRMT =
SQLWARN 0= ,1= ,2= ,3= ,4= ,5= ,6= ,7= ,8= ,9= ,A=
DSNT233I -DB2A UNSUCCESSFUL BIND FOR
PACKAGE = PR0YPT01.FRPP900B.FRPP900B.()
DSN
END
READY
END






Quote:
Originally posted by Rick-dba
I know it is possible to perform remote UDB database calls through mainframe Cobol.... Is that what you are trying to do? If so, Cobol on mainframe must perform a remote bind on UDB.

We got it working once a few years ago, but killed the project - If you decide this is what you want I can try and get more information on the procedures.

Rick
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On