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 / avi
The value of J before the Para call is 5.
Now,the loop executes for 6 times, so 5*6 is added to the
existing value of J.
J=5+(5*6)
=35.
The correct option is 35.
Is This Answer Correct ? | 7 Yes | 12 No |
Post New Answer View All Answers
I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.
input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?
What is cobol?
Why occurs cannot be used in 01 level in COBOL?
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.
Define static linking and dynamic linking.
I have a File that has duplicate records. I need only those records that occur more than thrice.?
What rules are followed by the search verb.
Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.
how do you reference the fixed unblock file formats from cobol programs
Difference between cobol and cobol-ii?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com
how can i see junk values in dclgen or in hostvariable of comp ?
What are literals?