Contents Developing Java Clients  

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 acccess to the services of the SAS System 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 repostitory, 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.


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 acccess to the services of the SAS System 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 repostitory, 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.


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 hilighted 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

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

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, 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 features requires that the LanguageService be in asynchronous mode (see Async).

When this attribute is set to false, the asyncrhonous (background) processing of submitted SAS lanaguage statememts 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 the Continue operation is executed.

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).

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.  


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.

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.  


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.  


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.  


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.  


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.  


CORBA Method ResetLogLineNumbers

Set the next log line number back to 1.

Description
This operation resets log line numbering back to 1.

Usage

Java Method ResetLogLineNumbers

void ResetLogLineNumbers ( )


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 ( )


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.

Usage

Java Method Reset

void Reset ( )


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 ( )


Contents Developing Java Clients