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 |
BY seeing a program how can we say that it is static call or dynamic call
How to covert given string into ASCII value in COBOL/MF COBOL
IDENTIFICATION DIVISION. PROGRAM-ID. MOVEPGM. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-I PIC 9(2). PROCEDURE DIVISION. A1000-MAIN-PARA. PERFORM PARA-X WITH TEST BEFORE UNTIL WS-I= 5 STOP RUN. PARA-X. DISPLAY "BEST2". I m getting error s722,while executing the program, seems getting in loop, can anybody tell me why
If we use GO BACK instead of STOP RUN in cobol?
I have a field with data type X(10). I want to perform arithmetic operation on this field? I tried doing it by moving the value into a numeric field. but it didn't work out. I am getting a S0C7 abend. Pls let me know if there is any way of getting this done?
What are the differences bitween cobol and cobol-2?
Program A calls program B. Will the working storage variables declared in program B be initialized every time it is called by program A or will the values be retained until the end of program A?
A cobol program to read a file , match it with other if. If match occurs then write it to an output file. If no match then no need to write it.Error log created by program to track any error.
How to know whether the module is dynamical or statistical?
I have a source program compiled with Cobol-2. The output file has a record length of 100 defined in the program but a record of 60 bytes getting written into it. i.e. The rest of 40 bytes I am not Writing anything. But it by default puts some values into the last 40 bytes. However it does not impact anything. But when Compiled the module with Enterprise Cobol the last 40 bytes were spaces as fillers. Can anyone explain?
What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?
Write the code to count the sum of n natural numbers.