Text Case Handling


Case Modification


Characters are copied from the source string to the result string as-is, unless you provide codes to modify the case of the data:









Case Sensitivity and Case Conformance



When a string operand appears on a command code, and that command involves searching for or changing data, the command will apply comparison and change rules that are similar to how SPFLite in general handles this when it executes a FIND or CHANGE primary command.


Mapping commands handle case sensitivity as follows:





Some commands, such as RA (Replace All) accept a two-part string operand syntax, consisting of a first and a second string value.  Such commands involve both finding and changing data.


When data is changed with such commands, it is possible to cause such changes to occur in a case conformant manner, the same as is done when a CHANGE primary command has string operands with string type codes of T for both string‑1 and string‑2.  See Case-Conformant Change Strings under Finding and Changing Data in the Help topic Working with SPFLite for more information on how the case conformant change process operates.


For mapping commands that use pairs of strings, these special operands work as shown below, using the RA command as an example, which use a pair of first and second string values.


You will see that there are a large number of cases.  Instead of trying to memorize these cases, it is best to observe that, with few exceptions, mapping commands handle strings the same way as FIND and CHANGE primary commands do when their string-1 and string-2 operands use the same type codes.  Where there are differences from the way primary commands handle this, those differences are highlighted in red.


Note that after an X value is converted to its character equivalent, it is treated like type C; that is, as case-sensitive for comparisons, and an X value is used as-is when specified as string-2.


#

Sample Command

String-1 type

String-2 type

How string-1 compared

How string-2 changed

1

RA'first=second'

omitted

omitted

Based on CC/CT command in effect, or on current PROFILE CASE setting

As specified, as if string-2 had a type code of C

2

RA'first=second'C

RA'first=second'X

C implied

X implied

C

X 

Case sensitive

As specified

3

RA'first=second'T

T implied

T

Case insensitive

Case conformant

4

RA'first'='second'C

RA'first'='second'X

omitted

C  

X

Based on CC/CT command in effect, or on current PROFILE CASE setting

As specified

5

RA'first'='second'T

T implied

T

Case insensitive

Case conformant.  Type T is implied for string-1 because without it, the case conformance of string-2 would serve no purpose.


6

RA'first'T='second'

T 

omitted

Case insensitive

As specified, as if string-2 had a type code of C.  Note that type T on string-1 is not assumed for string-2

7

RA'first'T='second'C

RA'first'T='second'X

T 

T 

C

X

Case insensitive


As specified

8

RA'first'C='second'

RA'first'C='second'C

RA'first'C='second'X

RA'first'X='second'

RA'first'X='second'C

RA'first'X='second'X

C

C

C

X

X

X

omitted  

C 

X 

omitted 

C 

X 

Case sensitive

As specified

9

RA'first'C='second'

RA'first'C='second'C

RA'first'C='second'X

omitted 

omitted  

C 

X 

Based on CC/CT command in effect, or on current PROFILE CASE setting

As specified

10

RA'first'C='second'T

RA'first'X='second'T

C  

X  

T

T

Case sensitive

Case conformance is required for SPFLite compliance.  In ISPF, the type T would be ignored.

11

RA'first':'second'

T implied.

Type T is always assumed.

T implied.

Type T is always assumed.

Case insensitive

Case conformant.  When colon notation is used, type T is implied for both strings.  If you combine this colon notation with non-type-T codes, their values are accepted as written (including X), but strings are still treated as case-insensitive and case-conformant.

12

RA'first:second'

RA'first:second'C

RA'first:second'T

RA'first:second'X

This is probably an invalid string specification.  The colon does not delimit two strings, but is part of the data in the one and only string that is defined.


If used with type X, the hex data will be invalid.

omitted 

omitted

Based on CC/CT command in effect, or on current PROFILE CASE setting

The command does not define string-2, but only string-1.   The : colon in string‑1 is not a delimiter but is ordinary data, and has no special meaning.  For the RA command, this would be a string-delete request.  In other commands, it may be a syntax error.





Created with the Personal Edition of HelpNDoc: Easily create iPhone documentation