MMCC MASTHEAD


INDEX
ALSO SEE:

v1.10
Mid-Michigan Computer Consultants, Inc.
509 Center
Bay City, Michigan

Sales (989) 892-9242             Support (989) 686-8860

ANSI Standard PL/B Language
GETINFO
NOTE TO OUR READERS
This web resource is written for our own use. But we feel strongly that the PL/B language should be shared with the software community. So feel free to use this at will! BUT PLEASE... if you find errors or omissions or have a better way to do something. TELL US! Dialog helps us all. Send e-mail to: support@mmcctech.com

GETMODE: [label] GETMODE {list}={value}[,{list}={value},...]
See the article on GETMODE.
CLOCK:
See the article on CLOCK.
GETINFO: [label] GETINFO {keyword},{dest}[,{option}]
This has a variety of useful functions.

The {dest} operand specifies the variable that receives the requested information. It may be either a string variable or a DATALIST object.

The various KEYWORDS follow. This text is basically what's in the PL/B reference but it's reorganized . . . we put the keyword specific options right below the keywords.
  • DATASOURCE the ODBC database sources and descriptions that are available. {dest} must be a DATALIST object. If a string variable is specified, nothing is returned.

  • EXCEPTION the exception error data after an O145 error has occurred. value is a DIM variable whose physical size is 490 characters and whose data is supplied by the failing control.
    Column  Size    Value
    1       10      OBJECTID property value of object causing the problem.
    11      10      is an error code identifying the error.
                    Error codes should be greater than 1000.
                    The value may be zero.
    21      100     is a textual, human-readable name of the source
                    of the exception error.  Typically, this is an
                    application name.  This field is blank if no name
                    is available.
    121     100     is a textual, human-readable description of the
                    error intended for the customer.  If no description
                    is available, this is blank.
    221     260     The fully qualified drive, path, and file name of
                    a Help file with more information about the error.
                    If no Help is available, this field is blank.
    481     10      The Help context ID of the topic within the Help file.
                    This field should be filled in only when the Help File
                    field contains a filename.  Otherwise, this field is zero.
    


  • FONTS the available Windows display fonts. {dest} may be a DATALIST object or a string variable. If {dest} is a string variable, the default font is returned.

  • PRINTERS the Windows printers into a DATALIST object or a string variable. If {dest} is a string variable, the default printer name is returned.

  • SYSTEM information about the Windows operating system as follows:
    Column	Size	Value
    1   1   Operating system type
        1 = Windows
    2   1   Operating system version
        0 = unknown 
        1 = Windows NT
        2 = WIN32s Windows 3.1x (obsolete)
        3 = Window 95
        4 = Window 985 = Windows 20006 = Windows XP8 = Windows CE
    3   2   Keyboard type
    5   2   Keyboard subtype
    7   2   Function key type
    9   1   Pen based ? (1 = Yes)
    10  1   Mouse present ? (1 = Yes)
    11  1   Number of mouse buttons
    12  1   Mouse buttons swapped ? (1 = Yes)
    13  4   Screen width
    17  4   Screen height
    21  15  Computer name
    36  20  User name
    56  260 Windows directory
    316 260 Windows system directory
    576 2   Color bits
    578 4   Window handle (INTEGER)
    582 4   Window instance (INTEGER)
    586 1   0 - no taskbar
        1 - Taskbar hidden
        2 - Taskbar always on top
        3 - Normal Taskbar
    587 4   Taskbar Top
    591 4   Taskbar Bottom
    595 4   Taskbar Left
    599 4   Taskbar Right
    


  • TYPE={dbfile} information about a specific DBFILE variable.
    • COLUMNS={table} This option is only allowed for the TYPE={dbfile} form of the statement. {table} must be a string variable or literal containing the name of the table.
      The GETINFO instruction retrieves the following information when the TYPE keyword specifies a DBFILE and the COLUMNS={table} keyword is specified:
      Column  Size  Value
      1       128   Column name
      129     62    Column type
      191     5     Type number
      196     5     Precision
      201     5     Length
      206     5     Scale or Radix
      211     1     Fill
      212     254   Remarks
      
    • CONNECTION This option is only allowed for the TYPE={dbfile} form of the statement. The GETINFO instruction retrieves the following information when the TYPE keyword specifies a DBFILE and the CONNECTION keyword is used:
      Column  Size  Value
      1       5     ODBC version
      6       20    Driver name
      26      10    Driver version
      36      5     Driver ODBC version
      41      1     ODBC API level
      42      1     SQL support level
      43      1     File usage
      44      1     Access mode
      45      1     Auto commit enabled
      46      1     Trace enabled
      47      1     SQL cursor support
      48      1     Transaction support
      49      100   Fill
      149     100   Qualifier
      
    • STATEMENT This option is only allowed for the TYPE={dbfile} form of the statement. The GETINFO instruction retrieves the following information when the TYPE keyword specifies a DBFILE and the STATEMENT keyword is used:
      Column  Size  Value
      1       1     SQL level
      2       1     SQL Concurrency
      3       1     Cursor type
      4       8     Keyset size
      12      8     Maximum length
      20      8     Maximum rows
      
    • TABLES This option is only allowed for the TYPE={dbfile} form of the statement.
      The GETINFO instruction retrieves the following information when the TYPE keyword specifies a DBFILE and the TABLES keyword is used:
      Column  Size  Value
      1       128   Table Name
      129     128   Type
      257     128   Owner
      385     128   Qualifier
      513     254   Remarks
      
    The GETINFO instruction retrieves the following information when the TYPE keyword specifies a DBFILE:
    Column  Size  Value
    1       1     SQL level
    2       1     Read only
    3       1     Accessible tables
    4       1     Add columns
    5       1     Drop columns
    6       1     Correlation name support
    7       1     Column alias support
    8       1     Procedure support
    9       1     Procedures accessible
    10      1     Identifier case
    11      1     Quoted identifier case
    12      1     Search character escape
    13      1     Outer joins
    14      1     Expressions in Order By clause
    15      1     Order By columns in Select
    16      1     Group By support
    


  • TYPE={font} information about a specific FONT object.
    • PRINTER={pfile} This option is only allowed when the TYPE={font} specifies a FONT object or for the FONTS keyword. This option specifies that the font information is retrieved relative to an opened {pfile} instead of the screen. For the FONTS keyword, the printer fonts are returned to the {dest} DATALIST.
    • UNITS={unitid} This option allows specification of the units used or returned for this GETINFO statement. A value of CURRENT uses the current units in use for a device context. Other available values are LOENGISH, HIENGLISH, LOMETRIC, HIMETRIC, PIXELS, and TWIPS. The UNITS option is only available for the SYSTEM, TYPE={pfile} or TYPE={font} keywords.


    The GETINFO instruction retrieves the following information when the TYPE keyword specifies a Font Object. Note that the {dest} parameter in this case is both used as an input and an output variable. The parameter provides an input character string for which a pixel string width is determined relative to the {font} being used. This pixel string width is then reported in the GETINFO results. In this case, the input {dest} character string is replaced by the GETINFO result fields.
    Column  Size   Value
    1       4      Ascent - Pixels above the baseline for a character.
    5       4      Descent - Pixels below the baseline for a character.
    9       4      Height - The height of a character (ascent + descent).
    13      4      Full Height - The full height of a character (height
                   + external leading/space).
    17      4      Average character width - Generally this is defined
                   by the width of the letter 'x'.
    21      4      Maximum character width - The width of the widest
                   character in the font.
    25      4      The font string width - The number of pixels a user
                   supplied string requires for the font.  This value is
                   truncated to be a four digit number.
    29      1      The first character in font - The value of the first
                   character defined for the font.
    30      1      The last character in font - The value of the last
                   character defined for the font.
    31      8      The number of pixels that a user supplied string
                   requires for the font.  This value is truncated to be
                   an eight digit number.
    


  • TYPE={pfile} information about a specific PFILE variable.
    • UNITS={unitid} This option allows specification of the units used or returned for this GETINFO statement. A value of CURRENT uses the current units in use for a device context. Other available values are LOENGISH, HIENGLISH, LOMETRIC, HIMETRIC, PIXELS, and TWIPS. The UNITS option is only available for the SYSTEM, TYPE={pfile} or TYPE={font} keywords.


    The GETINFO instruction retrieves the following information when the TYPE keyword specifies a PFILE:
    Column	Size	Value
    1       8     Current Printer Driver version
    9       8     Page width in pixels
    17      8     Page height in pixels
    25      8     Page width in millimeters
    33      8     Page height in millimeters
    41      8     Number of color bits per pixel
    49      8     Number of device specific fonts
    57      1     Can Print Pictures ? (Y or N)
    58      4     User specified copies specified by user (future)
    62      1     Print All Pages (Y or N)
    63      1     Print Selection Only (Y or N)
    64      8     Print dialog start page value
    72      8     Print dialog end page value
    80      1     Print Alignment Right (Y or N)
    81      1     Print Alignment Decimal (Y or )
    82      1     Fill On Enabled (Y or N)
    83      1     Pict Rectangle Enabled (Y or N)
    84      1     Overlay Enabled (Y or N)
    85      4     Number of characters in Printer Name
    89      31    Printer name
    120     10    Print orientation as follows
            1 = Portrait
            2 = Landscape
    130     10    Paper size as follows:
            1 = Letter, 8 1/2- by 11-inch
            2 = Letter Small, 8 1/2- by 11-inch
            3 = Tabloid, 11- by 17-inch
            4 = Ledger, 17- by 11-inch
            5 = Legal, 8 1/2- by 14-inch
            6 = Statement, 5 1/2- by 8 1/2-inch
            7 = Executive, 7 1/4- by 10 1/2-inch
            8 = A3 sheet, 297- by 420-mm
            9 = A4 Sheet, 210- by 297-mm
            10 = A4 small sheet, 210- by 297-mm
            11 = A5 sheet, 148- by 210-mm
            12 = B4 sheet, 250- by 354-mm
            13 = B5 sheet, 182- by 257-mm
            14 = Folio, 8 1/2- by 13-inch
            15 = Quarto, 215- by 275-mm
            16 = 10- by 14-inch
            17 = 11- by 17-inch
            18 = Note, 8 1/2- by 11-inch
            19 = #9 Envelope, 3 7/8- by 8 7/8-inch
            20 = #10 Envelope, 4 1/8- by 9 1/2-inch
            21 = #11 Envelope, 4 1/2- by 10 3/8-inch
            22 = #12 Envelope, 4 3/4- by 11-inch
            23 = #14 Envelope, 5- by 11 1/2-inch
            24 = C Sheet, 17- by 22-inch
            25 = D Sheet, 22- by 34-inch
            26 = E Sheet, 34- by 44-inch
            27 = DL Envelope, 110- by 220-mm
            28 = C5 Envelope, 162- by 229-mm
            29 = C3 Envelope, 324- by 458-mm
            30 = C4 Envelope, 229- by 324-mm
            31 = C6 Envelope, 114- by 162-mm
            32 = C65 Envelope, 114- by 229-mm
            33 = B4 Envelope, 250- by 353-mm
            34 = B5 Envelope, 176- by 250-mm
            35 = B6 Envelope, 176- by 125-mm
            36 = Italy Envelope, 110- by 230-mm
            37 = Monarch Envelope, 3 7/8- by 7 1/2-inch
            38 = 6 3/4 Envelope, 3 5/8- by 6 1/2-inch
            39 = US Standard Fanfold, 14 7/8- by 11-inch
            40 = German Standard Fanfold, 8 1/2- by 12-inch
            41 = German Legal Fanfold, 8 1/2 by 13-inch
            256= Custom user defined
    140     10    Custom paper length in 10ths of mm
    150     10    Custom paper width in 10ths of mm
    160     10    Printed output scaling factor
    170     10    Number of copies printed if multi-page copies supported
    180     10    Paper feed source as follows:
            1 = Upper tray or only one
            2 = Lower tray
            3 = Middle tray
            4 = Manual
            5 = Envelope
            6 = Envelope Manual
            7 = Auto
            8 = Tractor feed
            9 = Small FMT
            10 = Large FMT
            11 = Large Capacity
            14 = Cassette
            15 = Form source
    190     10     Print quality as follows:
            -1 = Draft
            -2 = Low
            -3 = Medium
            -4 = High
            nnn = Dots per inch when positive
            200	10	Color usage as follows:
            1 = Monochrome
            2 = Color
    210     10    Type of double sided print as follows:
            1 = Simplex
            2 = Vertical
            3 = Horizontal
    220     10    Copies being collated as follows
            0 = No
            1 = Yes
    230     8     Current vertical print position
    238     8     Current horizontal print position
    
ALSO SEE:

CONTENTS

v1.10
Send e-mail to MMCC.

Write to MMCC Technical Support at:
MMCC, Inc.
600 W. Midland
Bay City, MI 48708
(989) 686-8860
| Home   |

© 1997 MMCC, Inc. All Rights Reserved.

Report problems or suggestions to support@mmcctech.com