SESSION system handle

A handle to the current ABL session object. This object allows you to read and modify the current ABL session context.

Syntax

SESSION [ :attribute | :method ]
attribute
Specifies an attribute of the SESSION system handle.
method
Specifies a method of the SESSION system handle.

Attributes

APPL-ALERT-BOXES attribute BASE-ADE attribute
BATCH-MODE attribute CHARSET attribute
CLIENT-TYPE attribute CONTEXT-HELP-FILE attribute
CPCASE attribute CPCOLL attribute
CPINTERNAL attribute CPLOG attribute
CPPRINT attribute CPRCODEIN attribute
CPRCODEOUT attribute CPSTREAM attribute
CPTERM attribute CURRENT-REQUEST-INFO attribute
CURRENT-RESPONSE-INFO attribute DATA-ENTRY-RETURN attribute
DATE-FORMAT attribute DEBUG-ALERT attribute
DISPLAY-TIMEZONE attribute DISPLAY-TYPE attribute
ERROR-STACK-TRACE attribute EXECUTION-LOG attribute
EXIT-CODE attribute FIRST-BUFFER attribute
FIRST-CHILD attribute FIRST-DATASET attribute
FIRST-DATA-SOURCE attribute FIRST-FORM attribute
FIRST-OBJECT attribute FIRST-PROCEDURE attribute
FIRST-QUERY attribute FIRST-SERVER attribute
FIRST-SERVER-SOCKET attribute FIRST-SOCKET attribute
FRAME-SPACING attribute HANDLE attribute
HEIGHT-CHARS attribute HEIGHT-PIXELS attribute
ICFPARAMETER attribute IMMEDIATE-DISPLAY attribute
INHERIT-BGCOLOR attribute INHERIT-FGCOLOR attribute
INSTANTIATING-PROCEDURE attribute LAST-CHILD attribute
LAST-FORM attribute LAST-OBJECT attribute
LAST-PROCEDURE attribute LAST-SERVER attribute
LAST-SERVER-SOCKET attribute LAST-SOCKET attribute
LOCAL-VERSION-INFO attribute MULTITASKING-INTERVAL attribute
NEXT-SIBLING attribute NUMERIC-DECIMAL-POINT attribute
NUMERIC-FORMAT attribute NUMERIC-SEPARATOR attribute
PARAMETER attribute PIXELS-PER-COLUMN attribute
PIXELS-PER-ROW attribute PRINTER-CONTROL-HANDLE attribute
PRINTER-HDC attribute PRINTER-NAME attribute
PRINTER-PORT attribute PROXY-PASSWORD attribute
PROXY-USERID attribute REMOTE attribute
SCHEMA-CHANGE attribute SERVER-CONNECTION-BOUND attribute
SERVER-CONNECTION-BOUND-REQUEST attribute SERVER-CONNECTION-CONTEXT attribute
SERVER-CONNECTION-ID attribute SERVER-OPERATING-MODE attribute
STARTUP-PARAMETERS attribute STREAM attribute
SUPER-PROCEDURES attribute SUPPRESS-WARNINGS attribute
SUPPRESS-WARNINGS-LIST attribute SYSTEM-ALERT-BOXES attribute
THREE-D attribute TIME-SOURCE attribute
TIMEZONE attribute TOOLTIPS attribute
TYPE attribute V6DISPLAY attribute
WC-ADMIN-APP attribute WIDTH-CHARS attribute
WIDTH-PIXELS attribute WINDOW-SYSTEM attribute
WORK-AREA-HEIGHT-PIXELS attribute WORK-AREA-WIDTH-PIXELS attribute
WORK-AREA-X attribute WORK-AREA-Y attribute
YEAR-OFFSET attribute TEMP-DIRECTORY attribute

Methods

Example

The following example uses the SESSION:IMMEDIATE-DISPLAY attribute. When dumping or loading records from the database, the procedure displays a running count of records. If IMMEDIATE-DISPLAY is false, no value is shown until all records are dumped or loaded. At that point, the total is shown. To prevent this, IMMEDIATE-DISPLAY is set to true just before the dump or load and then reset to false afterwards.

r-dstrig.p

DEFINE VARIABLE i AS INTEGER NO-UNDO.

DEFINE SUB-MENU file
  MENU-ITEM viewit LABEL "&View Data"
  MENU-ITEM dumpit LABEL "&Dump Data"
  MENU-ITEM loadit LABEL "&Load Data".
  MENU-ITEM exit   LABEL "E&xit".
DEFINE MENU mbar MENUBAR
  SUB-MENU file LABEL "&File".

DEFINE BUTTON b_more LABEL "Next".
DEFINE BUTTON b_exit LABEL "Cancel".

DEFINE FRAME cust-frame
  Customer.CustNum SKIP
  Customer.Name SKIP
  Customer.Phone SKIP
  b_more b_exit
  WITH CENTERED SIDE-LABELS ROW 3.

DEFINE STREAM cust.

PAUSE 0 BEFORE-HIDE.

ON CHOOSE OF b_exit IN FRAME cust-frame DO:
  HIDE FRAME cust-frame NO-PAUSE.
  DISABLE ALL WITH FRAME cust-frame.
  LEAVE.
END.  

ON CHOOSE OF b_more IN FRAME cust-frame DO:
  FIND NEXT Customer NO-LOCK NO-ERROR.
  IF NOT AVAILABLE Customer THEN
    RETURN.
  DISPLAY Customer.CustNum Customer.Name Customer.Phone
    WITH FRAME cust-frame.
END.

ON CHOOSE OF MENU-ITEM viewit DO:
  ENABLE ALL WITH FRAME cust-frame.
  FIND FIRST Customer NO-LOCK NO-ERROR.
  DISPLAY Customer.CustNum Customer.Name Customer.Phone 
    WITH FRAME cust-frame.
  APPLY "ENTRY" TO b_more.
END.

ON CHOOSE OF MENU-ITEM dumpit DO:
  DISABLE TRIGGERS FOR DUMP OF Customer.
  ix = 1.
  SESSION:IMMEDIATE-DISPLAY = TRUE.

  OUTPUT STREAM cust TO "customer.d".
  FOR EACH Customer NO-LOCK:
    EXPORT STREAM cust Customer.
    DISPLAY ix LABEL "Records Processed" 
      WITH FRAME rec-info SIDE-LABELS ROW SCREEN-LINES / 2 CENTERED.
    ix = ix + 1.
  END.
  SESSION:IMMEDIATE-DISPLAY = FALSE.
  OUTPUT STREAM cust CLOSE.
END.

ON CHOOSE OF MENU-ITEM loadit DO:
  DISABLE TRIGGERS FOR LOAD OF Customer.
  INPUT FROM "customer.d".
  SESSION:IMMEDIATE-DISPLAY = TRUE.
  REPEAT:
    CREATE Customer.
    IMPORT Customer.
    DISPLAY ix LABEL "Records Processed"
      WITH FRAME rec-info SIDE-LABELS ROW SCREEN-LINES / 2 CENTERED.
    ix = ix + 1.
  END.
  INPUT CLOSE.
  SESSION:IMMEDIATE-DISPLAY = FALSE.
END.

IF NOT RETRY THEN
ASSIGN CURRENT-WINDOW:MENUBAR = MENU mbar:HANDLE
       CURRENT-WINDOW:VISIBLE = TRUE.

WAIT-FOR CHOOSE OF MENU-ITEM exit.

Notes

See also

NextForm property, PrevForm property, Progress.Windows.FormProxy class, Progress.Windows.Form class, Progress.Windows.IForm interface