.P Command

Turns Proc command storage on and off. The .P command determines whether the TCL Stacker stores the TCL statements that make up a Proc, as well as the Proc’s name. The .P command acts as a toggle to enable and disable this option. By default, Proc command storage is on. You must have SYS2 privileges.

Format

.P [(process)]

Parameter(s)

process

Number of a process other than your own. Allows you to enable/disable Proc storage for the specified process.

When the .P option is on and you invoke a Proc, the Proc’s name is placed in the stack as one statement, then the TCL statements that the Proc executes are placed in the stack as separate statements.

When Proc command storage is enabled, any of the individual statements that make up a Proc can be re-executed or modified. This condition may not be desirable, because users can then access or delete special system files.

Toggling Proc Command Storage

By default Proc command storage is on. The example below first shows the execution of the Proc LISTFILES, followed by the .L command:

>LISTFILES

 LISTFILES

 

 

 

 

PAGE   1  *** M/DICT *** FILE DEFINING ITEMS    dd mmm yyyy    

 

 

 

 

M/DICT...

CODE

F/BASE.........

F/MOD..........

 

 

 

 

AUD

D

8181

7

AUDIT

D

8171

7

BACKGROUND

D

8060

7

BOOK-CATAL

DG

8256

3

BP

DC

8118

21

BUSINESS

D

8042

3

.

 

 

 

.

 

 

 

.

 

 

 

 

 

 

 

>.L2

001 SORT DICT WITH D/CODE "Q""DY""DX""DZ""DC""D""DCX""DCY" D/CODE F/BASE F/MOD HEADING "PAGE'P'  *** 'F' *** FILEDEFINING ITEMS 'DL'" BY D/CODE1 M/DICT

002 LISTFILES

Note the order of the commands in the stack: statement 2, the name of the Proc, is stored first, followed by statement 1, the actual command that the Proc executed. (Remember, the last statement entered in the stack becomes statement 1.)

Next, Proc command storage is turned off with the .P command, and the LISTFILES Proc is run again:

>.P

OFF

>LISTFILES

LISTFILES

 

 

 

 

PAGE   1  *** M/DICT *** FILE DEFINING ITEMS    dd mmm yyyy    

 

 

 

 

M/DICT...

CODE

F/BASE.........

F/MOD..........

 

 

 

 

AUD

D

8181

7

AUDIT

D

8171

7

BACKGROUND

D

8060

7

BOOK-CATAL

DG

8256

3

BP

DC

8118

21

BUSINESS

D

8042

3

.

 

 

 

.

 

 

 

.

 

 

 

 

 

 

 

>.L3

001 LISTFILES

002 SORT DICT WITH D/CODE "Q""DY""DX""DZ""DC""D""DCX""DCY" D/CODE F/BASE F/MOD HEADING "PAGE'P'  *** 'F' *** FILE DEFINING ITEMS    'DL'" BY D/CODE1 M/DICT

003 LISTFILES

Now only the name of the Proc is stored in the stack. It is stored as statement 1. (Statement 2 in the example is the Proc command previously executed when Proc command storage was still enabled.)

See Also

TCL Stacker Command Reference