The Constant_name Statement: Rules and Syntax - mfx - 3.1

Syncsort™ MFX Programmers Guide

Product type
Software
Portfolio
Integrate
Product family
Syncsort™ Software
Product
Syncsort™ MFX > MFX
Version
3.1
Language
English
ContentType
Programmer’s Guide
Product name
Syncsort™ MFX
Title
Syncsort™ MFX Programmers Guide
Topic type
How Do I
Copyright
2024
First publish date
2010
ft:lastEdition
2024-08-27
ft:lastPublication
2024-08-27T08:14:56.318001

The format of the constant_name statement is illustrated below.

Figure 1. Constant_name Statement Format

The value of a constant may be a character string, a decimal number, a hexadecimal string, a bit string, a two-digit year date string, or a system symbol string.

A constant_name representing a specific value can be used whenever it is valid on an MFX control statement. Note that the length and format must be compatible with the usage on the control statement.

The table starting on the next page describes the types of constant values.

Table 1. Types of Constant Values

 Value Type

 Description

 Valid Examples

 Invalid Examples

Character string

Valid formats:  

'xx...x'  

C'xx...x'  

nC'xx...x'  

c'xx...x'  

nc'xx...x'

where x is an EBCDIC character and n is a repetition factor for the string. The maximum length for n is 4095. The maxi­mum length of the string is 64 characters.

To include a single apostrophe (') in a character string, use two single apostrophes (''), which count as 2 characters.

'+0.245'

c'BOOK'

C'O''DOOLE' 

C'CITY''

(unnecessary extra apostrophe after Y)  

c'city

(missing ending apostrophe)

Decimal number

Valid formats: 

 n  

+n  

-n

Maximum length is 31 significant digits. Decimal points are invalid.

+100

100

-500

00049 

++100

(too many plus signs)

500-

(minus sign in wrong place)

5.5

(decimal point not allowed)

Hexadecimal string

Valid formats:

  X'yy...yy' 

 nX’yy...yy’  

x'yy...yy' 

 nx’yy...yy’

where yy represents any pair of hexadecimal digits and n is a repetition factor. The maximum value for n is 4095. The maxi­mum length of the string is 32 pairs of hexadecimal digits. Hexadecimal digit are 0-9, A-F, or a-f.

X'F1C5'

x'3fb91e'

X'06'

X'F1H5'

(H is not a valid hexadecimal digit)

x'cf2'

(unpaired hexadecimal digit 2)

Bit string

Valid formats: 

 B'bbbbbbbb...bbbbbbbb'  

b'bbbbbbbb...bbbbbbbb'.

Each group of 8 bs represents the 8 bits that compose one byte. Maximum length is 8 groups of 8 bits each. A bit is a 1, 0 or . (period). Must be a multiple of 8 bits.

b'11110000'

B'11...0000'

b'01101111' 

b'0011'

(only 4 bits, 8 needed)

b''

(no bits specified)

B'00001112'

(invalid bit value 2)

Two-digit year date string

Valid formats: 

 Y'LOW'  

Y'HIGH'  

Y'BLANKS'  

Y'x...x'  

Y'DATE1'  

Y'DATE2'  

Y'DATE3'  

y'LOW'  

y'HIGH'  

y'BLANKS'  

y'x...x'  

y'DATE1'  

y'DATE2'  

y'DATE3'

where x...x represents 2 to 6 decimal digits.

Y'HIGH'

Y'LOW'

Y'980731'

Y'012' 

Y'1'

(fewer than 2 digits)

Y' '

(blank is not a valid digit)

Y'1234567'

(more than 6 digits)

Y'BLANK'

(should be 'BLANKS')

System Symbol

Valid formats:  

S'&xx...xx'  

s'&xx...xx'

where x...x represents the system symbol all in uppercase.

S'&YYMMDD'

s'&SYSNAME'

s'&JOBNAME'

S'&SYSPLEX'

S'&hhmmss'

(not in uppercase)