Analysis Server Protocol - Raw Mode

There are two modes that can be used with connections to the Analysis Server.  By default the connection is in "human readable" mode, which is convenient for testing and debugging but less powerful than Raw Mode.  In raw mode, all commands and responses are attached to an ID number and packetized with a command or response length.  This allows a single connection to multiplex several concurrent activities at once and allows for improved handling of long values.  The raw mode can be entered by using the command:
>setMode raw
Once in raw mode, the command prompt ">" will no longer be sent.  Commands will be processed one at a time as they are received unless a command is "backgrounded", in which case it will be launched immediately onto a separate thread even if there are several waiting jobs in the queue.  Commands are sent with one or more "header" lines, separated by newlines and finalized by the "cmdLen" header.  The possible headers are:
setID <ID>
Sets the ID string for this command.  All responses to this command, which may be multiple, will contain this string as a way to identify the response to this command
bg
<optional> Sets the command in backgrounded mode.  The command will be run immediately on a separate thread, even if there are waiting commands to be processed in the queue.  Not all commands are safe to be run in the background.
cmdLen=<len>
Sets the length of the command in bytes.  This line marks the end of the header section.  The next <len> bytes after the newline will be read in, regardless of internal newlines, and used as the command.  Processing starts over after <len> bytes.
 
Responses contain 3 header lines and then the data.  The first line contains the ID of the command to which this response is associated.  The second line contains the format of the response.  The third line is the length of the response in bytes, not including the header.  Possible formats are:
Format Description
string This is the most common response type, indicating success and a string result
error Indicates an error was encountered.  The text of the error is included as the data
PHXIcon Indicates that binary icon data follows.
 
An example session might look as follows.  Text sent from the client to the server is highlighted in bold.
[nsharp@pathfinder nsharp]$ telnet asServer 1835
Trying 10.10.10.126...
Connected to asServer.
Escape character is '^]'.
Welcome to the Analysis Server.
Developed by Phoenix Integration, Inc.
www.phoenix-int.com
version: 4.0, build: 283
Copyright 2000, All Rights Reserved.
Usage subject to license agreement with
Phoenix Integration Inc. (type getLicense).
>start TESTS/Types a
Object a started.
>setMode raw
setID 33
cmdLen=23
set a.string="one
two" 33 format: string 24 value set for <a.string>

See also Analysis Server | Analysis Server Commands