Hi,
In embedded SQL, What is the position of the cursor before the first FETCH statement is fired.
I read two different concepts don't know which one is true.
1. When Fetch statement is fired, first the cursor is brought to the position to next record. Then the record is moved to Host variables. And the cursor point to this record only before the next fetch statment is fired.
2. When the fetch statement is fired, the cursor fetches the current record to host variables and moves to point to next record.
I am not sure which one is true and tried searching it on the IBM official site which validates the first statement above. But will this hurt at all, knowing how actually the cursor is behaving? Both ways we will get the same record to host variables. Any suggestion will be really helpful in clearing my idea of Cursor ind COBOL DB2 programs.
Many Thanks,
Kapil
** Sorry if the topic is already discussed, I tried but could not find it here, so had to post a new one. Please point me to the same, just in case.