View previous topic :: View next topic
|
Author |
Message |
nadeemahmed Currently Banned New User
Joined: 17 Jan 2008 Posts: 5 Location: Chennai
|
|
|
|
Hi frnz..
Iam workin on a CICS+COBOL+DB2 program...
Iam designing an online examination system..
So my requirement is i have to fetch the questions from a table and display in a map and once user gives the answer at tat moments it has to be evaluated and computed at the background and then the next question must be displayed to him waiting for his option..
In this process iam successful in first instant but the program doesn fetch and display the second ques though i have used cursors..iam looping this fetching and computing para until sql code=100 in a perform..Require your inputs and help on how it could be done..
Thanks in Advance.. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
?
Code: |
Fetch first row
Send first screen
Perform until 100
Fetch next row
If not 100
Read current screen
Send next screen
Evaluate current answer
End if
End perform |
|
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
NOTE: This is conversational cics programming that is not allowed at many sites. It also is incorrect in that the last answer would never be processed. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Craq Giegerich wrote: |
NOTE: This is conversational cics programming that is not allowed at many sites. |
Your point?
nadeemahmed wrote: |
..iam looping this fetching and computing para until sql code=100 in a perform.. |
Quote: |
It also is incorrect in that the last answer would never be processed. |
BFD, he didn't define or open the cursor, initialize storage, or include the GOBACK either..... |
|
Back to top |
|
|
nadeemahmed Currently Banned New User
Joined: 17 Jan 2008 Posts: 5 Location: Chennai
|
|
|
|
Thanks alot for all ya quick response..i was successful in displayin the questions one by one from the table by fetching..i have 4 modules of ques papers like J001,C001,D001,I001 each having 5 ques each..the user will choose one of the modules to write the test..this info is stored in a registration table..i have to fetch this module for which the user has registered from the registration table and then correspondingly i have to fetch the questions from the question table..the challenge iam facing is tat the cursor fetches the rows one aftr the other and displays all q.papers..so iam stuck as to how i could initially point ma cursor to the row in q.paper table which has the module for which user has registered and from there i have to loop it 5 times..
In simple words i have to initially point ma cursor dynamically to tat row of the table which has been seleceted by the user and from there i have to fetch 5 ques..I know tat i could achieve this by using scrollable cursors but the prob is i have NO ACCESS FOR THAT..so guys plz suggest me as to wat r the possible ways..
Thank u guys again for all ya inputs.. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
nadeemahmed wrote: |
I know tat i could achieve this by using scrollable cursors but the prob is i have NO ACCESS FOR THAT.. |
A very big ?
What is the restriction on a cursor that you have no access? |
|
Back to top |
|
|
nadeemahmed Currently Banned New User
Joined: 17 Jan 2008 Posts: 5 Location: Chennai
|
|
|
|
Iam a beginner so they havent given access to tat..i too dunno the reson y..thatsy am finding alternatives for tat!!! |
|
Back to top |
|
|
|