1)what is the maximum limit for occurs?
Eg: 01 A PIC X(10) OCCURS N TIME.
What is the max value for N?
Answer Posted / ravi patnam
Maximum value for the N is 99999999. For example see below:
$set ans85 comp
IDENTIFICATION DIVISION.
PROGRAM-ID. "test".
AUTHOR. RAVI PATNAM.
DATE-WRITTEN. 20-02-2009.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
WORKING-STORAGE SECTION.
01 N pic 9(9) value 0.
01 test-occurs occurs 0 to 99999999
depending on N.
02 test-no pic 9(2).
PROCEDURE DIVISION.
MAIN.
move 99999999 to N.
move 11 to test-no(N).
display test-no(N).
stop run.
| Is This Answer Correct ? | 5 Yes | 9 No |
Post New Answer View All Answers
explain sorting techniques in cobol program?
What is the usage of comp fields in cobol?
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
) How do u handle errors in BMS macro
What is a report item?
Whats the difference between search & search ALL?
Write a program that uses move corresponding.
What are the different types of condition in cobol and write their forms.
There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.
I have a File that has duplicate records. I need only those records that occur more than thrice.?
What is the difference between Global and External Variables?
Difference between array and sub-script ?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
How are the next sentence and continue different from each other?