How to: Reference: |
The DEFECHO parameter sets a default value for the Dialogue Manager &ECHO variable. When &ECHO is set to ON, command lines display on the screen as a procedure executes. When &ECHO is OFF, command lines do not display. The ALL setting displays both FOCUS commands and Dialogue Manager commands as the procedure executes.
In order to protect the privacy of your procedure code, you can use the SET DEFECHO=NONE command or the -SET &ECHO=NONE command to prevent the code from displaying for the entire session or connection.
You can issue the following command in any supported profile or in a FOCEXEC.
SET DEFECHO = {OFF|ON|ALL|NONE}
or
-SET &ECHO = {OFF|ON|ALL|NONE};
where:
Does not display command lines as a procedure executes. OFF is the default value.
Displays FOCUS commands that are expanded and stacked for execution.
Displays Dialogue Manager commands and FOCUS commands that are expanded and stacked for execution.
Prevents procedure code from being displayed (echoed). Once the value of DEFECHO or &ECHO has been set to NONE, it cannot be changed during the session or connection.
The following procedure queries the value of the DEFECHO parameter and issues a TABLE request against the EMPLOYEE data source.
? SET DEFECHO -RUN -TYPE ECHO = &ECHO TABLE FILE EMPLOYEE PRINT CURR_SAL CURR_JOBCODE BY LAST_NAME BY FIRST_NAME END -RUN
The query command output shows that DEFECHO is OFF (the default value).
DEFECHO OFF
The -TYPE command shows that the value of &ECHO is OFF (the default).
ECHO = OFF
Because &ECHO is OFF, the TABLE commands do not display as the procedure executes.
NUMBER OF RECORDS IN TABLE= 12 LINES= 12 PAUSE.. PLEASE ISSUE CARRIAGE RETURN WHEN READY PAGE 1 LAST_NAME FIRST_NAME CURR_SAL CURR_JOBCODE --------- ---------- -------- ------------ BANNING JOHN $29,700.00 A17 BLACKWOOD ROSEMARIE $21,780.00 B04 CROSS BARBARA $27,062.00 A17 GREENSPAN MARY $9,000.00 A07 IRVING JOAN $26,862.00 A15 JONES DIANE $18,480.00 B03 MCCOY JOHN $18,480.00 B02 MCKNIGHT ROGER $16,100.00 B02 ROMANS ANTHONY $21,120.00 B04 SMITH MARY $13,200.00 B14 RICHARD $9,500.00 A01 STEVENS ALFRED $11,000.00 A07 END OF REPORT
Now, set DEFECHO=ON and rerun the procedure.
The query command output shows that DEFECHO is ON.
DEFECHO ON
The -TYPE command shows that the value of &ECHO has been changed to ON.
ECHO = ON
Because &ECHO is ON, the TABLE commands display as the procedure executes.
TABLE FILE EMPLOYEE PRINT CURR_SAL CURR_JOBCODE BY LAST_NAME BY FIRST_NAME END
The output displays next.
NUMBER OF RECORDS IN TABLE= 12 LINES= 12 PAUSE.. PLEASE ISSUE CARRIAGE RETURN WHEN READY PAGE 1 LAST_NAME FIRST_NAME CURR_SAL CURR_JOBCODE --------- ---------- -------- ------------ BANNING JOHN $29,700.00 A17 BLACKWOOD ROSEMARIE $21,780.00 B04 CROSS BARBARA $27,062.00 A17 GREENSPAN MARY $9,000.00 A07 IRVING JOAN $26,862.00 A15 JONES DIANE $18,480.00 B03 MCCOY JOHN $18,480.00 B02 MCKNIGHT ROGER $16,100.00 B02 ROMANS ANTHONY $21,120.00 B04 SMITH MARY $13,200.00 B14 RICHARD $9,500.00 A01 STEVENS ALFRED $11,000.00 A07 END OF REPORT
Now, issue the SET DEFECHO = NONE command and rerun the procedure.
SET DEFECHO = NONE
The query command output shows that the value of DEFECHO has been changed to NONE.
DEFECHO NONE
The -TYPE command shows that the value of &ECHO is NONE.
ECHO = NONE
Because DEFECHO has the value NONE, the TABLE commands do not display as the procedure executes.
The output is:
NUMBER OF RECORDS IN TABLE= 12 LINES= 12 PAUSE.. PLEASE ISSUE CARRIAGE RETURN WHEN READY PAGE 1 LAST_NAME FIRST_NAME CURR_SAL CURR_JOBCODE --------- ---------- -------- ------------ BANNING JOHN $29,700.00 A17 BLACKWOOD ROSEMARIE $21,780.00 B04 CROSS BARBARA $27,062.00 A17 GREENSPAN MARY $9,000.00 A07 IRVING JOAN $26,862.00 A15 JONES DIANE $18,480.00 B03 MCCOY JOHN $18,480.00 B02 MCKNIGHT ROGER $16,100.00 B02 ROMANS ANTHONY $21,120.00 B04 SMITH MARY $13,200.00 B14 RICHARD $9,500.00 A01 STEVENS ALFRED $11,000.00 A07 END OF REPORT
Once the value of DEFECHO has been set to NONE, it cannot be changed. The following SET command attempts to change the value to ON, but the query command output shows that it is still NONE.
SET DEFECHO=ON ? SET DEFECHO DEFECHO NONE
Information Builders |