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


Please Help Members By Posting Answers For Below Questions

How do u write test cases?

1635


Mention the guidelines to write a structured cobol program?

620


How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

742


What are the pertinent COBOL commands?

2623


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1651






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

2658


What are the cobol coding sheets?

664


What happens when we move a comp-3 field to an edited (say z (9). Zz-)?

777


Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning

684


How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

2723


What do you understand by psb and acb?

661


What are the various section in data division and briefly explain them.

698


Why occurs cannot be used in 01 level in COBOL?

715


Write the code implementing the perform … varying.

644


Give some examples of command terminators?

757