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

What Does IDMS_STATUS do in IDMS?


IBM Mainframe Forums -> IDMS/ADSO
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sandeep_yadav_in

New User


Joined: 26 May 2007
Posts: 13
Location: Noida, India

PostPosted: Fri Jan 11, 2008 5:27 pm
Reply with quote

Hi Guys,

What Does IDMS_STATUS do in IDMS?

If we are using IDMS_STATUS like
CALL IDMS_STATUS;

What Basically is happening when this statements gets executed?


Thanks,
Sandy
Back to top
View user's profile Send private message
NOWAR

New User


Joined: 20 Feb 2007
Posts: 11
Location: Houthalen, Belgium

PostPosted: Thu Jan 24, 2008 1:11 pm
Reply with quote

This statement is checking de result of a idms-statement (obtain/modify/store/find/erase)

It calls a procedure (section) that must be imported in your cobol-source:

Code:
******************************************************************
*-----------  I D M S - S T A T U S   C O P Y B O O K -----------*
******************************************************************
 COPY IDMS IDMS-STATUS.
 IDMS-ABORT SECTION.
Back to top
View user's profile Send private message
sandeep_yadav_in

New User


Joined: 26 May 2007
Posts: 13
Location: Noida, India

PostPosted: Fri Jan 25, 2008 11:16 am
Reply with quote

Hi Nowar,

Thanks a Lot for that information.

It means it(IDMS_STATUS) is working as SQLCODE in DB2. In DB2 After a querry is executed we check for its SQLCODE. If it is 0 then the Querry was executed successfully and if it is less than 0 than there were some errors.

Is my understanding correct?
Back to top
View user's profile Send private message
NOWAR

New User


Joined: 20 Feb 2007
Posts: 11
Location: Houthalen, Belgium

PostPosted: Fri Jan 25, 2008 12:34 pm
Reply with quote

Yes, with DB2 you test on the sql-code and in IDMS you test the error-status, with is a result of PERFORM IDMS-STATUS

For example :
Retrieving a record-occurence with a calc-key (like Primairy key in DB2)

Code:
OBTAIN CALC <db-record>
PERFORM IDMS-STATUS
IF ERROR-STATUS = 0326 (= this means there is no record found)
THEN
  <do something>
END-IF


It also can be written like :

Code:
OBTAIN CALC <db-record>
PERFORM IDMS-STATUS
IF DB-REC-NOT-FOUND
THEN
  <do something>
END-IF


Search on the web for 'programming quick reference & CA-IDMS', maybe you will find a reference.

Rudi
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Sat Jan 26, 2008 1:26 am
Reply with quote

This item should be moved to IDMS icon_wink.gif
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 -> IDMS/ADSO

 


Similar Topics
Topic Forum Replies
No new posts IDMS record copybook IDMS/ADSO 3
No new posts Can records in IMS/DB be related usin... IMS DB/DC 2
No new posts IDMS DC027007 T58 TASK:ADS2 PROG:ADSO... IDMS/ADSO 2
No new posts IDMS/DC-COBOL program - SNAP error wh... IDMS/ADSO 5
No new posts ADS 3270 Batch simulator for IDMS rel... IDMS/ADSO 1
Search our Forums:

Back to Top