.U Command

Toggles uppercase translation of stack statements entered. By default, TCL statements are stored in the stack as they are entered, in uppercase, lowercase, or a combination of the two cases. The system, however, is case sensitive; only statements entered in uppercase will be executed. The .U command allows users to enable and disable uppercase translation. When uppercase translation is enabled, statements entered at the TCL prompt are automatically translated to uppercase before they are executed and stored in the stack.

Format

.U [(process)]

Parameter(s)

process

Turns uppercase translation on and off for the specified process. You must have SYS2 privileges to use this option.

When uppercase command storage is enabled, the system does not convert letters that are embedded within a pair of standard delimiters (such as apostrophes (), quotation marks ("), or slashes (/) to uppercase.

NOTE

All TCL Stacker commands, except for .R, can be entered in either upper- or lowercase characters, regardless of whether uppercase translation is on or off. In other words, the .U command has no effect on TCL Stacker commands.

Enabling and Disabling Uppercase Translation of TCL Statements

The example below turns uppercase translation on. The TIME command, entered in lowercase, is then translated to uppercase and executed:

>.u

ON

 

>time

16:1700   dd   mmmyyy

 

>.l5

001 TIME

002 COPY  DICT  BOOK-CATALOG  1

003 LISTFILES

004 SORT CUSTOMERS BY STATE ID-SUPP

005 SORT CUSTOMERS BY STATE ID-SUPP BREAK-ON STATE

 

>

Next, uppercase command storage is disabled. This time, when the TIME command is entered in lowercase, it is stored in the stack as entered; it cannot be executed, however, because the system does not recognize statements entered (and stored) in lowercase:

>.u

OFF

 

>time

[3] VERB?

 

>.l5

001 time

002 TIME

003 COPY DICT BOOK-CATALOG 1

004 LISTFILES

005 SORT CUSTOMERS BY STATE ID-SUPP

>

Nontranslation of Characters Enclosed in Delimiters

The next example shows a statement that was entered all in lowercase except for the last name, "Johnson", which is enclosed in quotation marks. With uppercase translation enabled, the statement is stored all in uppercase, except for the delimited last name, which is stored exactly as entered. This is shown by listing the stack statements with the .L command:

>.u

ON

>sort customers by last-name with last-name = "Johnson" last-name first-name

   .

   .

   .

>.l5

001 SORT CUSTOMERS BY LAST-NAME WITH LAST-NAME = "Johnson" LAST-NAME FIRS‘T-NAME

002 LIST CUSTOMERS WITH LAST-NAME "JOHNES"

003 COPY JOHNES FIRST-NAME LAST-NAME STREET

004 LIST CUSTOMERS WITH LAST-NAME "JONES"

005 DELETE-FILE DATA JONES

>

The next example shows what happens when the same statement is entered with uppercase translation disabled. The statement cannot be executed and an error message appears:

>.u

OFF

>sort customers by last-name with last-name = "Johnson" last-name first-name

[3] VERB?

>

When uppercase translation is enabled with the .U command (notice that it can be entered in either uppercase or lowercase), the statement continues to be stored as it was entered, in lowercase, as shown by the .L command:

>.u

ON

>.11

001 sort customers by last-name with last-name = "Johnson" last-name first-name

>

Now, however, the command can be executed with the .X command, and the next time you list the statement with the .L command, all characters are shown changed to uppercase (except for "Johnson"):

>.X

SORT CUSTOMERS BY LAST-NAME WITH LAST-NAME = "Johnson" LAST-NAME FIRST-NAME

 

 

 

PAGE 1

 

 15:47:13  dd mmm yyyy

 

 

 

CUSTOMERS

Last Name

First Name

 

 

 

AJOHN760JE

JOHNSON

ALICE

HJOHN455OT

JOHNSON

HENRY

 

 

 

2 ITEMS LISTED.

 

 

 

 

 

>.1

 

 

001 SORT CUSTOMERS BY LAST-NAME WITH LAST-NAME="Johnson" LAST NAME FIRST-NAME

 

 

 

>

 

 

See Also

TCL Stacker Command Reference