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 do you attach a DB2 plan to a CIC... John Poulakos DB2 0 Wed Apr 18, 2018 1:49 am
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts Mantis Program Compiled? luis carlos CICS 2 Sat Apr 07, 2018 8:59 pm
No new posts Undefined Report Program socker_dad COBOL Programming 2 Fri Mar 30, 2018 1:45 am
No new posts java.io.FileNotFoundException - passi... Virendra Shambharkar Java & MQSeries 5 Mon Feb 26, 2018 11:41 am

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