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


Please Help Members By Posting Answers For Below Questions

What are the different types of condition in cobol and write their forms.

656


What the difference is between continue and next sentence?

654


how can i see junk values in dclgen or in hostvariable of comp ?

2543


What are INPUT PROCEDURE and OUTPUT PROCEDURE?

684


What is rmode(any) ?

683






Whats the difference between search & search ALL?

5261


What is redefines clause in COBOL?

846


Discuss about changing dataset name in proc.

758


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

680


What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?

712


In COBOL programming, what is PERFORM? What is VARYING?

670


What is the difference between Call and a Link?

696


A table has two indexes defined. Which one will be used by the SEARCH?

757


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?

1229


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.

5057