In this case, I wanted to talk about the interesting possibility of updating data in our tables while using a SQL cursor.
I give you an example of how you can do it using a simple program in RPGI use DB2 for i, and Code for i in this video.
Hope you like!
Enjoy!
#ibmi #ibm #rpg #rpgle #rpgfree #newvideo #ibmtraining #ibmcoding #rpgtraining #sqlrpgle #sqltraining #as400 #common #modernize #IBMChampion
0:00 Introduction
0:19 Creating of the table and records for the example using DB2 for i
1:10 Creating a RPG program that will do the job
2:11 Defining the commit control (in my case, *NONE)
2:59 Declaring the cursor.
3:38 Creating a simple LOOP that will run while SQLCOD is equal to zero.
3:56 Fetching the information from the cursor.
4:50 Updating (or not) the information of my table using UPDATE
6:38 Compiling and running the program (from within VSCode)
10:08 Final comments and ending
Download
0 formats
No download links available.
Coding in RPG (IBM i/AS400). Updating a TABLE while using a CURSOR. | NatokHD