Figurative constants, such as HIGH-VALUE, ZERO, and SPACE, cannot be used in SQL statements.This chapter provides the basic information you need to write a ProCOBOL program, including.This section deals with embedded SQL syntax, coding conventions, and ProCOBOL-specific features and restrictions.
You can use the standard COBOL abbreviations, such as PIC for PICTURE IS and COMP for USAGE IS COMPUTATIONAL. ProCOBOL precompiler options and values as well as all EXEC SQL statements, inline commands, and COBOL statements are case-insensitive. For more information, see your Oracle8 system-specific documentation. Cobol Write Statement Code EXEC SQLYou must code EXEC SQL and EXEC ORACLE statements in columns 12 through 72 (columns 73 through 80 are ignored). If you specify FORMATANSI (default), columns 1 through 6 can contain an optional sequence number, and column 7 indicates comments or continuation lines. Division headers, section headers, paragraph names, FD and 01 statements begin in columns 8 through 11 (area A). If you specify FORMATTERMINAL, columns 1 through 6 are omitted, making column 7 the left-most column. In SQL, you must use commas to separate list items, as the following example shows. ![]() For example, the following two statements are equivalent. You can also place ANSI SQL-style Comments (--.) within SQL statements at the end of a line (but not after the last line of the SQL statement), and you can place C-style Comments (. SQL statements. However, you cannot nest Comments or place them on the last line of a SQL statement after the terminator END-EXEC. You can continue SQL statements from one line to the next, according to the rules of COBOL, as this example shows. To continue a string literal from one line to the next, code the literal through column 72. ![]() The LITDELIM option specifies the delimiters for COBOL string constants and literals. If you specify LITDELIMAPOST, the ProCOBOL uses apostrophes when generating COBOL code. If you specify LITDELIMQUOTE (default), quotation marks are used, as in. In SQL statements, you must use quotation marks to delimit identifiers containing special or lowercase characters, as in. Regardless of which delimiter is used in the ProCOBOL source file, ProCOBOL generates the delimiter specified by the LITDELIM value. To use a SQL statement in your ProCOBOL program, precede the SQL statement with the EXEC SQL clause, and end the statement with the END-EXEC keyword. Embedded SQL syntax is described in the Oracle8 Server SQL Reference.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |