PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

Edit Word Ethics

Go down

Edit Word Ethics

Post  maran on Fri Dec 30, 2011 4:23 pm


1) A blank in the edit word is replaced with the digit from the corresponding position of the data field.

2) A zero (0) is used to stop zero suppression. The default is that all leading zeros are suppressed, so by placing a zero somewhere in the edit word, you can control zero suppression. You place the zero in the rightmost position where zero suppression is to take place. Any leading zeros up to and including the position of the corresponding zero in the edit word will be suppressed. If you do not want any leading zeros suppressed, make the edit word larger than the data field and place a zero in the first position of the edit word.

3) An ampersand (&) causes a space in the corresponding position of the edited field.

An asterisk (*) is used for zero suppression just like the zero above, and the same rules apply to it. The added benefit is that an asterisk replaces each suppressed zero.

A dollar sign ($) in the edit word placed immediately to the left of the zero suppression code causes the insertion of a dollar sign in the position to the left of the first significant digit. This is called a floating dollar sign. A fixed dollar sign is a dollar sign that always appears in the first position of the edited field, regardless of the number of significant digits. To create a fixed dollars sign, simply place it in the first position of the edit word.

6) Commas and decimal points placed in the edit word are printed in the edited output in the same relative positions in which they were written unless they are to the left of significant digits. If zero suppression has not been stopped, either spaces or asterisks will replace them, depending upon the method of zero suppression specified. Other than the fixed dollar sign, any characters that precede the first non-zero digit position will always be suppressed.

All other characters used in the edit word are printed if they are to the right of the non-zero digits in the data field. If they are to the left of the first non-zero digit in the data field, spaces or asterisks will replace them. The letters CR or the minus symbol (-) placed on the rightmost position of the edit word (the status component) will be printed if the source value is negative. If the source value is positive, they will be replaced by spaces.

Cool If there are more digit positions in the edit word than there are digits in the field to be edited, leading zeros will be added to the field before editing.

Posts : 442
Join date : 2009-07-24

View user profile

Back to top Go down

Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum