Sign in

docs RPG Reference

CR or minus symbol

CR or minus symbol

If the sign in the edited output is plus (+), these positions are blanked out. If the sign in the edited output field is minus (-), these positions remain undisturbed.

The following example adds a negative value indication. The minus sign will print only when the value in the field is negative. A CR symbol fills the same function as a minus sign.

Edit WordSource DataAppears in Edited Result as:
’␢␢␢␢␢␢␢.␢␢-‘000000123-␢␢␢␢␢␢1.23-
’␢␢␢␢␢␢␢.␢␢-‘000000123␢␢␢␢␢␢1.23␢

Constants between the last replaceable character and the - or CR symbol will print only if the field is negative; otherwise, blanks will appear in these positions. Note the use of ampersands to represent blanks:

Edit WordSource DataAppears in Edited Result as:
’␢,␢␢␢,␢␢0.␢␢&30&DAY&CR’000000123-␢␢␢␢␢␢␢␢␢1.23␢30␢DAY␢CR
’␢,␢␢␢,␢␢0.␢␢&30&DAY&CR’000000123␢␢␢␢␢␢␢␢1.23␢␢␢␢␢␢␢␢␢␢