Hitachi

JP1 Version 11 JP1/Script Description and Reference (For Windows Systems)


8.2.7 DeleteGV (delete a global variable)

Purpose

Deletes a global variable on the local computer or on a remote computer.

Syntax
DeleteGV (GlobalName [, CompName])
Arguments
GlobalName

Write the global variable name as a character string or as a variable that stores this value. Alternatively, you can specify the following value:

Value

Meaning

AllGV

Delete all global variables, but preserve the global variable file (SPTGV.SPG).

CompName

Write the name of the computer from which to delete this global variable, using a character string or a variable that stores this value.

This value is optional. If you omit this value, the computer on which the command is executed is assumed.

Note that JP1/Script must be installed and the JP1/Script service must be running on the remote computers to be specified. For details about accounts for accessing computers, see 2.2 Accounts for communication with other computers.

Description

The DeleteGV command deletes a specified global variable. The command returns True on successful execution, or False if an error occurs.

If you specify a non-existent global variable, the command returns True without doing anything.

If you specify a remote computer in CompName and want to include n double quotation marks (") as characters in GlobalName, you must enter n*4 double quotation marks. However, If you specify 1 in the following registry, you can use n*2 double quotation marks instead of n*8:

Registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Hitachi\JP1/Script\SPTX
Value name
ParseDQ
Value datatype

REG_DWORD

Value

0: If you are using quotation marks in a parameter string, the setting that allows you to specify n*2 double quotation marks (") is disabled (this is the default value).

1: If you are using quotation marks in a parameter string, the setting that allows you to specify n*2 double quotation marks (") is enabled.

To specify both 1 and 2 (see the SeparateStrCount and SeparateStr commands) as the value of this registry, type 3.

When the setting takes effect

The setting takes effect the next time the script file is executed.

Note

When a remote computer is specified in the CompName argument, operation is guaranteed only in a LAN environment. This command does not operate across firewalls.

Examples
' Delete all global variables on the local computer.
DeleteGV (AllGV)
 
' Delete global variable "prm01" on computer
' "SOP4A065(SCRIPT)".
SetGV ("prm01", 10, "SOP4A065(SCRIPT)")
Exec (_SCF_+"ABC.SPT", True)
DeleteGV ("prm01", "SOP4A065(SCRIPT)")
JP1/Script version

Supported from JP1/Script 06-00.