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 we sort two input files based on a common column and giving one o/p file please send me the coding logic?
What the difference is between continue and next sentence?
What are INPUT PROCEDURE and OUTPUT PROCEDURE?
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
How do define dynamic array in cobol.
I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
What is cobol?
What is the difference between Global and External Variables?
) How do u handle errors in BMS macro?
How arrays can be defined in COBOL?
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
What do you understand by psb and acb?
1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?
i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this