Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts User access certification In Mainfram... Virendra Shambharkar All Other Mainframe Topics 4 Tue Oct 03, 2017 12:32 pm
No new posts Moving UDB database to Db2 on z/OS Keith Hooley DB2 4 Wed Sep 27, 2017 12:38 am
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us