Contents of Article


Setting the WORD characters

Setting the Invalid Character string for P'.'

Character String Syntax


Introduction


Several SPFLite functions require a list of user provided characters to make decisions.  For example the WORD support uses a list to determine whether a character is part of a "word" or is a delimiter.  The P'.' Picture support needs a list to determine what characters are considered "invalid".


Both these functions use the same syntax to define the character string.  The syntax is structured to allow this to be done in a simple manner.



Setting the WORD characters


To set the WORD characters, perform the following:


    • Edit a file of the Profile type for which you are setting the WORD values. If needed, go to File Manager and enter .profile-name next to the New file option to obtain a dummy edit session.


    • Enter OPTIONS as a Primary command. On the General Tab, you will see a setting labeled as "Only English A-Z and a-z are considered alphabetic"  Select this if you do NOT wish the normal ANSI international word characters to be automatically added to your WORD string. Click DONE when you have made your selection.


    • Enter WORD as a line command. The current (default) WORD setting will be displayed as a =WORD> line type.


    • Enter PROF UNLOCK as a primary command to allow modification of this Profile.


    • Edit the =WORD> line as needed to suit your Word requirements. See Word Syntax below.


    • Your WORD setting is complete



Setting the Invalid Character string for P'.'


To set the Invalid Character String:


    • Enter OPTIONS as a Primary command. On the General Tab, you will see near the bottom a Text box labeled "Enter the Invalid characters for P'.' literals".  Enter your desired invalid character list using the Syntax below.


    • Click the Done button to save your changes.



Character String Syntax


The character string consists of a series of either 1 or 2 byte character strings separated by spaces, or by a character range string separated by spaces. A character range string is simply two characters separated by a - (dash). Two byte character strings are assumed to be Hex character requests and must consist of only valid hex characters  0-9 and A-F, case is unimportant for Hex values. Note that a range can be a character range, or a hex range, but you cannot mix hex and character notation in the same range; so 0-39 and 30-9 are illegal ranges.


The following would be valid operand strings for WORD:


A        the uppercase letter A

FF        the hex value FF ( the ΓΏ character)

a-z         the whole range of characters from lowercase 'a' through lowercase 'z'

0-9        the numbers '0' through '9'

30-39        the numbers '0' through '9' (expressed in hex)


Range strings must be expressed in ascending sequence. e.g. a range of Z-A is invalid.


The operands of string do not have to themselves be in sequence; it is perfectly valid to have a string of:

A-Z FF FE FD a-z _ - 0-9


It is not an error to repeat a character in a WORD specification, the following is valid:

A-Z a-z 0-9 a-c D X z 32-35 a-z


If you have chosen to include the International characters under Options => General as described above, they will be handled as follows when specifying a WORD character string only, not for an Invalid character string. The uppercase International characters will be added if A-Z is included in the WORD string; and the lowercase International characters will be added if a-z is included in the WORD string. 


By automatically adding international characters this way, you don't have to manually list them all yourself (which is a good thing, because there are a lot of them, and they are not in contiguous character ranges either). This "adding" of characters is done internally; you won't visibly see the WORD string modified with the added characters, but SPFLite's processing logic for WORD will take them into account. 


If you wish to specifically exclude these international characters from these ranges, code the PROFILE WORD string like this: 

   A-Y Z a-y z


Note that the default WORD string used by SPFLite is:   A-Z a-z 0-9, 

the default for an Invalid Character string is:   00-1F 7F 81 8D 8F 9D


Use of WORD hex ranges in EBCDIC files  


Users of EBCDIC files should be mindful that SPFLite does all of its internal editing in ANSI. EBCDIC files are translated to and from ANSI as needed to make the process appear transparent. What this means is that all these strings must be specified using  ANSI encoding, not EBCDIC encoding. So, a hex range of digits must be defined as 30-39, even though the data values appear in HEX mode edit displays as F0-F9. As this process could be confusing and non-intuitive, it may be best to avoid hex ranges for EBCDIC files. Otherwise, choose these values carefully.



Created with the Personal Edition of HelpNDoc: Maximize Your Productivity with a Help Authoring Tool