Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Everything E3D

Sending Commands to a Data Server

  • Last UpdatedFeb 15, 2024
  • 2 minute read

Note:
It is assumed that the user is already familiar with the commands for communicating with their data server; for example, the SQL commands needed to interact with an SQL database.

The user can send commands to the data server in one of two ways:

  • As individual command lines, each of which is sent as soon as the newline character is entered to terminate the command line.

  • In continuous mode, such that a sequence of command lines is concatenated and sent as a single command string. The maximum length for an individual command line is 120 characters; continuous mode allows the user to send longer command sequences.

To send an individual command line to the data server, simply prefix the command text thus:

EXTERnal SENd  token  command_text

where token is the token for the communication channel which was supplied by a successful EXTERNAL OPEN command (and stored in the token_var variable) and command_text is the command string to be sent to the data server.

Example

EXTERNAL SEND $!!MAINT ’commit’

To send a continuous command sequence to the data server, use the syntax

EXTERnal SENd  token  STArt

command_text_1

command_text_2

...

END

where token is the token for the communication channel which was supplied by a successful EXTERNAL OPEN command (and stored in the token_var variable) and command_text_1 are the command strings to be sent to the data server.

Example

EXTERNAL SEND $!!MAINT START

’select refno, description, datedue’

’from maintdata’

’where datedue<sysdate+7’

END

where each line of command text is terminated by a newline character.

When the END command is reached, all text lines entered since START are concatenated, with a space separator between each, and sent to the data server as a single command.

Note:
Command texts may include references to PML variables.
The maximum length for a single text line is 120 characters.
The maximum total length for the overall text string (that is, all lines between the START and END commands) is 4095 characters, including the separating spaces.