When a client sends a cursor request, a typical mainframe server application performs the tasks in Table 1-4.
Task  | 
Function  | 
|---|---|
1. Prepare for incoming requests. Initialize the Gateway-Library environment. Specify the type of IMS TM transaction (used with IMS TM transactions only).  | 
TDINIT TDSETPT  | 
2. Accept the incoming request. Accept the incoming request.  | 
TDACCEPT  | 
3. Determine the type of request. Determine the type of client request: RPC, language, dynamic, or cursor.  | 
TDINFPGM  | 
4. Determine the type of cursor request. Retrieve CURSOR-COMMAND, CURSOR-ID, and COMMAND-OPTIONS.  | 
TDCURPRO  | 
5. Process the cursor request. Get the SQL statement, number of parameters, table name, and parameters format. Either receive input parameters or update columns.  | 
TDRCVSQL TDNUMPRM TDINFPRM TDRCVPRM  | 
6. Describe the rows. Describe the rows. Send rows.  | 
TDESCRIB TDSNDROW  | 
7. Send return information. Send acknowledgment, CURSOR-STATUS, CURSOR-INFO.  | 
TDCURPRO  | 
8. Send DONE. Send a DONE package.  | 
TDSNDDON  | 
9. Accept the next request. Accept the incoming request.  | 
TDGETREQ  | 
10. End the conversation. Send final DONE package. Free the TDPROC structure. Free the MVS storage.  | 
TDSNDDON TDFREE TDTERM  |