Move Zeroes to I
move 5 to j
perform para1 varying I from 10 by -2 until I = 0
display j.
para1.
Add 5 to j.
What’ll be the value after execution of display stmt.
A) 35
B) 40
C) 30
D) 25
please explain how?
Answer Posted / sudeshna majumdar
Correct answer is c) 30.
The para1 will be performed 6 times where the values of I
will be 10, 8, 6, 4, 2, and 0 respectively.
After each processing of para1, value of J will be
incremented by 5 and value of I will be decremented by 2.
Now, the para1 is called starting from I = 10 and ends when
I = 0. Thus, after 6 time para1 processing,J value will be
5*6 = 30.
| Is This Answer Correct ? | 10 Yes | 4 No |
Post New Answer View All Answers
Which mode is used to operate the sequential file?
HOw can I get the negative sign while deduct high value from low value
what is s000 u4087 error? please give the all error codes in cobol,jcl.
What is amode(24)?
what is search and searchall?what is the diffrence between them?give an best example?
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.
Can you please let me know the centre name of INS certification in Kolkata.
How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.
What is the LINKAGE SECTION used in COBOL?
Differentiate between structured cobol programming and object-oriented cobol programming.
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
What is the Purpose of Pointer in the string?
Difference between cobol and cobol-ii?