Separators
Separators
A separator is a single or group of characters that separates words or strings. The table below shows the separators list -
Separator | Meaning | Description & Example |
---|---|---|
Space | Space is always a delimiter except within quotation marks. For example -
| |
, | Comma | A comma followed by a space is a delimiter to separate two variables. For example -
|
. | Period | Every statement or sentence should end with a separator period(.) in the COBOL program. For example -
|
; | Semicolon | Semicolons may separate clauses and operands within clauses. |
( ) | Left & right parenthesis | These are used as separators in reference modification, arithmetic expressions, and conditions. These two parameters always code together. For example -
|
: | Colon | Uses in reference modification and COPY statement with REPLACING. For example -
|
" | Quotation mark | They delimit non-numeric literals, except when the literal is continued in more than one line. One quotation should always end with the same quotation. For example -
|
' | Apostrophe | They delimit non-numeric literals, except when the literal is continued in more than one line. One apostrophe should always end with the same apostrophe. For example -
|
== | Pseudo-text delimiter | It uses to replace the string with a COPY statement. For example -
|
Note!
- Single space or multiple spaces can be used anywhere as a separator.
- The separators can use as – Space {b}, Period {.b}, Comma {,b}, Semicolon {;b}, Parentheses { ( } ... { ) }, Colon { : }, Quotation marks {"} ... {"}, Apostrophes {'} ... {'} and Pseudo-text delimiters {b==} ... {==b}. b represents the blank or space.