## CORBA Interface ILanguageService

A service for submitting SAS language and obtaining output from the SAS list and log.

### Definition

CORBA Module SAS

### ILanguageService Description

This component provides access to the services of the SAS 4GL programming language. Those services include the ability to submit SAS language source code originating with the client, execute SAS language source code stored in a server repository, and receive SAS language execution feedback and results information.

CORBA Definitions
enum LineType | Indicates the line type for each line.
enum CarriageControl | Indicates carriage control for each line.
attribute Parent | Parent Workspace attribute
attribute Async | Asynchronous execution attribute
attribute SuspendOnError | SuspendOnError control attribute
attribute LineSeparator | The line separator character or characters used by the flush methods when returning multiple lines in a single string.
attribute StoredProcessService | StoredProcessService attribute
method Submit | Submit operation
method SubmitLines | Submit lines of SAS language statements.
method FlushLog | Flush log lines that were spooled by program execution.
method FlushLogLines | Flush log lines that were spooled by program execution.
method FlushList | Flush list lines that were spooled by program execution.
method FlushListLines | Flush list lines that were spooled by program execution.
method ResetLogLineNumbers | Set the next log line number back to 1.
method Continue | Restarts execution of a suspended LanguageService component.
method Reset | Resets the LanguageService to an initial state.
method Cancel | Interrupts the current program execution frame.

Java Classes
ILanguageServiceHelper | Used to manipulate the ILanguageService type
ILanguageServiceHolder | Used to process the ILanguageService type as an out parameter
LineType | Indicates the line type for each line.
LineTypeHelper | Used to manipulate the LineType type
LineTypeHolder | Used to process the LineType type as an out parameter
LineTypeSeqHelper | Used to manipulate one dimensional arrays of the LineType type
LineTypeSeqHolder | Used to process one dimensional arrays of the LineType type as an out parameter
VariableArray2dOfLineTypeHelper | Used to manipulate two dimensional arrays of the LineType type
VariableArray2dOfLineTypeHolder | Used to process two dimensional arrays of the LineType type
CarriageControl | Indicates carriage control for each line.
CarriageControlHelper | Used to manipulate the CarriageControl type
CarriageControlHolder | Used to process the CarriageControl type as an out parameter
CarriageControlSeqHelper | Used to manipulate one dimensional arrays of the CarriageControl type
CarriageControlSeqHolder | Used to process one dimensional arrays of the CarriageControl type as an out parameter
VariableArray2dOfCarriageControlHelper | Used to manipulate two dimensional arrays of the CarriageControl type
VariableArray2dOfCarriageControlHolder | Used to process two dimensional arrays of the CarriageControl type

Java Interfaces
ILanguageService | A service for submitting SAS language and obtaining output from the SAS list and log.

### ILanguageService_1_1 Description

CORBA Definitions
enum LineType | Indicates the line type for each line.
enum CarriageControl | Indicates carriage control for each line.
attribute Parent | Parent Workspace attribute
attribute Async | Asynchronous execution attribute
attribute SuspendOnError | SuspendOnError control attribute
attribute LineSeparator | The line separator character or characters used by the flush methods when returning multiple lines in a single string.
attribute StoredProcessService | StoredProcessService attribute
method Submit | Submit operation
method SubmitLines | Submit lines of SAS language statements.
method FlushLog | Flush log lines that were spooled by program execution.
method FlushLogLines | Flush log lines that were spooled by program execution.
method FlushList | Flush list lines that were spooled by program execution.
method FlushListLines | Flush list lines that were spooled by program execution.
method ResetLogLineNumbers | Set the next log line number back to 1.
method Continue | Restarts execution of a suspended LanguageService component.
method Reset | Resets the LanguageService to an initial state.
method Cancel | Interrupts the current program execution frame.
attribute FlushLogPerStep |

Java Classes
ILanguageService_1_1Helper | Used to manipulate the ILanguageService_1_1 type
ILanguageService_1_1Holder | Used to process the ILanguageService_1_1 type as an out parameter
LineType | Indicates the line type for each line.
LineTypeHelper | Used to manipulate the LineType type
LineTypeHolder | Used to process the LineType type as an out parameter
LineTypeSeqHelper | Used to manipulate one dimensional arrays of the LineType type
LineTypeSeqHolder | Used to process one dimensional arrays of the LineType type as an out parameter
VariableArray2dOfLineTypeHelper | Used to manipulate two dimensional arrays of the LineType type
VariableArray2dOfLineTypeHolder | Used to process two dimensional arrays of the LineType type
CarriageControl | Indicates carriage control for each line.
CarriageControlHelper | Used to manipulate the CarriageControl type
CarriageControlHolder | Used to process the CarriageControl type as an out parameter
CarriageControlSeqHelper | Used to manipulate one dimensional arrays of the CarriageControl type
CarriageControlSeqHolder | Used to process one dimensional arrays of the CarriageControl type as an out parameter
VariableArray2dOfCarriageControlHelper | Used to manipulate two dimensional arrays of the CarriageControl type
VariableArray2dOfCarriageControlHolder | Used to process two dimensional arrays of the CarriageControl type

Java Interfaces
ILanguageService_1_1 | A service for submitting SAS language and obtaining output from the SAS list and log.

Java Interface ILanguageService

A service for submitting SAS language and obtaining output from the SAS list and log.

Package com.sas.iom.SAS

ILanguageService Description
This component provides access to the services of the SAS 4GL programming language. Those services include the ability to submit SAS language source code originating with the client, execute SAS language source code stored in a server repository, and receive SAS language execution feedback and results information.

`public interface ILanguageService
extends org.omg.CORBA.Object`

Method Summary

void | Submit ( java.lang.String stmts ) throws ( GenericError ); Submit operation
void | SubmitLines ( java.lang.String[] stmts ) throws ( GenericError ); Submit lines of SAS language statements.
java.lang.String | FlushLog ( int numCharsRequested ) throws ( GenericError ); Flush log lines that were spooled by program execution.
void | FlushLogLines ( int numLinesRequested , CarriageControlSeqHolder carriageControls , LineTypeSeqHolder lineTypes , StringSeqHolder logLines ) throws ( GenericError ); Flush log lines that were spooled by program execution.
java.lang.String | FlushList ( int numCharsRequested ) throws ( GenericError ); Flush list lines that were spooled by program execution.
void | FlushListLines ( int numLinesRequested , CarriageControlSeqHolder carriageControls , LineTypeSeqHolder lineTypes , StringSeqHolder listLines ) throws ( GenericError ); Flush list lines that were spooled by program execution.
void | ResetLogLineNumbers () Set the next log line number back to 1.
void | Continue () Restarts execution of a suspended LanguageService component.
void | Reset () Resets the LanguageService to an initial state.
void | Cancel () Interrupts the current program execution frame.

Java Class ILanguageServiceHelper

public class ILanguageServiceHelper

Description
Implementing class for methods (insert, extract, type, id, read, write, narrow) used to manipulate the ILanguageService type.

    java.lang.Object
      |
      +--com.sas.iom.SAS.ILanguageServiceHelper

Java Class ILanguageServiceHolder

public class ILanguageServiceHolder

Description
Implementing class for methods (_read, _write, _type) used to process the ILanguageService type as an out parameter.

    java.lang.Object
      |
      +--com.sas.iom.SAS.ILanguageServiceHolder

CORBA Enum LineType

Indicates the line type for each line.

Description
For FlushLogLines and FlushListLines, an output array contains values that indicate the line type for each line that is returned.

Usage

Member | Description
--- | ---
LineTypeNormal | The line is a normal or data line.
LineTypeHilighted | The line is a header or highlighted line.
LineTypeSource | The line is a source code line.
LineTypeTitle | The line is a title line.
LineTypeByline | The line is a byline.
LineTypeFootnote | The line is a footnote line.
LineTypeError | The line is an error message line.
LineTypeWarning | The line is a warning message line.
LineTypeNote | The line is a note line.
LineTypeMessage | The line is an informatory message line.

Java Class LineType

public class LineType

    java.lang.Object
      |
      +--com.sas.iom.SAS.ILanguageService_1_0Package.LineType

Java Class LineTypeHelper

public class LineTypeHelper

Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate the LineType type.

    java.lang.Object
      |
      +--com.sas.iom.SAS.ILanguageService_1_0Package.LineTypeHelper

Java Class LineTypeHolder

public class LineTypeHolder

Description
Implementing class for methods (_read, _write, _type) used to process the LineType type as an out parameter.

    java.lang.Object
      |
      +--com.sas.iom.SAS.ILanguageService_1_0Package.LineTypeHolder

Java Class LineTypeSeqHelper

public class LineTypeSeqHelper

Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate singly dimensioned arrays of LineType type.

    java.lang.Object
      |
      +--com.sas.iom.SAS.ILanguageService_1_0Package.LineTypeSeqHelper

Java Class LineTypeSeqHolder

public class LineTypeSeqHolder

Description
Implementing class for methods (_read, _write, _type) used to process singly dimensioned arrays of the LineType type as an out parameter.

    java.lang.Object
      |
      +--com.sas.iom.SAS.ILanguageService_1_0Package.LineTypeSeqHolder

Java Class VariableArray2dOfLineTypeHelper

public class VariableArray2dOfLineTypeHelper

Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate doubly dimensioned arrays of LineType type.

    java.lang.Object
      |
      +--com.sas.iom.SAS.ILanguageService_1_0Package.VariableArray2dOfLineTypeHelper

Java Class VariableArray2dOfLineTypeHolder

public class VariableArray2dOfLineTypeHolder

Description
Implementing class for methods (_read, _write, _type) used to process doubly dimensioned arrays of the LineType type as an out parameter.

    java.lang.Object
      |
      +--com.sas.iom.SAS.ILanguageService_1_0Package.VariableArray2dOfLineTypeHolder

CORBA Enum CarriageControl

Indicates carriage control for each line.

Description
For FlushLogLines and FlushListLines, an output array contains values that indicate the carriage control for the corresponding line.

The carriage control indicator that is returned for a line reflects the carriage control preceding that line. For example, the line which is indicated as having a formfeed is the first line of a new page (not the final line of the previous page). Also, OverPrint indicates that the corresponding line overprints the previous line.

Usage

Member | Description
--- | ---
CarriageControlNormal | This line follows the preceding line in the normal way.
CarriageControlNewPage | This line is at the beginning of a new page.
CarriageControlOverPrint | This line overprints the preceding line.
CarriageControlSkipLine | One additional empty line should be added before this line.
CarriageControlSkipTwoLines | Two additional empty lines should be added before this line.

Java Class CarriageControl

public class CarriageControl

    java.lang.Object
      |
      +--com.sas.iom.SAS.ILanguageService_1_0Package.CarriageControl

Java Class CarriageControlHelper

public class CarriageControlHelper

Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate the CarriageControl type.

    java.lang.Object
      |
      +--com.sas.iom.SAS.ILanguageService_1_0Package.CarriageControlHelper

Java Class CarriageControlHolder

public class CarriageControlHolder

Description
Implementing class for methods (_read, _write, _type) used to process the CarriageControl type as an out parameter.

    java.lang.Object
      |
      +--com.sas.iom.SAS.ILanguageService_1_0Package.CarriageControlHolder

Java Class CarriageControlSeqHelper

public class CarriageControlSeqHelper

Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate singly dimensioned arrays of CarriageControl type.

    java.lang.Object
      |
      +--com.sas.iom.SAS.ILanguageService_1_0Package.CarriageControlSeqHelper

Java Class CarriageControlSeqHolder

public class CarriageControlSeqHolder

Description
Implementing class for methods (_read, _write, _type) used to process singly dimensioned arrays of the CarriageControl type as an out parameter.

    java.lang.Object
      |
      +--com.sas.iom.SAS.ILanguageService_1_0Package.CarriageControlSeqHolder

Java Class VariableArray2dOfCarriageControlHelper

public class VariableArray2dOfCarriageControlHelper

Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate doubly dimensioned arrays of CarriageControl type.

    java.lang.Object
      |
      +--com.sas.iom.SAS.ILanguageService_1_0Package.VariableArray2dOfCarriageControlHelper

Java Class VariableArray2dOfCarriageControlHolder

public class VariableArray2dOfCarriageControlHolder

Description
Implementing class for methods (_read, _write, _type) used to process doubly dimensioned arrays of the CarriageControl type as an out parameter.

    java.lang.Object
      |
      +--com.sas.iom.SAS.ILanguageService_1_0Package.VariableArray2dOfCarriageControlHolder

CORBA Attribute Parent (readonly)

Parent Workspace attribute

Description
This attribute allows you to navigate back to the Workspace of this LanguageService component.

Usage

Java Method Parent

    public IWorkspace Parent ();

CORBA Attribute Async

Asynchronous execution attribute

Description
This attribute controls the blocking or non-blocking mode associated with the Submit, SubmitLines, Execute, and ExecuteWithResults methods. If false, the client is blocked in the method call until the associated program source frame has completed execution. If true, control returns as soon as the program source frame is queued for execution; your client program receives notification for completion of the submitted frame of program source via the SubmitComplete event.

Usage

Java Method Async

    public boolean Async ();
    public void Async ( boolean Async );

CORBA Attribute SuspendOnError

SuspendOnError control attribute

Description
This attribute controls the behavior of the LanguageService when a step error is encountered. Use of this feature requires that the LanguageService be in asynchronous mode (see Async).

When this attribute is set to false, the asynchronous (background) processing of submitted SAS language statements continues after an error is encountered. When it is set to true, processing is suspended.

Notification of the step error can be received via the StepError event. Once suspended, processing will not proceed until either the Continue operation or the Reset operation is executed.

The iom client code needs to explicitly catch the StepError event before calling the Continue operation and before submitting any new source code. That is, the call to Continue needs to be synchronized with the StepError event. Failing to do so might result in the server not being suspended properly and not sending back proper submitComplete events for following submits.

Usage

Java Method SuspendOnError

    public boolean SuspendOnError ();
    public void SuspendOnError ( boolean SuspendOnError );

CORBA Attribute LineSeparator

The line separator character or characters used by the flush methods when returning multiple lines in a single string.

Description
The line separator character or characters that are used by the flush methods when returning multiple list or log lines in a single output string. Clients typically want either a single linefeed (LF) or a carriage return (CR) followed by a linefeed (LF).

Usage

Java Method LineSeparator

    public java.lang.String LineSeparator ();
    public void LineSeparator ( java.lang.String LineSeparator );

CORBA Attribute StoredProcessService (readonly)

StoredProcessService attribute

Description
This attribute provides access to the StoredProcessService component for executing stored processes. A stored process is a SAS language program stored on a server. See documentation of that component for details.

Usage

Java Method StoredProcessService

    public IStoredProcessService StoredProcessService ();

CORBA Method Submit

Submit operation

Description
Submit SAS language statements provided by the client. Lines in the source buffer may be separated by carriage return and/or newline characters (that is C-language '\r' and '\n' respectively). The maximum length for a single line is 6000 bytes.

Usage

Java Method Submit

`void` Submit (

        java.lang.String stmts
        )
        throws (
                GenericError
        );

Parameter Details

Parameter | Direction | Type | Description
--- | --- | --- | ---
stmts | in | java.lang.String | Source statement buffer. The maximum source statement line length is 6000 characters.

Example

CORBA Method SubmitLines

Submit lines of SAS language statements.

Description
This operation submits an array containing lines of SAS language. The input array contains an element for each line of the program to be executed. The maximum length for a single line is 6000 bytes.

Usage

Java Method SubmitLines

`void` SubmitLines (

        java.lang.String[] stmts
        )
        throws (
                GenericError
        );

Parameter Details

Parameter | Direction | Type | Description
--- | --- | --- | ---
stmts | in | java.lang.String[] | Source statement lines array. The maximum source statement line length is 6000 characters.

Example

CORBA Method FlushLog

Flush log lines that were spooled by program execution.

Description
This operation retrieves log lines that were spooled by program execution. A buffer of characters not exceeding the "numCharsRequested" parameter is returned. The LineSeparator string or other carriage control (such as formfeed) is inserted between lines. These lines are flushed from the server's spool. Subsequent calls will return subsequent lines.

Usage

Java Method FlushLog

`java.lang.String` FlushLog (

        int numCharsRequested
        )
        throws (
                GenericError
        );

Parameter Details

Parameter | Direction | Type | Description
--- | --- | --- | ---
numCharsRequested | in | int | Specifies an upper limit on number of characters to be returned. This number should not be excessively large because a buffer of this size is allocated in the server.

Example

CORBA Method FlushLogLines

Flush log lines that were spooled by program execution.

Description
This operation retrieves log lines that were spooled by program execution. An array of lines not exceeding the "numLinesRequested" parameter is returned. This output array contains the log lines that were retrieved. These lines are flushed from the server's spool. Subsequent calls will return subsequent lines.

Usage

Java Method FlushLogLines

`void` FlushLogLines (

        int numLinesRequested ,
        CarriageControlSeqHolder carriageControls ,
        LineTypeSeqHolder lineTypes ,
        StringSeqHolder logLines
        )
        throws (
                GenericError
        );

Parameter Details

Parameter | Direction | Type | Description
--- | --- | --- | ---
numLinesRequested | in | int | Specifies an upper limit on number of lines to be returned.
carriageControls | out | CarriageControlSeqHolder | An array that indicates carriage control for each line returned.
lineTypes | out | LineTypeSeqHolder | An array that indicates the line type for each line returned.
logLines | out | StringSeqHolder | Contains the SAS log output lines retrieved by this call. When this returned array is shorter than requested size, all current log output has been flushed.

Example

CORBA Method FlushList

Flush list lines that were spooled by program execution.

Description
This operation retrieves list lines that were spooled by program execution. A buffer of characters not exceeding the "numCharsRequested" parameter is returned. The LineSeparator string or other carriage control (such as formfeed) is inserted between lines. These lines are flushed from the server's spool. Subsequent calls will return subsequent lines.

Usage

Java Method FlushList

`java.lang.String` FlushList (

        int numCharsRequested
        )
        throws (
                GenericError
        );

Parameter Details

Parameter | Direction | Type | Description
--- | --- | --- | ---
numCharsRequested | in | int | Specifies an upper limit on number of characters to be returned. This number should not be excessively large because a buffer of this size is allocated in the server.

Example

CORBA Method FlushListLines

Flush list lines that were spooled by program execution.

Description
This operation retrieves list lines that were spooled by program execution. An array of lines not exceeding the "numLinesRequested" parameter is returned. This output array contains the list lines that were retrieved. These lines are flushed from the server's spool. Subsequent calls will return subsequent lines.

Usage

Java Method FlushListLines

`void` FlushListLines (

        int numLinesRequested ,
        CarriageControlSeqHolder carriageControls ,
        LineTypeSeqHolder lineTypes ,
        StringSeqHolder listLines
        )
        throws (
                GenericError
        );

Parameter Details

Parameter | Direction | Type | Description
--- | --- | --- | ---
numLinesRequested | in | int | Specifies an upper limit on number of lines to be returned.
carriageControls | out | CarriageControlSeqHolder | An array that indicates carriage control for each line returned.
lineTypes | out | LineTypeSeqHolder | An array that indicates line type for each line returned.
listLines | out | StringSeqHolder | Contains the SAS list output lines retrieved by this call. When this returned array is shorter than requested size, all current list output has been flushed.

Example

CORBA Method ResetLogLineNumbers

Set the next log line number back to 1.

Description
This operation resets both log line numbering and log page numbering back to 1.

Usage

Java Method ResetLogLineNumbers

`void` ResetLogLineNumbers ( )

Example

CORBA Method Continue

Restarts execution of a suspended LanguageService component.

Description
The Continue operation operates in tandem with the SuspendOnError attribute. The operation is used to continue asynchronous (background) execution of the LanguageService's current execution frame when it is suspended by an error condition. This situation can occur if the SuspendOnError attribute is true.

If SuspendOnError is false, then calling this operation has no effect, since the LanguageService has not been suspended.

Usage

Java Method Continue

`void` Continue ( )

Example

CORBA Method Reset

Resets the LanguageService to an initial state.

Description
This operation resets the LanguageService to an initial state with respect to token scanning. Use it to extricate the LanguageService from an error state associated with the execution of invalid syntax or incomplete program source. This operation also results in suspended execution proceeding normally.

Usage

Java Method Reset

`void` Reset ( )

Example

CORBA Method Cancel

Interrupts the current program execution frame.

Description
This operation cancels the current program execution frame. A program execution frame is the SAS language source that is submitted in one method call. The cancellation might be delayed until execution reaches a subsequent step boundary. The LanguageService state is also reset (see Reset).

Usage

Java Method Cancel

`void` Cancel ( )

Example

ILanguageService_1_1 Description

`public interface ILanguageService_1_1
Extends ILanguageService`

Method Summary

Java Class ILanguageService_1_1Helper

public class ILanguageService_1_1Helper

Description
Implementing class for methods (insert, extract, type, id, read, write, narrow) used to manipulate the ILanguageService_1_1 type.

    java.lang.Object
      |
      +--com.sas.iom.SAS.ILanguageService_1_1Helper

Java Class ILanguageService_1_1Holder

public class ILanguageService_1_1Holder

Description
Implementing class for methods (_read, _write, _type) used to process the ILanguageService_1_1 type as an out parameter.

    java.lang.Object
      |
      +--com.sas.iom.SAS.ILanguageService_1_1Holder

CORBA Attribute FlushLogPerStep

Description

Usage

Java Method FlushLogPerStep

    public boolean FlushLogPerStep ();
    public void FlushLogPerStep ( boolean FlushLogPerStep );