What is the difference between subscript and index?
Answer Posted / robertd903
Subscripts are programmer-defined variables, of numeric type--used to reference an array.
Example:
77 WS-SUB PIC 9(04) COMP.
01 WS-TABLE.
05 WS-TABLE-ENTRY OCCURS 5 Times PIC X(80).
In PROCEDURE DIVISION:
MOVE WS-TABLE-ENTRY(WS-SUB) TO...
Indexes are defined by the programmer, but the PICTURE clause is omitted.
Example:
01 WS-TABLE.
05 WS-TABLE-ENTRY OCCURS 5 TIMES INDEXED BY WS-IDX.
10 FILLER PIC X(80).
In PROCEDURE DIVISION:
MOVE WS-TABLE-ENTRY(WS-IDX) TO...
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
) How do u handle errors in BMS macro?
Can a Search can be done on a table with or without Index?
How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?
How do you define a variable of comp-1 and comp-2?
What is the difference between perform … with test after and perform … with test before?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
What is Pic 9v99 Indicates in COBOL?
Have you used comp and comp-3 in your project? And how?
input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?
What is difference between static and dynamic call in cobol?
Explain how to differentiate call by context by comparing it to other calls?
For rewrite, why is it mandatory that file needs to be opened?
what are decleratives in cobol?
What type of SDLC u followed? Why?
If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly