Sample DB2 Multirow Fetch and Multirow Insert Program
Sample DB2 Multirow Fetch and Multirow Insert Program
Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
Author Message
apandey Posted: Thu Nov 03, 2011 4:06 pm Post subject: Sample DB2 multirow fetch and Multirow Insert program
New User
HI All,
Joined: 31 Aug 2009
Posts: 73
Location: Mumbai
Can one pls provide a sample Cobol + DB2 (Multirow Fetch and multirow Insert) program.
Back to top
Active Member
Take a look... This might help - http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?
Joined: 31 Jul 2009 topic=%2Fcom.ibm.db2.doc.relg%2Ffmlt.htm
Posts: 565
Location: Bangalore
Back to top
sushanth bobby Posted: Fri Nov 04, 2011 12:01 am Post subject:
Senior Member
ibmmainframes.com/post-282428.html 1/5
3/17/2020 IBM MAINFRAME: Sample DB2 multirow fetch and Multirow Insert program
Ashutosh,
Joined: 29 Jul 2008
Posts: 1017
Location: India Try it out!
ibmmainframes.com/post-282428.html 3/5
3/17/2020 IBM MAINFRAME: Sample DB2 multirow fetch and Multirow Insert program
012500 END-IF
012600 DISPLAY 'TOTAL NUMBER OF RECORDS = ' RECORD-COUNT
012700 DISPLAY 'TOTAL I/O STATUS = ' IO-COUNT
012800 MOVE 'Y' TO END-OF-LOOP
012900
013000 WHEN OTHER
013100 DISPLAY 'ERROR IN RETREVING DATA'
013200 DISPLAY 'SQLCODE = ' SQLCODE
013300
013400 END-EVALUATE
013500 END-PERFORM.
013600
013700 0200-READ-ARRAY.
013800 MOVE 1 TO I
013900 PERFORM LOOP TIMES
014000 MOVE WS-COMMM(I) TO WS1-COMMM
014100 MOVE WS1-COMMM TO WS2-COMMM
014200 DISPLAY WS-EMPNO(I)' 'WS-FIRSTNME(I)' 'WS-INDI(I)' 'WS2-COMMM
014300 ADD 1 TO I
014400 ADD 1 TO RECORD-COUNT
014500 END-PERFORM
014600 ADD 1 TO IO-COUNT.
014700
014800 1000-END-PROGRAM.
014900 GOBACK.
015000
015100 9000-DB-ERROR.
015200 GO TO 1000-END-PROGRAM.
015300
Thanks,
Sushanth
Back to top
New User
Thanks Gylbharath and Sushanth.
Joined: 31 Aug 2009
Posts: 73
Location: Mumbai
Back to top
Page 1 of 1
ibmmainframes.com/post-282428.html 4/5
3/17/2020 IBM MAINFRAME: Sample DB2 multirow fetch and Multirow Insert program
Custom Search
Similar Topics
Navigation program in CICS Ziko13 CICS 11 Fri Mar 06, 2020 2:30 pm
Cobol db2 program going in loop sivasaras COBOL Programming 4 Sat Feb 29, 2020 7:44 pm
To fetch value separated by commas fr... vinu78 DB2 3 Fri Feb 28, 2020 12:56 pm
Dynamic cursor name in Cobol program Jlevine COBOL Programming 1 Fri Feb 14, 2020 2:55 am
Call a transaction simulator froma st... John F Dutcher IMS DB/DC 0 Wed Jan 22, 2020 10:54 pm
ibmmainframes.com/post-282428.html 5/5