what are the diferences b/w sub-script and index?

Answers were Sorted based on User's Feedback



what are the diferences b/w sub-script and index?..

Answer / kiran

Index is a displacement we cannot do any arthematic
operation by using index only we can asign value by using SET

Ex: set indexname to 1
upby/downby

Subcript is working storage variable we can use in
arethematic operations and used for occurances of a para

Is This Answer Correct ?    10 Yes 0 No

what are the diferences b/w sub-script and index?..

Answer / ajay dwivedi

Subscript refers to an array occurrance, whereas Index
shows the displacement in number of bytes.

Is This Answer Correct ?    2 Yes 0 No

what are the diferences b/w sub-script and index?..

Answer / mchava

A subscript is a working storage data definition item,
typically a PIC (999) where a value must be moved to the
subscript and then incremented or decremented by ADD TO and
SUBTRACT FROM statements.
An index is a register item that exists outside the
program's working storage. You SET an index to a value and
SET it UP BY value and DOWN BY value.

Is This Answer Correct ?    1 Yes 0 No

what are the diferences b/w sub-script and index?..

Answer / sumankumar

SUB-SCRIPT IS NOTHING BUT NUMBER ITS CAN DEFINE IN PERFORM
AND IT CAN BE INCREMENTED BY ARITHMETIC OPERATION, AND IT
CAN BE DISPLAY DIRECTLY

INDEX IS NOTHING BUT DISPLAY POSITION OFF ARRY COMAND AND IT
INCREMENTED BY SET VERB AND IT CANNOT DIRECTLY DISPLAYED

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More COBOL Interview Questions

A LESS 1200 IF B GREATER 25 MOVE 47 TOC ELSE MOVE 57 TO C IF A GREATER 249 MOVE 67 TO C ELSE NEXT SENTENCE ELSE IF B LESS 67 MOVE 27 TO C What will be the value of C, when A is 137 and b is 25

3 Answers   TCS,


Write the code implementing the perform … varying.

0 Answers  


What is COMP-1? COMP-2?

4 Answers   CitiGroup,


What are the cobol coding sheets?

0 Answers  


explain sorting techniques in cobol program?

0 Answers  


What is Static,Dynamic linking ?

2 Answers  


Re: 01 NAME1 PIC X(13) VALUE "COBOL PROGRAMMING". 01 NAME2 PIC X(13). now I want to display the value of NAME1 in reverse order i.e value should be displayed as "GNIMMARGORP LOBOC" HOW can I do that ??? please let me know if any one knows it.

2 Answers   IBM,


How do u write test cases?

0 Answers   IBM,


01 a pic 9(3) value is 123 01 b pic 9(6) move a to b wht will be the value ? and 01 a pic x(6) value is abc 01 b pic x(3) move a to b wht will be the value ?

7 Answers   Patni,


I am getting S00F abend when i try to compare two variable of different pic class,one variable is of 9(09) and another is S9(09) comp-3. First i moved the data from S9(09) comp-3 to 9(09), but no luck. So i tried to move the data from S9(09) comp-3 to X (09) and move to 9(09). I am getting same error message, Please help me to find solution for this ptoblem. ERROR MESSAGE - "The system or user abend S00F R=NULL was issued."

1 Answers  


consider the fallowing 77 stat pic 9. 88 male value 1,2,3. 88 female value 4 through7. what will be the value of stat a) set male to true. b) set female to true.

5 Answers  


consider the following FD FILE-1 01 REC-1 PIC X(80) ...... WORKING-STORAGE SECTION 01 W-REC PIC X(90) ........ PROCEDURE DIVISION FIRST-PARA ....... READ FILE-1 INTO W-REC AT END MOVE 1 TO EOF-FLAG which of the following is true with respect to the above? a.REC-1 will contain nothing and W-REC will contain the contains of the record read b.REC-1 and W-REC contain the same data c.syntex is invalid and error will occur d.REC-1 and W-REC must be of same size

1 Answers   TCS,


Categories