COBOL - Continue Statement Last Updated : 24 Mar, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report In simple terms think of the continue statement as a Gatekeeper who will open the gate for the people to come inside the premise to do their task. Similarly continue statement also transfers the control on the next COBOL statement for execution. Syntax: CONTINUE Let's take the example of Continue in Cobol for a better understanding of the concept. Example: Cobol IDENTIFICATION DIVISION. PROGRAM-ID. DEMO1. DATA DIVISION. FILE SECTION. WORKING-STORAGE SECTION. 01 WALLET PIC 9(05) VALUE ZERO. 01 STD-VAL PIC 9(05). 01 COST PIC 9(05). 01 STD-QUANTITY PIC 9(01) VALUE ZERO. PROCEDURE DIVISION. MOVE ZEROES TO WALLET. DISPLAY 'ADD MONEY TO WALLET' ACCEPT STD-VAL DISPLAY 'MONEY ADDED: 'STD-VAL. DISPLAY 'HOW MANY TICKET YOU WANT TO BUY 1 TICKET COST: 250'. ACCEPT STD-QUANTITY COMPUTE WALLET = WALLET + STD-VAL COMPUTE COST = 250 * STD-QUANTITY IF WALLET - COST >= 0 CONTINUE ELSE DISPLAY 'INSUFFICIENT BALANCE' MOVE 16 TO RETURN-CODE GOBACK EXIT END-IF. COMPUTE WALLET = WALLET - COST DISPLAY 'PURCHASE SUCCESSFUL BALANCE LEFT: ' WALLET. STOP-RUN. Explanation: There are 2 scenarios that will happen in the code, which will be governed by the statement IF WALLET - COST >= 0  CONTINUE meaning if the value in the wallet is greater than equal to the purchase it will make a successful transaction and deduct the money from the wallet and if the balance in the wallet is not enough it will exit with return code 16 and message ''INSUFFICIENT BALANCE'. Case 1: Person adds enough money to wallet and makes a purchase. Output: Money deducted In the above example, you can see how the Continue statement moved the flow to make the transaction happen and update the value inside Variable WALLET and the program ends with return code 0. Case 2: Person doesn't add enough money to wallet and make a purchase Output: Money not deducted In this case, the program didn't go through the transaction phase and ended with return code 16 and the message 'INSUFFICIENT BALANCE'. Comment More infoAdvertise with us Next Article COBOL - Copy Statement B bankay55555 Follow Improve Article Tags : COBOL Geeks Premier League Geeks-Premier-League-2022 COBOL-Basics Similar Reads COBOL - Include Statement The INCLUDE statement refers to the file or the directory mentioned after it and inserts the command present inside that member in the pre-compilation state. Basically, it is used to insert a code block onto a source program. Syntax: INCLUDE member-name Where, The member-name refers to the name of t 2 min read COBOL - Copy Statement COPY statement is used to bring into a program a series of prewritten COBOL entries that have been stored in a library. A copy statement inserts the copybook inside a COBOL program, copybook refers to a member which holds all the variables declared inside it. The COPY statement is a library statemen 2 min read Conditional Statements in COBOL While writing a program a programmer needs to check for various conditions, if the condition is true then a particular block of statement/s are executed, or else another block of statement/s is execute. To check these conditions we use Conditional Statements. These statements return either true or f 7 min read Loop Statements in COBOL Every programming language not only has a selection construct but also one that involves iteration. With this construct, it is possible for a block of code to run repeatedly. In fact, the programmer himself can code it in by selecting a specific type of loop. Speaking of types of loops, modern prog 8 min read PL/SQL CONTINUE Statement PL/SQL is a block-structured language that enables developers to combine the power of SQL with procedural statements. All the statements of a block are passed to the Oracle engine all at once which increases processing speed and decreases the traffic. A key component of loop control in PL/SQL is the 4 min read Coding Sheet in COBOL Every language needs an environment or platform to write codes. For example, in Java, we use notepad to write codes then compile them to run. Similarly, COBOL requires a coding sheet to write codes. COBOL is a business-oriented high-level language. It was developed for business, finance, and adminis 7 min read Like