Previous Topic: Predefined Field NamesNext Topic: Numeric Constants


Alphanumeric Literals

When you code a CA Datacom/DB Reporting Facility program, you may need to establish a constant value by coding an alphanumeric literal. An alphanumeric literal can contain any character defined in the Reporting Facility character set.

Enclose all alphanumeric literals within apostrophes. When apostrophes are included as part of the literal, they must be coded in pairs, each pair generating a single value in the resulting literal.

The Reporting Facility automatically calculates the net length of the literal. Literals are no longer than one line of source code. They cannot be continued to another line. For example, the maximum length of a single literal is 70 characters.

The following table illustrates some rules to follow in coding alphanumeric literals:

Coded String

Net Length

Precision

'12345'
'COMPANY''S'
'''DALLAS'''
'''''TEXAS'''''
''''
'DALLAS TEXAS'
'AMOUNT-FIELD'
'009.21-'
'A'
'A B C D E F'
ABC
'DALLAS
DALLAS'

5
9
8
9
1
12
25
7
1
12
**
**
**

12345
COMPANY'S
'DALLAS'
''TEXAS''
'
DALLAS TEXAS
AMOUNT-FIELD
009.21
A
A B C D E F
INVALID
INVALID
INVALID

You can code alphanumeric literals on these commands:

CALL
COMPUTE
CONTROL
DECODE
DEFINE

FILE
FORMAT
GET
GOTO
MOVE

OPTION
PRINT
REPORT
SELECT
SET
USER