You are currently viewing Zend Server 5.x documentation. Click here to view the latest Zend Server online documentation.
You are here: API Reference Guide > PHP XMLSERVICE Toolkit > Toolkit Service Class > The CLCommand Method

The CLCommand Method

CL Command Execution Method

There are two types of CL commands.

  1. CLInteractiveCommand – Will return the command message or command return values.

    1. $message = $obj->CLInteractiveCommand($Command);

  2. CLcommand – Will run the command in the batch without returning command messages or command return values.

    1. $obj->CLCommand($Command)

 

Arguments

Value

Description

$Command

 

Valid CL command string

Sample Code

This sample shows how to run the following CL commands:

Usage Example

</pre>
<?php
include_once 'authorization.php';
include_once '../API/ToolkitService.php';
     
     try {
         $obj = ToolkitService::getInstance($db, $user, $pass);
     }
     catch (Exception $e) {              
        echo  $e->getMessage(), "\n";
        exit();
    }
     
    $obj->setToolkitServiceParams(array('InternalKey'=>"/tmp/$user",
                                        'debug'=>false,
                                        'plug' => "iPLUG32K"));
    $cmd = "addlible ZENDSVR";
    $obj->CLCommand($cmd);
    echo "<pre>";  
    $Rows = $obj->CLInteractiveCommand("DSPLIBL");
    /*$Rows = $obj->CLInteractiveCommand("WRKSYSVAL OUTPUT(*PRINT)");*/
    if(!$Rows )
        echo $obj->getLastError();
    else       
      var_dump($Rows);
         
    echo "</pre>";  
     
/* Do not use the disconnect() function for "state full" connection */
   $obj->disconnect();
?>

 

 

 

Related Links

Related Links:

Toolkit Service Class

 

 

 

© 1999-2013 Zend Technologies, Ltd. All rights reserved.