What is the difference between subscript and index?
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 |
how we can reverse the string in the cobol for example satheesh can be reveresed as hseehtas
how you read control card into array?
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
) How do you access the migrate the data from production region to development region
What is the LINKAGE SECTION used for?
01 ws-p pic 9(2). 01 ws-q pic 9(2) value 01. 01 ws-r pic 9(2) value 99. p.d. compute p = q + r what will be result of p ans(00) but my question is that how i got 10 on the place of 00. (truncation will ocuure on right side not left). please tell me ?
how can u redefine picx(10) with pic 9(6).
what is the use of comp2 ? where can we use it with example ?
can we use 77 level no for Redefines?if we use give an example?
I got user abend U4038 while compiling my runjcl.. can anyone help me?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
How many variables can be declared in w-s section.?