consider the following two statements
MOVE 10 TO N
PERFORM PARA-X N TIMES
STOP RUN
PARA-X
MOVE 5 TO N
how many times PARA-X willbe exicuted?
a.10
b.5
c.infinate
d.execution error

Answer Posted / pradeep

It will execute only 10 Times only

See Below Code

IDENTIFICATION DIVISION.
PROGRAM-ID. MOVEPGM.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-COUNT PIC 9(2).
PROCEDURE DIVISION.
A1000-MAIN-PARA.
MOVE 10 TO WS-COUNT
PERFORM PARA-X WS-COUNT TIMES.
STOP RUN.
PARA-X.
DISPLAY "TEST1".
MOVE 5 TO WS-COUNT.

Output Looks like this:

COMMAND INPUT ===>
********************************* TOP OF DATA *****
TEST1
TEST1
TEST1
TEST1
TEST1
TEST1
TEST1
TEST1
TEST1
TEST1
******************************** BOTTOM OF DATA ***

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

720


What is rmode(24)

684


What is the difference between comp and comp-3?

704


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

737


Which mode is used to operate the sequential file?

673






How do we get current date from system with century in COBOL?

809


What are the different rules for performing sort operation?

766


If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly

2661


) what is the difference between AID and HANDLE AID?

1637


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.

2014


There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

934


Can we change the password using ALTER? anyone tried and changed?

1552


Name the divisions, which are available in a cobol program?

687


what happens if parmparameter passes zero bytes to the program

1669


write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc

714