$result = $session->cmd ($cmd_string);
cmd is a method of the class DBM. You use this method to send the DBM command specified under $cmd_stringto the program DBM Server.
The result of the DBM command is returned.
If the DBM Server program registers an error, an exception of the class DBMServError is raised.
Specifying a valid DBM command
$result = session->cmd
('db_state');
print "$result\n";
Output:
State
OFFLINE
Specifying an invalid DBM command
$result =
$session->cmd ('invalid command');
print "$result\n";
Output:
Error DBM Server: -24977 ERR_COMMAND: unknown command "invalid" at /opt/sapdb/misc/SAP/DBTech/dbm.pm line 89.
(See also: Method rawCmd)