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

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

Join the forum, it's quick and easy

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

Get Answers for all your queries on IBM i (AS/400).
PMS Information Systems
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Edit Word Ethics

Go down

Edit Word Ethics Empty Edit Word Ethics

Post  maran Fri Dec 30, 2011 4:23 pm

EDIT WORD (EDTWRD) RULES:

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.

4)
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.

5)
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.

7)
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.
maran
maran
Admin

Posts : 442
Join date : 2009-07-24

https://pmsinformationsystem.forumotion.net

Back to top Go down

Back to top


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