ActiveX AS/400 Objects - Overview


HKEY_LOCAL_MACHINE\Software\CMI\ActiveX_AS400_Objects

 

Name Overview description
Command Executes native AS/400 commands.
Communications CA/400 environment and connection values and status.
DataQ Contains native AS/400 data queue support.
Program Calls native AS/400 programs with support for parameters.
ProgramParm Contents of a single program parameter. See note.
ProgramParms Contents of all program parameters. See note.
Spoolfile Relates to a single native AS/400 spoolfile.
Spoolfiles Relates to a list of native AS/400 spoolfiles.
SQL Executes read-only DB2/400 compliant data retrieval.
SQLColumn Contents of a single column in record retrieval. See note.
SQLColumns Contents of all columns in recordset retrieval. See note.
StatusWindow User supplied logging and message display.

 

Note on ProgramParms, ProgramParm, SQLColumns and SQLColumn:

These classes are defined as 'public not creatable' classes by design. They are made public for type definition only. These classes are created through Program and SQL classes.

 

  • Classes contain properties and methods that pertain to design and logic. Each class can be referenced within ActiveX compliant applications such as Microsoft Access, Word, Excel and Active Server Pages. VB and VBA applications must first reference this object before execution. See application documentation for object referencing information. Many applications have similar coding syntax therefore the following coding examples are provided here:

Visual Basic, VBA

Dim oDQ As ActiveX_AS400.DataQ

Dim sDQRecv as string

 

Set oDQ = new ActiveX_AS400.DataQ

oDQ.LibraryName = "QGPL"

oDQ.QueueName = "TESTDQ"

oDQ.WaitTime = 1 'second

sDQRecv = oDQ.ReadQ

Active Server Pages

Dim oDQ

Dim sDQRecv

Set oDQ = Server.CreateObject("ActiveX_AS400.DataQ")

oDQ.LibraryName = "QGPL"

oDQ.QueueName = "TESTDQ"

oDQ.WaitTime = 1 'second

sDQRecv = oDQ.ReadQ

  • Each class contains one or more properties. Each property contains a value of information or status indication. Some values can be modified and some are read-only. Properties all have a data type.

 

  • Methods execute internal routines and may return a value. Many methods require passing of parameter variables. Many do not. Some methods support optional parameters allowing for ease and personal preferences. Methods that return a value all have a data type.
  • Types are numeric, date, alphanumeric or boolean (true or false) values. All types defined within this object are Visual Basic data types. Numeric types include Integer, Long, Double, Currency and Date. Alphanumeric type is simply a variable length ANSI string. Boolean types are provided for logic and status flags.
  • On Windows NT Server, DCOMCNFG can be run to require operating system to launch this object as the interactive user. Windows services such as IIS require this override to provide for interactive AS/400 logons and object status displays.
2003 - Chouinard & Myhre, Inc.