Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
What Does IDMS_STATUS do in IDMS?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IDMS/ADSO
Author Message
sandeep_yadav_in
Currently Banned

New User


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

PostPosted: Fri Jan 11, 2008 5:27 pm    Post subject: What Does IDMS_STATUS do in IDMS?
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
References
PostPosted: Fri Jan 11, 2008 5:27 pm    Post subject: Re: What Does IDMS_STATUS do in IDMS? Reply with quote

NOWAR

New User


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

PostPosted: Thu Jan 24, 2008 1:11 pm    Post subject: Reply to: What Does IDMS_STATUS do in IDMS?
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
Currently Banned

New User


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

PostPosted: Fri Jan 25, 2008 11:16 am    Post subject: Reply to: What Does IDMS_STATUS do in IDMS?
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    Post subject: Reply to: What Does IDMS_STATUS do in IDMS?
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

IMS Moderator


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

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

This item should be moved to IDMS icon_wink.gif
Back to top
View user's profile Send private message
Moved: Sat Jan 26, 2008 2:01 am by dick scherrer From IMS DB/DC to IDMS/ADSO
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IDMS/ADSO All times are GMT + 6 Hours
Page 1 of 1