PERFORM ACCUMULATE-TOTALS
VARYING A FROM 1 BY 2 UNTIL A >2
AFTER B FROM1 BY 1 UNTIL B>2
AFTER C FROM 2 BY -1 UNTIL C<2
How many times the paragraph ACCUMULATE-TOTALS would be
exicuted?
Answer Posted / shan
looping happens for following values of
A, B, C
1, 1, 2 = 1st
1, 2, 2 = 2nd
2, 1, 2 = 3rd
2, 2, 2 = 4th
So totally four times this will get executed
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
What rules are followed by the search verb.
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.
What is the difference between external and global variables in COBOL?
Give some examples of command terminators?
What is rmode(any) ?
What is the utilization of copybook in cobol?
How can you get the ksds file records into your cobol program?
how do you reference the fixed unblock file formats from cobol programs
Why would you use find and get rather than to obtain?
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
How you can read the file from bottom?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
What is the difference between Global and External Variables?