Working Storage Definition

Consider the follwing snippet:

01 WS-VAR USAGE IS INDEX

Is this a valid working storage definition?
Justify your answer

Questions by sprabodhini

Showing Answers 1 - 6 of 6 Answers

guraddiv

  • May 21st, 2008
 

Hi,

   This is not a Valid definition bcz the USAGE IS INDEX clause is used to provide an optimized table subscript. When a table is the target of a SEARCH statement it must have an associated index item.
     Any item declared with USAGE IS INDEX can only appear in:
        - A SEARCH or SET statement
        - A relation condition
        - The USING phrase of the PROCEDURE DIVISION
        - The USING phrase of the CALL statement

pnkumar519

  • Dec 4th, 2008
 

01 WS-VAR USAGE IS INDEX.

it is a valid working storage definition. We can use this variable to store displacement value of another table index. Like normal table index it cannot be used in any computataions and terminal control statements.

Thanks,
Narender

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions