Sign in

docs RPG Reference

Formatting the Expansion of an Edit Word

Formatting the Expansion of an Edit Word

The characters in the expansion portion of an edit word are always used. The expansion cannot contain blanks. If a blank is required in the edited result, specify an ampersand in the body of the edit word.

Constants may be added to appear with any value of the number:

Edit WordSource DataAppears in Edited Result as:
’␢,␢␢0.␢␢&CR&NET’000123-␢␢␢␢1.23␢CR␢NET
’␢,␢␢0.␢␢&CR&NET’000123␢␢␢␢1.23␢␢␢␢NET

Note that the CR in the middle of a word may be detected as a negative field value indication. If a word such as SECRET is required, use the coding in the example below.

Edit WordSource DataAppears in Edited Result as:
‘␢␢0.␢␢&SECRET’12345-123.45␢SECRET
’␢␢0.␢␢&SECRET’12345123.45␢␢␢␢␢ET
’␢␢0.␢␢&CR&&SECRET’12345123.45␢␢␢␢␢SECRET