Updating a row in sql

Lines 13 – 22: The Do loop to Fetch (read) all the rows and update.Line 14: A fetch is like a read, it retrieve a row (record) from the file.Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.Visit Stack Exchange Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Sign up to join this community ------------------------------------------------------------------------- | name | family | phone | email | gender | phone2 | address | birthdate | ------------------------------------------------------------------------- in table #1 columns address and phone2 is empty and columns gender and birthdate values is same as table #2.

Lines 2 – 5: As I will be calling the QCMDEXC API program I need to define a procedure prototype for the API. Line 6: I need to define the file, TESTFILE, with a statement.

I can do this when compiling the program too, but this makes absolutely sure just in case the person who compiles the program forgets to change the compile command parameter.

Line 5: In the RPG program I had to provide create declare a procedure prototype of QCMDEXC, and pass it the length of the string.

I can far more easily just call the QCMDEXC SQL procedure.

Line 6 – 11: Here I declare/define the cursor I will be using to fetch rows (records) from the file.

Leave a Reply