Consultor Eletrônico



Kbase 12585: Debugging DCL Command Procedures
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
Debugging DCL Command Procedures

This notebook entry discusses troubleshooting techniques in debugging
DCL command procedures.

COMMAND PURPOSE
------- -------

SET VERIFY Put the command SET VERIFY at the beginning
of your command procedure. With verbose
turned on, you will see each command as it
executes.

F$MODE() F$MODE is a lexical function. Put this in
your login.com to determine what mode you
are running in, and only the commands
following this block of code will get
executed during that mode.

For example, if you are running in interactive
mode, and as your command procedure encounters
the check for batch processing:
(IF F$MODE() .EQS. "BATCH")
this section of code within this IF ENDIF loop
will NOT get executed.

When starting a multiuser client session,
PROGRESS creates a detached process. This
detached process runs loginout.exe which
runs SYLOGIN.COM and SYS$LOGIN:LOGIN.COM.
SYLOGIN.COM gets executed whenever anyone
logs into the system. SYS$LOGIN:LOGIN.COM
is the users login.com. It is important
that these command procedures be error
The detached process will be in
noninteractive mode.

Examples:

$ IF F$MODE() .NES. "INTERACTIVE"
$ THEN
$ SET COMMAND DLC:PROGRESS.CLD
$ ENDIF


$ IF F$MODE() .EQS. "BATCH" THEN -
GOTO NON_INTER_DEF
$ ! Commands for Interactive Sessions
$ INT_DEF:
.
.
.
$ ! Commands for Noninteractive Sessions
$ NON_INTER_DEF:

This lexical function can check modes for
INTERACTIVE, NETWORK, BATCH and OTHER.


WRITE SYS$OUTPUT SYS$OUTPUT is the default output device
to where VMS will display output, the
terminal. You can add this command to
your command file, it will display
a character string in quotes, a symbol name,
or a lexical function.

Example:

$ WRITE SYS$OUTPUT "Defining PROGRESS log"


SHOW This will show information about your process,
the system, or devices in the system.

For example:

$ SHOW LOGICAL PROSRV

This command added to your command file
will display the logical PROSRV to the
terminal.


ON conditon THEN
action This will cause the specified action to be
performed when the com procedure encounters
this condition. Conditions to check for:

WARNING : S$SEVERITY = O
ERROR : S$SEVERITY = 2
SEVERE_ERROR : S$SEVERITY = 4
CONTROL_Y : CTRL/Y occurs on SYS$INPUT

Example: ON SEVERE_ERROR THEN CONTINUE

This will cause the command file to continue
to the next line even on the event of a severe
error.

The action associated iwth the ON condition
is taken when the error is equal to or greater
than the severity level.


References: VAX/VMS Users's Manual
Open VMS System and Network Node Management
Online Help on VMS

Progress Software Technical Support Note # 12585