View previous topic :: View next topic
|
Author |
Message |
purushottam
New User
Joined: 26 Feb 2007 Posts: 37 Location: pune
|
|
|
|
I need help to figure out the response code value if reading a ADABAS file by COBOL program and record is not found in that file. Like COBOL module is coded like
EXEC ADABAB
FETCH ABCD
END-EXEC
/* ABCD is view of ADABAS file
After this we are checking the value in variable
RESPONSE-CODEABCD (This looks as an system variable as not defined in pgm)
I want to know what will be value of RESPONSE-CODEMKTG
If record not found in ABCD file. |
|
Back to top |
|
|
beruoist
New User
Joined: 14 Nov 2007 Posts: 70 Location: mumbai
|
|
|
|
What don't you use quantity instead of response code to check whether a record is found or not.
For example
EXEC ADABAS
.
.
.
END-EXEC.
Move quantity of FILE-NAME to ws-quantity.
If ws-quantity<1
perform error-routine.
You can use above approach. |
|
Back to top |
|
|
purushottam
New User
Joined: 26 Feb 2007 Posts: 37 Location: pune
|
|
|
|
Thanks for your advice...
But here i am modifying the existing code to do something if record is not found. |
|
Back to top |
|
|
beruoist
New User
Joined: 14 Nov 2007 Posts: 70 Location: mumbai
|
|
|
|
purushottam wrote: |
Thanks for your advice...
But here i am modifying the existing code to do something if record is not found. |
Buddy if you use the above logic with FIND with the exact key.It is going to serve your purpose for putting the logic for NO RECORD FOUND.Obviously if the record is not founded with the record key the quantity value will be zero else it would be one..applying the logic on the basis of the value of quantity you can execute your customized subroutine.
Please tell me if my above understanding is incorrect ? |
|
Back to top |
|
|
purushottam
New User
Joined: 26 Feb 2007 Posts: 37 Location: pune
|
|
|
|
Sorry for delay in response...
I dont have a exact value for superdescriptor field so using read logic. Do you know even through Qnt logic can be implemented ?? Could you suggest how..
Also i am getting response code as "0021" in case of no record found. not sure it is correct.. |
|
Back to top |
|
|
|