View previous topic :: View next topic
|
Author |
Message |
sandeep_yadav_in
New User
Joined: 26 May 2007 Posts: 13 Location: Noida, India
|
|
|
|
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 |
|
|
NOWAR
New User
Joined: 20 Feb 2007 Posts: 11 Location: Houthalen, Belgium
|
|
|
|
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 |
|
|
sandeep_yadav_in
New User
Joined: 26 May 2007 Posts: 13 Location: Noida, India
|
|
|
|
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 |
|
|
NOWAR
New User
Joined: 20 Feb 2007 Posts: 11 Location: Houthalen, Belgium
|
|
|
|
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 |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
This item should be moved to IDMS |
|
Back to top |
|
|
|