Summary -

In this topic, we described about the below sections -

Sequence programming construction involves in making the program execution in sequence. In sequence programming construction, the statements executed one by one in the order how they coded.

Single line executable statements are the part of Sequence programming construction. The below statements are part of the sequence programming construction –

Basic Statements: -

Statements Description
ACCEPT Accepts the data or system date-related information during the program execution.
CALL Transfers the control from one object program to another object program to complete a task.
CANCEL Ensures the specified subprogram is entered in initial state for the next time call.
COMPUTE Used to calculate the result of arithmetic expressions and assigns the output to one or more data items.
CONTINUE Transfers the control to the immediate COBOL statement comes next in the program flow.
DISPLAY Transfers the contents of operand to the output device.
EXAMINE EXAMINE and INSPECT are used for same purpose.
EXIT Provides end-point for a procedure/paragraph.
EXIT PROGRAM Specifies the end of currently executing program and returns control to the calling program.
GO BACK Gives the control back from where it received.
INITIALIZE Sets the data items to the predefined values based on the data types.
INSPECT Examines characters or groups of characters in a data item.
MOVE Used to assign a value to one or more variables from another variable or literal.
SEARCH Searches a table for an element specified in the condition.
SET Used to perform below operations -
  • Initializing the indexes of the table.
  • Incrementing or decrementing an occurrence number.
  • Setting the status of an external switch to ON or OFF.
  • Moving data to condition names to make conditions true.
STOP Halts execution of the program either permanently or temporarily.
STRING Concatenates the partial or complete contents of two or more data items or literals into one single data item.
UNSTRING Causes contiguous data in a sending field to be separated and placed into multiple receiving fields.

Arithmetic Statements: -

Statements Description
ADD Sums two or more numeric operands.
DIVIDE Divides one numeric data item into or by others.
MULTIPLY Multiplies numeric items and sets the result values.
SUBTRACT Subtracts one numeric item or the sum of two or more numeric items from one or more numeric items.

File Handling Statements: -

Statements Description
CLOSE Terminates the processing of volumes and files.
DELETE Removes a record from an indexed or relative file.
MERGE Combines two or more identically sequenced files based on one or more keys and creates an output file with records available in merged order.
OPEN Initiates the processing of files.
READ Used to read the records from the file.
READ NEXT Used to read the next records from the current reading position of the file.
READ PREVIOUS Used to read the previous records from the current reading position of the file.
RELEASE Transfers records from an input/output area to the sorting operation initial phase.
REWRITE Used to update the records that are already existed in the file.
SORT Takes records from one or more files, sorts them according to the provided keys and makes the sorted records available either through an output procedure or in an output file.
START Used to set the file pointer to read the next record.
WRITE Used to write a record to the file.