cmd is a method of the Loader class (loader module). You use this method to send a Loader command $cmd_string to the Loader.
Syntax
$result = $session->cmd ($cmd_string);
More information: Loader, Loader Commands and SQL Statements
The result of the Loader command is returned.
If the Loader server returns an error, an exception of the LoaderError (loader module) class is triggered.
You specify a valid Loader command:
$result = $session->cmd ('CREATE TABLE testtable1 (colname INTEGER)') print "result: '$result'\n";
Output:
result: ''
You specify an invalid Loader command:
$result = $session->cmd ('invalid command') print "result: '$result'\n";
Output:
Error Loader Server: SQL error -3005 = Invalid SQL statement error position: 1) at /opt/sdb/misc/SAP/DBTech/loader.pm line 89.