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
What are the different types of condition in cobol and write their forms.
What the difference is between continue and next sentence?
how can i see junk values in dclgen or in hostvariable of comp ?
What are INPUT PROCEDURE and OUTPUT PROCEDURE?
What is rmode(any) ?
Whats the difference between search & search ALL?
What is redefines clause in COBOL?
Discuss about changing dataset name in proc.
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
In COBOL programming, what is PERFORM? What is VARYING?
What is the difference between Call and a Link?
A table has two indexes defined. Which one will be used by the SEARCH?
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
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.