Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Wat is the difference between NEXT and CONTINUE statement in
cobol,can any one explain with example.

Answer Posted / rajasekhar

.NEXT Sentence is used to skip the statements and the control will move after the period operator.
.CONTINUE is statement in which the control is move to after scope terminator.
Example:

ws section
01 A PIC 99 VALUE 2
O1 B PIC 99 VALUE 2
01 C PIC 99 VALUE 3
01 D PIC 99 VALUE 3
01 E PIC XXXXX VALUE HAI
01 F PIC XXXXX VALUE HELLO
01 G PIC X(3) VALUE HAI
01 H PIC X(5) VALUE HELLO
PROCEDURE DIVISION
IF A = B
IF C = D
NEXT SENTENCE
DISPLAY 'NOT EQUAL'
END-IF.
DISPLAY 'EQUAL'
END-IF.
IF E = G
IF F = H
CONTINUE
DISPLAY 'STRINGS ARE NOT EQUAL'
END-IF.
DISPLAY 'STRINGS ARE EQUAL'
END-IF.
STOP RUN.

OUTPUT:-
EQUAL
STRINGS ARE EQUAL.

Is This Answer Correct ?    8 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

3263


how do you reference the rrds file formats from cobol programs

1581


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

2550


If you are current on the owner of a set, what is the difference between obtain next and obtain first?

1348


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

3164


In COBOL, what is the different between index and subscript?

1245


i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this

1540


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

1381


Give some examples of command terminators?

1262


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

1328


Are you comfortable in cobol or jcl?

1049


What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?

1127


Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.

2147


What are all the divisions of a COBOL program?

1219


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

1242