public class Field extends Object
_________________________________________________________________________ | Table 47. Field Format Word Format | |____________ ___________________________________________________________| | Bit 0-1 | 01 - FFW identification flag | 0x8000 0x4000 |____________|___________________________________________________________| | Bit 2 | Bypass | 0x2000 | | | | | 0 = This is not a bypass field | | | | | | 1 = This is a bypass field | |____________|___________________________________________________________| | Bit 3 | Dup or Field Mark Enable | 0x1000 | | | | | 0 = Duplication or Field Mark is not allowed in this | | | field | | | | | | 1 = Duplication or Field Mark is allowed in this field | |____________|___________________________________________________________| | Bit 4 | Modified Data Tag (MDT) | 0x0800 | | | | | 0 = This field has not been modified | | | | | | 1 = This field has been modified | |____________|___________________________________________________________| | Bit 5-7 | Field Shift/Edit Specification | 0x0400 0x0200 0x0100 | | | | | 000 = Alpha shift | | | | | | 001 = Alpha only | | | | | | 010 = Numeric shift | | | | | | 011 = Numeric only | | | | | | 100 = Katakana shift | | | | | | 101 = Digits only | | | | | | 110 = I/O-(feature input field) | | | | | | 111 = Signed numeric | |____________|___________________________________________________________| | Bit 8 | Auto Enter | 0x0080 | | | | | 0 = No auto enter | | | | | | 1 = Auto enter when field is exited | |____________|___________________________________________________________| | Bit 9 | Field Exit Required (FER) | 0x0040 | | | | | 0 = Field Exit key is not required | | | | | | 1 = Field Exit key is required | |____________|___________________________________________________________| | Bit 10 | Monocase | 0x0020 | | | | | 0 = Accept lower case letters | | | | | | 1 = Translate operator keyed letters to uppercase | |____________|___________________________________________________________| | Bit 11 | Reserved | 0x0010 |____________|___________________________________________________________| | Bit 12 | Mandatory Enter (ME) | 0x0008 | | | | | 0 = Not mandatory enter field | | | | | | 1 = Mandatory enter field | |____________|___________________________________________________________| | Bit 13-15 | Right Adjust/Mandatory Fill (MF) | 0x0004 0x0002 0x0001 | | | | | 000 = No adjust specified | | | | | | 001 = Reserved | | | | | | 010 = Reserved | | | | | | 011 = Reserved | | | | | | 100 = Reserved | | | | | | 101 = Right adjust, zero fill | | | | | | 110 = Right adjust, blank fill | | | | | | 111 = Mandatory fill | | | | | | | |____________|___________________________________________________________| | Notes: | | | | 1. The 5494 does not check FFW data for validity. | | | | 2. The AS/400 system can write anything to any location on screen, | | regardless of FFW data in the format table. | | | | 3. The AS/400 system can set the MDT bit of a particular field by | | placing an FFW at the proper place in the data stream. | | | | 4. Make sure that all bits marked as reserved are set to 0. | |________________________________________________________________________|Fields: Table 48 identifies the field formats that the 5494 supports. Selection of specific field formats is controlled by the FFW. The information in parentheses immediately following the name of each field format identifies the bit position of the corresponding software flag in the FFW. See Table 109 in topic 5494 16.2.1 for descriptions of FFW formats.
______________________________________________________________________________________________ | Table 48. Available Field Formats | |______________________ ______________________________________________________________________| | Format of Field | Description | |______________________|______________________________________________________________________| | Alphabetic only | Accepts only characters A--Z (both uppercase and lowercase plus the | | | comma (,), period (.), dash (-), and blank characters). Other | | (bits 5-7 = 001) | characters cause operator errors. Some special characters for World | | | Trade countries are also acceptable. | |______________________|______________________________________________________________________| | Alphabetic shift | Accepts all characters, and the Shift keys are acknowledged. | | | | | (bits 5-7 = 000) | | |______________________|______________________________________________________________________| | Auto enter (bit 8) | The contents of all fields, including the modified READ MDT fields, | | | are sent to the AS/400 system. The operator begins by pressing one | | | of the field exit keys or by entering the last character in last | | | required field. | |______________________|______________________________________________________________________| | Bypass (bit 2) | Entries are not allowed in this field. If the workstation operator | | | tries to enter something into this field, an error results. | |______________________|______________________________________________________________________| | Dup enable (bit 3) | The 5494 repeats X'1C' from the cursor position to the end of the | | | field when the workstation operator presses the Dup key; this | | | displays on the workscreen as an overstruck asterisk. | |______________________|______________________________________________________________________| | Field exit required | Requires the workstation operator to exit the field with a nondata | | (bit 9) | key. When the operator has entered the last character, the cursor | | | remains under the character and blinks, indicating that a Field Exit | | | key is required. | |______________________|______________________________________________________________________| | I/O (bits 5-7 = 110) | Only a magnetic stripe reader or selector light pen can enter data | | | into an I/O field without causing an error. | |______________________|______________________________________________________________________| | Katakana shift | This is the same as the alphabetic shift except that the keyboard is | | | Katakana and is placed in Katakana shift. | | (bits 5-7 = 100) | | |______________________|______________________________________________________________________| | Mandatory enter (MD) | Requires the workstation operator to enter something in the file | | | before the 5494 allows the Enter key to be active. The 5494 | | (bit 12) | recognizes the state of these fields by checking the MDT bit for the | | | field. If the workstation operator tries to bypass the field using | | | a Field +, Field -, or Field Exit key, an error occurs. | |______________________|______________________________________________________________________| | Digits only (bits | Allows digits 0-9 only from keyboard. Also allows the Dup key if | | 5-7 = 101) | the Dup enabled bit is in the FFW. | |______________________|______________________________________________________________________| | Mandatory fill (MF) | If the operator enters any character into this type of field, the | | | field must be completely filled before exiting. Any attempt to | | (bits 13-15 = 111) | leave an unfilled field causes an error. The workstation operator | | | can use the Dup key to fill the field. If the field is nulled when | | | the workstation operator exits from the first position using the | | | Field Exit or Erase Input key and the MDT bit is on, the null | | | characters can be sent back to the AS/400 system in response to a | | | READ command. | |______________________|______________________________________________________________________| | Monocase (bit 10) | Regardless of the shift state, the keyboard enters only the | | | uppercase characters A-Z in the field. In addition, the following | | | characters on the specified World Trade typewriter keyboard are | | | translated to uppercase: | | | | | | Austria/Germany ü ä ö | | | Brazil ã ç é õ | | | Denmark å æ ø | | | Finland å ä ö é | | | Norway å æ ø | | | Portugal ã ç õ | | | Spain ñ | | | Spanish-speaking ñ | | | Sweden å ä é ö | | | | | | For the remaining World Trade typewriter-like and all data-entry | | | keyboards, the lowercase special characters are keyed and displayed | | | as lowercase. | |______________________|______________________________________________________________________| | No adjust (bits | Accepts characters without either position adjustment or insertion | | 13-15=000) | of fill characters. | |______________________|______________________________________________________________________| | Numeric only | Accepts only the 0-9, plus (+), comma (,), period (.), and blank | | | ( ) characters. Any other character causes an operator error. The | | (bits 5-7 = 011) | unit position carries the sign digit for the field. Use either the | | | Field +, the Field -, or the Field Exit key to exit this field. If | | | you use the Field - key to exit the field, the 5494 changes the zone | | | of the low-order digit to X'D', unless it is one of the symbols (+, | | | -, . or blank); in this case, an error results. | |______________________|______________________________________________________________________| | Numeric shift | Accepts all characters. | | | | | (bits 5-7 = 010) | | |______________________|______________________________________________________________________| | Right adjust | Fills all leftmost unoccupied positions of a field with the | | | specified character; characters are right-adjust and spaces are | | (byte 2, bits 13-15: | blank-filled or zero-filled. The operator must specify this as | | | either blank or 0. The fill character appears on the workstation | | ° 101 = blank fill | screen. | | ° 110 = zero fill) | | |______________________|______________________________________________________________________| | Signed numeric | Allows only characters 0-9. An attempt to enter any other character | | | causes an error. The signed numeric field must be at least 2 bytes | | (bits 5-7 = 111) | long. The last (rightmost) position is reserved for the sign | | | display (- for negative and blank for positive). You cannot type | | | characters into this position. To exit this field, use either the | | | Field +, the Field -, or the Field Exit key. If you use the Field - | | | key to exit this field, the 5494 right-adjusts the field and inserts | | | a negative sign in the rightmost position. If you use Field +, the | | | 5494 right-adjusts the field and inserts a blank in the rightmost | | | position. | | | | | | If the last character is negative, the zone of the low-order digit | | | is set to X'D' before the character is sent to the AS/400 system. | | | If the last character is positive, the low-order digit is not | | | changed. The last sign position is not sent to the AS/400 system in | | | response to either the READ MDT or READ INPUT commands. | |______________________|______________________________________________________________________|
Table 49 lists all valid FCWs and their corresponding functions.
___________________________________________________________________________________ | Table 49. Field Control Words | |____________________ ______________________________________________________________| | FCW Value | Function | |____________________|______________________________________________________________| | X'80nn' | Entry field resequencing. The nn specifies the next entry | | | field in the sequence (X'00' to X'80'). | |____________________|______________________________________________________________| | X'8101' | Magnetic stripe reader entry field | |____________________|______________________________________________________________| | X'8102' | Selector light pen or cursor select field | |____________________|______________________________________________________________| | X'8103' | Magnetic stripe reader and selector light pen entry field | |____________________|______________________________________________________________| | X'8106' | Selector light pen and selectable attention entry field | |____________________|______________________________________________________________| | X'8200' | Ideographic-only entry field | |____________________|______________________________________________________________| | X'8220' | Ideographic data type entry field | |____________________|______________________________________________________________| | X'8240' | Ideographic-either entry field | |____________________|______________________________________________________________| | X'8280' or | Ideographic-open entry field | | | | | X'82C0' | | |____________________|______________________________________________________________| | X'84nn' | Transparency entry field. The nn can be any two digits. | |____________________|______________________________________________________________| | X'8501' | Forward edge trigger entry field | |____________________|______________________________________________________________| | X'8601'-X'8603' | Continued entry field | |____________________|______________________________________________________________| | X'8680' | Word Wrap entry field | |____________________|______________________________________________________________| | X'88nn' | Cursor progression entry field. The nn is the next entry | | | field in the specified application cursor progression | | | sequence. | |____________________|______________________________________________________________| | X'89nn' | Highlighted entry field. The nn specifies the field | | | attribute | |____________________|______________________________________________________________| | X'8Ann' | Pointer device selection entry field. If a user selects the | | | entry field, the nn specifies the AID to be returned. | |____________________|______________________________________________________________| | X'B140' | Self-check modulus 11 entry field | |____________________|______________________________________________________________| | X'B1A0' | Self-check modulus 10 entry field | |____________________|______________________________________________________________|The first FCW of any type is used. Subsequent FCWs of the same type are ignored. The 5494 does not check to determine if the FCWs are formatted correctly or if the requested function is installed. The 5494 can detect and report these errors to the AS/400 system if the FCW is required during subsequent command and keystroke processing.
Resequencing: Resequencing allows the 5494 to send the input fields to the AS/400 system in any specified order. Resequencing is accomplished by chaining input fields together with FCWs that specify the desired order of transmission. The format of the resequencing FCW is as follows:
________ ________________________________________________________________ | Bits | Description | |_______|________________________________________________________________| | 0-1 | B'10' | |_______|________________________________________________________________| | 2-7 | B'000000' | |_______|________________________________________________________________| | 8-15 | The normal sequence position of the next field to be returned | | | to the AS/400 system. (The first field on the screen is | | | number 1; the field numbers progress sequentially, left to | | | right and top to bottom.) | |_______|________________________________________________________________|Bit 3 of the SOH order contains the number of the field to be sent. If the first field identifier in the SOH is set to 0, resequencing does not occur (that is, all resequencing FCWs are ignored; fields are sent to the AS/400 system in the order defined in the format table). If resequencing does occur, the last field to be sent to the AS/400 system must contain the following FCW:
___________ _____________________________________________________________ | Bits | Description | |__________|_____________________________________________________________| | 0-1 | B'10' | |__________|_____________________________________________________________| | 2-7 | B'000000' | |__________|_____________________________________________________________| | 8-15 | B'11111111' | |__________|_____________________________________________________________|
Notes:
Selector Light Pen: The selector light pen is a pen-like device that permits the operator to select fields of data from the display screen for system input. The ease with which the operator can select and designate the correct light pen field is affected by the format, content, intensity, and spacing of the light pen fields upon the screen. The following requirements must be met when specifying a field for the selector light pen:
@?b*bxx...x@
The characters in this field are:
@
The leading attribute should be high intensity. The trailing attribute should be
normal intensity. See Table 51 in topic 15.6.12.3 for a list of field attributes.
?
A designator character (?) in the first position of the field indicates field selection
or reselection. This character should change from ? to & after selection and back to
? after reselection.
b
A blank should separate the designator character from the rest of the field.
*
A target character (*) may be inserted into the field format. This character enhances
the pen's ability to detect the field. The pen should be aimed at this target character
during the selection process.
xx...x
These character combinations indicate a variable length name or description of the selectable
field. The name should be at least 2 characters long.
Ideographic Fields: For information on the ideographic fields, see Appendix A, "Ideographic Enhancements."
Transparency: A transparency entry defines a field that can contain data of any value. The 5494 does not format field data during reprocessing.
Forward Edge Trigger: Forward edge trigger has the same function as the auto enter specified in the field format word. With this FCW, however, the 5494 returns a unique forward edge trigger AID code to the AS/400 system when this field is exited.
Self-Check: The self-check function on the 5494 provides additional integrity for the data entry. All field types can be specified for self-checking. The following requirements must be met when specifying a field for self-checking:
X'B1A0' selects Modulus 10 checking.
X'B140' selects Modulus 11 checking.
Self-check resolves fields and conditions in the following ways:
A in EBCDIC is C1; therefore A = 1.
R in EBCDIC is D9; therefore R = 9.
All other characters with the 4 low-order bits in the range of X'A' through 'F' are replaced by 0. For example: % is EBCDIC 6C; therefore % = 0.
Null and blank characters are also converted to 0. All high-order nulls, zeros, and blanks in a field are converted to 0 and do not affect the value of the check number.
Continued Entry Fields: Continued entry fields are a set of associated entry fields that are treated by the 5494 as a single entry field during field data entry and editing.
A continued entry field enables a multiple row entry field to be defined inside of a window. Figure 20 shows how the continued entry fields format can improve screen appearance and use.
______________________________________________________________________________ | | | Enter Text . . . ________________________________________ | | ________________________________________ | | ________________________________________ | | ________________________________________ | | |Continued entry fields are defined by Continued Entry Field FCWs, (X'8601'-X'8603'). Continued entry fields can also define edit mask entry fields.
Bits 0-5 of byte number 2 of the Continued Entry Field FCW are reserved and must be set to zero. For bits 6-7 of byte number 2 of the Continued Entry Field FCW, specify:
B'00'
Invalid (causes a negative response)
B'01'
Specifies the first continued field segment
B'10'
Specifies the last continued field segment
B'11'
Specifies the middle continued field segment (all continued entry fields have
this value specified here).
As with other entry fields, continued entry fields are defined from the top down and from left to right in the data stream, based on the position of the first continued entry field segment. All subsequent continued entry field segments must follow one another consecutively until the last field segment is specified. These segments are also defined from the top down and from left to right. After you complete this task, other continued entry fields (and other entry fields) can be defined.
Continued entry fields are specified in a specific sequence. Consider the following rules when specifying continued entry fields:
Each continued entry field is presented in the same manner as other entry fields. The 5494 creates all continued entry field segments so that they have the same input field characteristics (FFW and optional FCWs). The FFW of the first segment is used for all subsequent segments. However, all segments must have a valid FFW.
If the first control character (on a WRITE TO DISPLAY command or on a PENDING READ command) specifies that modified fields are to be nulled, all segments of a continued entry field will be nulled if any segment has been modified (the MDT is set on).
FCWs may be used in only the first continued entry field definition (with the exception of the continued entry field FCWs associated with each field segment).
The 5494 sends a negative response if field resequencing is defined for the screen display or the first continued entry field segment is defined as:
The 5494 also supports ideographic (double byte character set) continued entry fields. The 5494 automatically writes Shift-Out and Shift-In characters on each segment when the field is created (Start Field order). It is recommended that the host write data to an ideographic continued entry field with a WRITE DATA structured field command. (See "WRITE DATA Structured Field" in topic 15.6.13.9 for more information.)
The 5494 handles each field of the continued entry field set as a single entry field. If any of the following type of data is entered or one of the following keys is pressed, the 5494 processes the continued entry field as follows:
Character data
In replace mode, there is no unique character data for processing.
When character data is entered in the last character position of the first or middle segment of the continued entry field set, the cursor moves to the first character position of the next segment in the set. When character data is entered in the last character position of the last segment of the continued entry field set, forward field exit processing is started. See the Field Advance description.
Insert Mode
If the display is in insert mode when a character data key is pressed, the 5494 responds
as follows:
Delete
If the Delete key is pressed within a continued entry field, the 5494 responds as follows:
Field Exit
If the Field Exit key is pressed within a continued entry field, the 5494 responds as follows:
Field Plus
The 5494 processes this key the same way it processes the Field Exit key.
Field Minus
This key is not valid. If it is used, an error message is displayed.
Field Advance
The Field Advance key starts forward field exit processing.
Field Backspace
The Field Backspace key starts backward field exit processing. When backward field exit processing occurs, the cursor moves to the previous non-bypass field. The previous non-bypass field is determined by exiting the first continued entry field segment (which is independent of the segment containing the cursor).
Duplicate (Dup) Key
All characters within the continued entry field set following the current cursor location
are set to the Dup character.
Forward Field Exit Processing
If a continued entry field set is specified as either automatic enter or forward-edge trigger,
automatic enter or forward-edge trigger processing is started for the last position of the last
field segment.
If cursor progression is specified on the first continued entry field segment, the cursor moves to the cursor progression target field whenever you exit any of the continued entry field segments. Otherwise, the cursor returns to the next non-bypass field when the Field Advance Exit key is pressed (which skips over subsequent field segments of the continued entry field). The next non-bypass field is determined by exiting the first continued entry field segment (which is independent of the segment containing the cursor).
The continued entry field is treated as a single input field. If the AS/400 system sets the MDT flag in the first continued entry field segment, or if the user has modified any continued entry field segment, the MDT flags of all continued entry field segments that make up the continued entry field are set. Therefore, data from the entire continued entry field set is to be sent inbound in response to the READ MDT command. There are no delimiters (SBA orders) separating the data from each of the continued entry field segments. In response to the READ MDT command, trailing null characters are not returned after the last non-null character in the field data set.
For inbound data from an ideographic continued entry field, the 5494 removes extra Shift-Out characters (which start each middle and last segment) and Shift-In characters (which end each first and middle segment). For a READ MDT command from an Ideographic Only or Ideographic Either entry field, the 5494 removes trailing nulls before the last Shift-In. For a READ INPUT command, the inbound data must be the exact length of the entry field; therefore, the 5494 pads the inbound data with trailing nulls as required. These padded nulls should be removed by the host before writing the field data back to the field using the WRITE DATA structured field.
Edit Mask Entry Field: An edit mask entry field can be created by defining a continued field segment for each input-capable part of the edit mask field. For example, Figure 21 shows two edit mask entry fields.
______________________________________________________________________________ | | | Telephone Number . . . (800)555-1212 | | Social Security Number . . - - | | |
In Figure 21, the three hyphens (-) and the parentheses ( ) are protected positions. The fields from this figure are defined as follows:
Notes:
Word Wrap Entry Fields: Entry fields may have word wrap specified. Word wrap prevents words from splitting between lines of a field that span lines, or between segments of a continued entry field. Word wrap makes viewing of field data easier because words are not partly on one line or field segment, and partly on the next.
In order to prevent usability problems, the following recommendations should be followed:
Word Wrap Entry Fields--Host Interface: Word wrap is defined by the word wrap FCW (X'8680').
To write data to a word wrap field, the Write Data Structured Field order must be used, or an equivalent algorithm implemented in the host (see "WRITE DATA Structured Field" in topic 15.6.13.9 for details). The Write Data Structured Field order ensures that words are not split between two segments or lines of word wrap fields. If all the data in the Write Data Structured Field order cannot fit within a word wrap field without splitting words, the word wrap function for that field is not used, and the data is rewritten as if word wrap had not been specified. Note that word wrap could be used again if the user were to change the field data such that the data would fit using word wrap (for example, the user deletes some characters).
If word wrap is specified for an entry field that is contained on a single line, word wrap is allowed. Editing behavior operates as described below, except that words are never spilled.
Word wrap is ignored for ideographic only fields, ideographic pure fields, and ideographic either fields (with double byte). In ideographic open fields, word wrap only applies to the single byte data.
The 5494 will return a negative response if a word wrap field is defined along with any of the following field types or features:
For an ideographic open field with word wrap specified that spans lines, each portion of the field on each line must be at least 4 bytes long.
The keyboard functions within the word wrap field are described as follows:
Replacing Data
In replace mode, a character may cause two words to become one (if a non-blank
replaces a blank between two non-blank words), or it may extend a word (by adding to
the end of it). In these cases, if the new character causes a word to be split between
two lines or segments, the newly formed word is inserted into the next line or segment.
The space vacated on the first line or segment is filled with nulls. If data will no
longer fit into a word wrap field as a result of words spilling, the field data is
rewritten to the field as if word wrap were not specified. Note that word wrap could be
used again if the user were to change the field data such that the data would fit using
word wrap (for example, the user deletes some characters).
Inserting Data
In insert mode, a character may also cause words to no longer fit on lines or segments.
In this case, any non-fitting word is spilled to the following line. During this process,
imbedded nulls may be removed. If the data will not fit back into the field, the data is
written as without word wrap in effect. Note that word wrap could be used again if the
user were to change the field data such that the data would fit using word wrap. If the
data still will not fit back into the field, operator error 0012 is posted.
Deleting Data
Imbedded nulls may be removed as a result of the Delete key.
Erase End of Field
In addition to its normal processing, this key causes the data in word wrap fields
to be reformatted. For example, if a word at the start of a segment is shortened by this
process, it may fit in the previous segment. Additionally, if word wrap had been turned
off because the entry field was full, the removal of data may allow word wrap to be turned
on again.
Field Exit
Same processing as Erase End of Field
Field Plus
Same processing as Erase End of Field
Reverse Key
The Reverse key is not allowed in word wrap fields. Operator error 0091 is posted.
ASD Processing
For Arabic and Farsi, Automatic Shape Determination precludes the word wrap function.
Word wrapping will not occur when the cursor direction is right-to-left for these languages.
Word Wrap Fields--Inbound Field Data: The 5494 removes all single byte nulls from the inbound data. If the entry field is a right-to-left entry field, data is returned starting at the right-most position.
Note: Write Data command processing into a right-to-left entry field is consistent with inbound data from a right-to-left Word Wrap field; the AS/400 system does not need to reverse the entry field data.
Cursor Progression Entry Field: Cursor Progression fields are defined by the Cursor Progression FCW (X'88nn'), where X'nn' specifies the cursor progression field. It is the number of the entry field to which the cursor will be moved when a forward field exit occurs. Remember that all entry fields on the display are presented from top to bottom and left to right for each new row, which starts at field number 1 (including bypass entry fields).
Continued entry fields and selection entry fields count as a single field. Scroll bar fields are not counted.
If you have defined a display to use read resequencing (defined in the SOH order), the 5494 ignores cursor progression FCWs. Read resequencing and cursor progression cannot be used together on the same display screen. The 5494 ignores the cursor progression field number X'00' and any field number of an undefined field.
If a backward field exit occurs within a non-bypass entry field, and the display screen contains cursor progression fields, the 5494 will scan for a cursor progression FCW that is targeting the entry field or selection field that is being exited. If a cursor progression FCW is found, the cursor is moved to the entry field associated with it.
Highlighted Entry Field: Highlighted entry fields are defined by a X'8900'-X'89FF' FCW.
When the cursor is in a highlighted field, the leading field attribute is changed to the specified attribute. The field can be any type of entry field. Continued entry fields can be defined as highlighted fields (the highlighted FCW is sent only on the first segment); and the 5494 will replace each leading segment field attribute with the specified attribute when the cursor enters any of the segments.
Table 50 defines the bytes of the highlighted entry field FCW (X'8900'-X'89FF').
_________________________________________________________________________ | Table 50. Definitions for the Highlighted Entry Field FCW | | (X'8900'-X'89FF') | |_______ _______ _______ ________________________________________________| | Byte | Field | Value | Description | |_______|_______|_______|________________________________________________| | Byte | | X'89' | | | 1 | | | | |_______|_______|_______|________________________________________________| | Byte | Bits | B'00' | Applies to both monochrome and color displays. | | 2 | 0-1 |_______|________________________________________________| | | | B'01' | Applies to monochrome displays only. The 5494 | | | | | ignores the FCW on a color display. If a | | | | | different hex attribute on monochrome or color | | | | | displays is desired, two highlighting FCWs can | | | | | be sent. | | | |_______|________________________________________________| | | | B'10' | Applies to color displays only. The 5494 | | | | | ignores the FCW on a monochrome display. | | | |_______|________________________________________________| | | | B'11' | Reserved. FCW is ignored. | |_______|_______|_______|________________________________________________| | Byte | Bit 2 | B'0' | The text cursor is visible within the field. | | 2 | |_______|________________________________________________| | | | B'1' | The text cursor is invisible when it enters | | | | | the field. The field must be an I/O field | | | | | (with no MSR, LP, or I/O attention FCW). | |_______|_______|_______|________________________________________________| | Byte | Bits | | Defines the lower five bits of the attribute | | 2 | 3-7 | | to be used when the cursor enters the field, | | | | | (X'00'-X'1F'). The 5494 will specify the OR | | | | | operand with X'20' to produce the proper | | | | | attributes. | |_______|_______|_______|________________________________________________|Notes:
Mouse Selection Entry Field: Mouse selection fields are defined by a X'8Ann' FCW where nn is the AID to be returned in the inbound data when a user selects this non-bypass field. The AID value should be a currently defined AID or be between the values X'70'--X'7F'. See Table 109 in topic 16.2.1.
The mouse selection entry field enables the user to use a pointing device when selecting values for a field. When a user selects a position on a mouse selection field, the text cursor is moved to the location of the mouse cursor, the keyboard is locked, and the specified AID is returned.
The AID specified in the mouse selection entry field FCW is returned to the AS/400 system. Field data can be included in the inbound data, depending on the type of AID. AID values such as Enter and Roll Up return inbound data.
The field attributes control the image produced on the workstation screen. Each attribute occupies one character position in the workstation regeneration buffer and is displayed as a blank. The effect produced by an attribute begins at its location in the regeneration buffer and continues until the next attribute appears.
The attributes for non-color and color displays are shown in Table 51.
_________________________________________________________________________ | Table 51. Field Attributes in the SF | |________________________________________________________________________| | The attributes for a non-color display are specified as follows: | |____________ ___________________________________________________________| | Bit 0-2 | 0 0 1 = Attribute identification flag | | | | | Bit 3 | 0 = Column separator off | | | | | | 1 = Column separator on | | | | | Bit 4 | 0 = Do not blink field | | | | | | 1 = Blink field | | | | | Bit 5 | 0 = Do not underscore field | | | | | | 1 = Underscore field | | | | | Bit 6 | 0 = Low intensity | | | | | | 1 = High intensity | | | | | Bit 7 | 0 = Normal image | | | | | | 1 = Reverse image | |____________|___________________________________________________________| | Note: Multiple functions can be selected. If bits 5, 6, and 7 all = | | 1, displaying of field will be inhibited. | |________________________________________________________________________| | The attributes for a color display are specified as follows: | |____________ ___________________________________________________________| | X'20' | Green | |____________|___________________________________________________________| | X'21' | Green/Reverse image | |____________|___________________________________________________________| | X'22' | White | |____________|___________________________________________________________| | X'23' | White/Reverse image | |____________|___________________________________________________________| | X'24' | Green/Underscore | |____________|___________________________________________________________| | X'25' | Green/Underscore/Reverse image | |____________|___________________________________________________________| | X'26' | White/Underscore | |____________|___________________________________________________________| | X'27' | Nondisplay | |____________|___________________________________________________________| | X'28' | Red | |____________|___________________________________________________________| | X'29' | Red/Reverse image | |____________|___________________________________________________________| | X'2A' | Red/Blink | |____________|___________________________________________________________| | X'2B' | Red/Reverse image/Blink | |____________|___________________________________________________________| | X'2C' | Red/Underscore | |____________|___________________________________________________________| | X'2D' | Red/Underscore/Reverse image | |____________|___________________________________________________________| | X'2E' | Red/Underscore/Blink | |____________|___________________________________________________________| | X'2F' | Nondisplay | |____________|___________________________________________________________| | X'30' | Turquoise/Column separators | |____________|___________________________________________________________| | X'31' | Turquoise/Column separators/Reverse image | |____________|___________________________________________________________| | X'32' | Yellow/Column separators | |____________|___________________________________________________________| | X'33' | Yellow/Column separators/Reverse image | |____________|___________________________________________________________| | X'34' | Turquoise/Underscore | |____________|___________________________________________________________| | X'35' | Turquoise/Underscore/Reverse image | |____________|___________________________________________________________| | X'36' | Yellow/Underscore | |____________|___________________________________________________________| | X'37' | Nondisplay | |____________|___________________________________________________________| | X'38' | Pink | |____________|___________________________________________________________| | X'39' | Pink/Reverse image | |____________|___________________________________________________________| | X'3A' | Blue | |____________|___________________________________________________________| | X'3B' | Blue/Reverse image | |____________|___________________________________________________________| | X'3C' | Pink/Underscore | |____________|___________________________________________________________| | X'3D' | Pink/Underscore/Reverse image | |____________|___________________________________________________________| | X'3E' | Blue/Underscore | |____________|___________________________________________________________| | X'3F' | Nondisplay | |____________|___________________________________________________________|
The length of each field is controlled by a 2-byte field immediately following the attribute character. The field length specifies the number of keying positions for the input field, not including the starting and ending attribute. Limitations on this field are:
Modifier and Type | Field and Description |
---|---|
static String |
alphaOnlyChars
The characters for World Trace countries that are allowed for Alpha Only
apart of A-Z and a-z (includes blank, period, comma and dash).
|
static int |
FCW_CONTINUED_FIELD |
static int |
FCW_CURSOR_SEQUENCE |
static int |
FCW_FIELD_RESEQUENCING |
static int |
FCW_FORWARD_EDGE_TRIGGER |
static int |
FCW_MODULUS_10_CHECK |
static int |
FCW_MODULUS_11_CHECK |
static int |
FCW_TRANSPARENCY |
static int |
FCW_WORD_WRAP_FIELD |
static int |
FFW_ALPHA_ONLY |
static int |
FFW_ALPHA_SHIFT |
static int |
FFW_AUTO_ENTER |
static int |
FFW_BYPASS |
static int |
FFW_DIGITS_ONLY |
static int |
FFW_DUP |
static int |
FFW_FIELD_EXIT_REQUIRED |
static int |
FFW_FIELD_SHIFT_EDIT_MASK |
static int |
FFW_IO |
static int |
FFW_KATAKANA_SHIFT |
static int |
FFW_MANDATORY_ENTER |
static int |
FFW_MANDATORY_FILL |
static int |
FFW_MDT |
static int |
FFW_MF_RESERVED_1 |
static int |
FFW_MF_RESERVED_2 |
static int |
FFW_MF_RESERVED_3 |
static int |
FFW_MF_RESERVED_4 |
static int |
FFW_MONOCASE |
static int |
FFW_NO_ADJUST |
static int |
FFW_NUMERIC_ONLY |
static int |
FFW_NUMERIC_SHIFT |
static int |
FFW_RA_MF_MASK |
static int |
FFW_RESERVED |
static int |
FFW_RIGHT_BLANK_FILL |
static int |
FFW_RIGHT_ZERO_FILL |
static int |
FFW_SIGNED_NUMERIC |
Constructor and Description |
---|
Field(Display5250 display,
DataStream5250 dataStream,
int addr,
int attr,
int ffw,
int[] fcw,
int fcwCount,
int len)
Creates a new field entry.
|
Field(Display5250 display,
DataStream5250 dataStream,
short[] buf,
int pos)
Creates a new field entry from regeneration data.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkInputField()
Checks all input fields for valid content when the cursor is just moved
with the cursor keys.
|
boolean |
checkInputField(boolean isEnterKey)
Checks all input fields for valid content.
|
boolean |
delete(int cursorAddress)
Deletes a character at the cursor position.
|
boolean |
doesHostNeedFieldExit()
Checks if a field has the attributes that requires this particular
string to enter the data followed by a "Field Exit" or "Field Minus" key.
|
boolean |
eraseEOF(int cursorAddress)
Erases the end of this input field.
|
boolean |
fieldExit(int cursorAddress)
Performs the field exit function.
|
boolean |
fieldMinus(int cursorAddress)
Performs the field minus functions.
|
int |
getAddress()
Gets the address of this field.
|
static String |
getFCWString(int fcw)
Gets a string a single Field Control Word (FCW) string.
|
String[] |
getFCWStrings()
Gets the text description of the Field Control Word(s) (FCW) of this field.
|
static String[] |
getFCWStrings(int[] fcw,
int count)
Gets the text description of the Field Control Word(s) (FCW) of this field.
|
String |
getFFWString()
Gets the string representation of the FFW.
|
static String |
getFFWString(int ffw)
Gets the string representation of the FFW.
|
int |
getFieldAdjustmentFillType()
Gets the type of adjustment and filling of the field.
|
int |
getFieldEditType()
Gets the type of edit field.
|
int |
getInboundFieldData(short[] buf,
int pos,
boolean stripTrailingNulls)
Fills in the field data for an inbound read command.
|
int |
getInboundFieldDataSize(boolean stripTrailingNulls)
Gets the size of an inbound read command.
|
int |
getLength()
Gets the length of the field.
|
int |
getRegenerationData(short[] buf,
int pos)
Gets the field regeneration data for the input fields into the provided buffer
at a starting position.
|
static int |
getRegenerationDataSize()
Gets the size of the field regeneration data for the input fields.
|
int |
getXPosition()
Gets the zero based X position of this field.
|
int |
getYPosition()
Gets the zero based Y position of this field.
|
boolean |
hasNull()
Checks if this field has any null characters in it.
|
boolean |
insertChar(int cursorAddress,
char ch,
boolean isInsertMode,
boolean doMoveCursor,
boolean doUpdate)
Adds a character in a field.
|
boolean |
isAddressAfter(int addr)
Checks if an address is after the start of this field.
|
boolean |
isAddressBefore(int addr)
Checks if an address is before the start of this field.
|
boolean |
isAddressInside(int addr)
Checks if an address is inside this field.
|
boolean |
isAutoEnter()
Checks if this field is of Auto Enter type.
|
boolean |
isBypass()
Checks if this field is a bypass field.
|
boolean |
isDUP()
Checks if this field is DUP enabled.
|
boolean |
isFieldExitRequired()
Checks if this field is Field Exit is required to exit this field.
|
boolean |
isMandatoryEnter()
Checks if this field is Mandatory Enter.
|
boolean |
isMandatoryFill()
Checks if this field is Mandatory Fill.
|
boolean |
isModified()
Checks if this field is modified.
|
boolean |
isMonocase()
Checks if this field is a monocase field.
|
boolean |
isNonnull()
Checks if a field contains nonnull characters.
|
boolean |
isNull()
Checks if a field only contains null characters.
|
boolean |
isRightJustified()
Gets the right adjutment flag of this field.
|
boolean |
isSignedNumeric()
Checks if this field is a signed numeric field.
|
boolean |
leaveField(boolean isTabKey)
Leaves the field and causes appropriate adjustment
formatting to be performed (if the flag is set).
|
void |
nullField()
Nulls this field without affecting the MDT.
|
void |
resetMDT()
Resets the modified state.
|
void |
setCursorToField()
Sets the cursor to the field.
|
void |
setFieldData(int attr,
int ffw,
int len)
Sets new field data when an existing field is overwritten.
|
void |
setModified()
Sets this field as modified.
|
void |
updateField()
Updates the screen buffer with the entire field when it has changed.
|
public static final int FFW_BYPASS
public static final int FFW_DUP
public static final int FFW_MDT
public static final int FFW_FIELD_SHIFT_EDIT_MASK
public static final int FFW_ALPHA_SHIFT
public static final int FFW_ALPHA_ONLY
public static final int FFW_NUMERIC_SHIFT
public static final int FFW_NUMERIC_ONLY
public static final int FFW_KATAKANA_SHIFT
public static final int FFW_DIGITS_ONLY
public static final int FFW_IO
public static final int FFW_SIGNED_NUMERIC
public static final int FFW_AUTO_ENTER
public static final int FFW_FIELD_EXIT_REQUIRED
public static final int FFW_MONOCASE
public static final int FFW_RESERVED
public static final int FFW_MANDATORY_ENTER
public static final int FFW_RA_MF_MASK
public static final int FFW_NO_ADJUST
public static final int FFW_MF_RESERVED_1
public static final int FFW_MF_RESERVED_2
public static final int FFW_MF_RESERVED_3
public static final int FFW_MF_RESERVED_4
public static final int FFW_RIGHT_ZERO_FILL
public static final int FFW_RIGHT_BLANK_FILL
public static final int FFW_MANDATORY_FILL
public static final int FCW_FORWARD_EDGE_TRIGGER
public static final int FCW_CONTINUED_FIELD
public static final int FCW_WORD_WRAP_FIELD
public static final int FCW_MODULUS_10_CHECK
public static final int FCW_MODULUS_11_CHECK
public static final int FCW_FIELD_RESEQUENCING
public static final int FCW_TRANSPARENCY
public static final int FCW_CURSOR_SEQUENCE
public static final String alphaOnlyChars
public Field(Display5250 display, DataStream5250 dataStream, int addr, int attr, int ffw, int[] fcw, int fcwCount, int len)
public Field(Display5250 display, DataStream5250 dataStream, short[] buf, int pos)
public static int getRegenerationDataSize()
public int getRegenerationData(short[] buf, int pos)
public void setFieldData(int attr, int ffw, int len)
public int getXPosition()
public int getYPosition()
public int getInboundFieldDataSize(boolean stripTrailingNulls)
For signed numeric fields:
If the last character is negative, the zone of the low-order digit is set to
X'D' before the character is sent to the AS/400 system. If the last character
is positive, the low-order digit is not changed. The last sign position is not
sent to the AS/400 system in response to either the READ MDT or READ INPUT
commands.
public int getInboundFieldData(short[] buf, int pos, boolean stripTrailingNulls)
For signed numeric fields:
if the last character is negative, the zone of the low-order digit is set to
X'D' before the character is sent to the AS/400 system. If the last character
is positive, the low-order digit is not changed. The last sign position is not
sent to the AS/400 system in response to either the READ MDT or READ INPUT
commands.
public void updateField()
public boolean isNull()
public boolean isNonnull()
public boolean hasNull()
public boolean isModified()
public void resetMDT()
public void setModified()
public int getAddress()
public int getLength()
public boolean isBypass()
public boolean isMonocase()
public boolean isDUP()
public boolean isAutoEnter()
public int getFieldEditType()
public boolean isSignedNumeric()
public boolean isFieldExitRequired()
public boolean isMandatoryEnter()
public int getFieldAdjustmentFillType()
public boolean isMandatoryFill()
public boolean isRightJustified()
This will check if the field is signed numeric or has a zero-fill or blank-fill attribute.
public void nullField()
public void setCursorToField()
public boolean isAddressInside(int addr)
public boolean isAddressAfter(int addr)
public boolean isAddressBefore(int addr)
public boolean checkInputField()
Mandatory Fill:
If the operator enters any character into this type of field, the
field must be completely filled before exiting. Any attempt to
leave an unfilled field causes an error. The workstation operator
can use the Dup key to fill the field. If the field is nulled when
the workstation operator exits from the first position using the
Field Exit or Erase Input key and the MDT bit is on, the null
characters can be sent back to the AS/400 system in response to a
READ command.
public boolean checkInputField(boolean isEnterKey)
Mandatory Fill:
If the operator enters any character into this type of field, the
field must be completely filled before exiting. Any attempt to
leave an unfilled field causes an error. The workstation operator
can use the Dup key to fill the field. If the field is nulled when
the workstation operator exits from the first position using the
Field Exit or Erase Input key and the MDT bit is on, the null
characters can be sent back to the AS/400 system in response to a
READ command.
public boolean insertChar(int cursorAddress, char ch, boolean isInsertMode, boolean doMoveCursor, boolean doUpdate)
public boolean delete(int cursorAddress)
public boolean fieldExit(int cursorAddress)
public boolean fieldMinus(int cursorAddress)
public boolean eraseEOF(int cursorAddress)
public boolean leaveField(boolean isTabKey)
Note: Returns false in order to stop other processing after an Auto Enter. Calling methods should return true if this method call returns false.
public boolean doesHostNeedFieldExit()
public String getFFWString()
public static String getFFWString(int ffw)
public String[] getFCWStrings()
public static String[] getFCWStrings(int[] fcw, int count)
public static String getFCWString(int fcw)
All valid FCWs and their corresponding functions.
_____________________ ______________________________________________________________ | FCW Value | Function | |____________________|______________________________________________________________| | X'80nn' | Entry field resequencing. The nn specifies the next entry | | | field in the sequence (X'00' to X'80'). | |____________________|______________________________________________________________| | X'8101' | Magnetic stripe reader entry field | |____________________|______________________________________________________________| | X'8102' | Selector light pen or cursor select field | |____________________|______________________________________________________________| | X'8103' | Magnetic stripe reader and selector light pen entry field | |____________________|______________________________________________________________| | X'8106' | Selector light pen and selectable attention entry field | |____________________|______________________________________________________________| | X'8200' | Ideographic-only entry field | |____________________|______________________________________________________________| | X'8220' | Ideographic data type entry field | |____________________|______________________________________________________________| | X'8240' | Ideographic-either entry field | |____________________|______________________________________________________________| | X'8280' or | Ideographic-open entry field | | | | | X'82C0' | | |____________________|______________________________________________________________| | X'84nn' | Transparency entry field. The nn can be any two digits. | |____________________|______________________________________________________________| | X'8501' | Forward edge trigger entry field | |____________________|______________________________________________________________| | X'8601'-X'8603' | Continued entry field | |____________________|______________________________________________________________| | X'8680' | Word Wrap entry field | |____________________|______________________________________________________________| | X'88nn' | Cursor progression entry field. The nn is the next entry | | | field in the specified application cursor progression | | | sequence. | |____________________|______________________________________________________________| | X'89nn' | Highlighted entry field. The nn specifies the field | | | attribute | |____________________|______________________________________________________________| | X'8Ann' | Pointer device selection entry field. If a user selects the | | | entry field, the nn specifies the AID to be returned. | |____________________|______________________________________________________________| | X'B140' | Self-check modulus 11 entry field | |____________________|______________________________________________________________| | X'B1A0' | Self-check modulus 10 entry field | |____________________|______________________________________________________________|The first FCW of any type is used. Subsequent FCWs of the same type are ignored. The 5494 does not check to determine if the FCWs are formatted correctly or if the requested function is installed. The 5494 can detect and report these errors to the AS/400 system if the FCW is required during subsequent command and keystroke processing.
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.