TACL  -Concept  -摘自 HP TACL programmer's Guide and Reference Manual

TACL uses these files:

• TACL, a program file that is usually stored at $SYSTEM.SYSnn.TACL.

• TACLINIT, an edit file that resides on the same subvolume as the TACL file.

• TACLCSTM, an edit file that provides customization for your personal TACL

environment. The file starts with a ?TACL MACRO directive and resides in your

default subvolume.

• TACLLOCL, an edit file that is invoked by TACL to perform customization of the

TACL environment for all TACL users on a system. The file starts with a ?TACL

MACRO directive and resides on the same subvolume as the TACL file.

• TACLSEGF, a segment file that contains TACL commands and the code for all

other products (that are part of a software RVU) on the system that include TACL


• TACLBASE, an edit file that contains the same functionality as TACLSEGF. This

file resides on the same subvolume as the TACL file. Along with providing

functionality, TACLBASE provides a readable source of examples of TACL


• TACLCOLD, a segment file that TACL uses when running as the coldload

command interpreter. TACL creates this file or reuses it as a way of reducing the

chance that the coldload TACL will fail due to lack of disk space at startup.

• CPRULES0 and CPRULES1, which define the character set in use by TACL.

CPRULES0 is the default set.

Command Interpreter Monitor Interface


The purpose of a command interpreter monitor ($CMON) process is to control and monitor:

• Logons and logoffs, including illegal logon attempts (LOGON and LOGOFF commands)

• Addition or deletion of users (ADDUSER, DELUSER programs)

• Alteration of priorities at execution time (ALTPRI command)

• Process startups (RUN command and #NEWPROCESS built-in function)

If a $CMON process exists on a system, TACL communicates information to $CMON

when the above activities are requested.

TACL 分成 command,Build-in function,Built-in variable.

comannd = FUP,STATUS …

Built-in fuction = # 打頭的的funcion,

Built-in variable = 設定 TACL的 執行環境, #SET xxxx


?BLANK Directive

Use the ?BLANK directive to insert a blank line into a variable; this can be useful when

you load text that is to be displayed

?FORMAT Directive

Use the ?FORMAT directive to specify how TACL interprets metacharacters in the TACL statements following the directive.

The ?FORMAT directive is similar to the #INFORMAT built-in variable, but acts on statements in a file instead of text from the IN

file. The syntax is:


結論: #SET #INFORMAT TACL 是為了可以去讓系統去知道要用TACL 語言的metacharacters (如 [ ,] ,|, )

?FORMAT 用在macro/routine /function library


#INFORMAT{ PLAIN | QUOTED | TACL } - 是用在 IN file(TACL /IN file/)

#INFORMAT  是 built-in function

?SECTION Directive(Library 庫)

Use the ?SECTION directive to signal the beginning of a variable definition in a file.

This directive allows you to create a library that contains definitions for many variables.

?SECTION variable-name variable-type


specifies the type of TACL variable: TEXT, ALIAS, MACRO, ROUTINE, STRUCT,


 LOAD /KEEP 1/ mykeys mymacs

my keys and mymacs is library

結論: 如果是?SECTION 打頭的,要用 LOAD 去啟用,LOAD 完後直接打 PGM-Name

?TACL Directive (單一檔案)

Use the ?TACL directive to specify that the TACL statements following the directive in a file are the contents of a TACL variable

?TACL variable-type


specifies the type of TACL variable: TEXT, ALIAS, MACRO, ROUTINE, STRUCT, DIRECTORY, or DELTA.

Creating a Single-Variable Program File: The ?TACL  Directive

To store a single variable in a file, create an edit-format file whose first line is a ?TACL MACRO or ?TACL ROUTINE directive.

To invoke the text, macro, or routine, type the file name.

結論: 如果是 ?TACL MACRO or ?TACL ROUTINE 的,要用 RUN 去啟動

1.To create a background TACL, specify a file name as the IN file. You can, for example,

   specify an EDIT file with a set of TACL commands (and without a ?SECTION or ?TACL

   directive) as the IN file:

   TACL /IN file-name, NOWAIT, NAME $TCL2/

結論: 如果沒有 ?SECTION 或是 ?TACL ,要TACL  /IN  去執行 TACL program,background 用

2.To send commands interactively to the background process, use the INV or INLINE run

    options. To execute a routine from the background process, you can supply an IN file

    that loads and runs the routine.


若是 TACL /IN xxxx/  要使用#INFORMAT (有用到IN file ) ,

沒有?TACL 或是 ?SECTION 在第一行,可以用TACL /IN pgm,NOWAIT/ 或是OBEY pgm執行


註解的方式,共有 3種方式

1. COMMENT  your comment text

2. ==     your comment text

3. { your comment text  }

若是要多行註解,請用  &  連接


Debug  的方法





>開始 debug 吧!!