Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

clist program which will access DB2 Database

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
amrita.chatterjee

New User


Joined: 27 Apr 2006
Posts: 48
Location: Bangalore, India

PostPosted: Mon May 08, 2006 11:28 am    Post subject: clist program which will access DB2 Database
Reply with quote

Hi,
Can anybody send me any document where I can find out how a clist program can access DB2 database?
Please send me to <email address deleted>
Back to top
View user's profile Send private message

jz1b0c

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Wed May 10, 2006 2:31 am    Post subject:
Reply with quote

I have a rexx which will access Db2


select_batch_cntl:
ntfnd = " "
ADDRESS TSO "SUBCOM DSNREXX" /* DSNREXX ENVIRONMENT AVILABLE?*/
/* IF NOT, ADD IT IN THE ENV LIST*/
IF RC <> 0 THEN
S_RC = RXSUBCOM('ADD','DSNREXX','DSNREXX')
/* "FROM QUALIFIER.table1 WHERE JOB_ID = '"jobid"'" */
ADDRESS DSNREXX "CONNECT " SSID
SQLSTMT = "SELECT ",
"LAST_RUN_DT,",
"JOB_INIT_DT,",
"SUCCESSFUL_IND",
"FROM QUALIFIER.table1 WHERE JOB_ID = '"jobid"'"
ADDRESS DSNREXX
"EXECSQL DECLARE C1 CURSOR FOR S1"
"EXECSQL PREPARE S1 INTO :SQLDA FROM :SQLSTMT"
"EXECSQL OPEN C1"
ROW_CNTR = 0
IF SQLCODE ? = 0 THEN SAY ' SQLCODE IS ' SQLCODE
DO WHILE (SQLCODE = 0) & ( ROW_CNTR < 5 )
IF SQLCODE \= 0 THEN LEAVE
"EXECSQL FETCH C1 INTO :rundt,:jobint,:i"
ROW_CNTR = ROW_CNTR + 1
END
"EXECSQL CLOSE C1"
IF ROW_CNTR < 2 THEN RETURN 3
return 0
Back to top
View user's profile Send private message
amrita.chatterjee

New User


Joined: 27 Apr 2006
Posts: 48
Location: Bangalore, India

PostPosted: Wed May 10, 2006 2:09 pm    Post subject: Re: clist program which will access DB2 Database
Reply with quote

Thanx for the information. But Actually I want to know how to connect DB2 database from Clist not from REXX.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us