IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ADABAS response code if record not found


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
purushottam

New User


Joined: 26 Feb 2007
Posts: 37
Location: pune

PostPosted: Thu Jun 04, 2009 7:57 pm
Reply with quote

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
View user's profile Send private message
beruoist

New User


Joined: 14 Nov 2007
Posts: 70
Location: mumbai

PostPosted: Mon Jun 15, 2009 1:55 pm
Reply with quote

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
View user's profile Send private message
purushottam

New User


Joined: 26 Feb 2007
Posts: 37
Location: pune

PostPosted: Wed Jun 17, 2009 7:34 pm
Reply with quote

Thanks for your advice...

But here i am modifying the existing code to do something if record is not found.
Back to top
View user's profile Send private message
beruoist

New User


Joined: 14 Nov 2007
Posts: 70
Location: mumbai

PostPosted: Fri Jun 19, 2009 2:26 pm
Reply with quote

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
View user's profile Send private message
purushottam

New User


Joined: 26 Feb 2007
Posts: 37
Location: pune

PostPosted: Thu Jun 25, 2009 9:25 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts How I Found a Bug in a FORTRAN Compiler All Other Mainframe Topics 4
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
Search our Forums:

Back to Top