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
How do u write test cases?
Mention the guidelines to write a structured cobol program?
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
What are the pertinent COBOL commands?
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
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
What are the cobol coding sheets?
What happens when we move a comp-3 field to an edited (say z (9). Zz-)?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
What do you understand by psb and acb?
What are the various section in data division and briefly explain them.
Why occurs cannot be used in 01 level in COBOL?
Write the code implementing the perform … varying.
Give some examples of command terminators?