HOST or SH or !
Syntax
{ HOST | SH | ! } [host_command];
Description
The HOST (or SH or !) statement executes a host operating system command without terminating the current ISQL session.
Arguments
host_command
The operating system command to execute. If host_command is not specified, ISQL spawns a sub-shell from which you can issue multiple operating system commands. Use the exit command to return to the ISQL> prompt.
Example
Consider a file in the local directory named query.sql. It contains a complex query that joins several tables in a sample database. From within ISQL You can display the contents of the file with the ISQL ! (shell) statement:
ISQL> -- Check the syntax for the UNIX 'more' command:
ISQL> host more
Usage: more [-dfln] [+linenum | +/pattern] name1 name2 ...
ISQL> -- Use 'more' to display the query.sql script file:
ISQL> ! more query.sql
SELECT customers.customer_name,
orders.order_info,
orders.order_state,
lot_staging.lot_location,
lot_staging.start_date
FROM customers,
orders,
lots,
lot_staging
WHERE( customers.customer_id = orders.customer_id ) and
( lots.lot_id = lot_staging.lot_id ) and
( orders.order_id = lots.order_id ) and
( ( customers.customer_name = 'Ship Shapers Inc.' ) AND
( lot_staging.start_date is not NULL ) AND
( lot_staging.end_date is NULL ) ) ;
ISQL> -- Spawn a subshell process to issue multiple OS commands:
ISQL> sh
.
.
.