AccessExt

Syntax

ACCESSEXT [ <Database> ] [ <locator> ] 
<Database> = DB1 | DB2 
<Locator> = <Find> | <Get> 
<Find> := FIND "<FindExpression>"
<Get> := GET "<GetExpression>" [ variable ]
<FindExpression> := [ FIRST | LAST | NEXT | PRIOR ] { database | dataset |
 index }[ expression | link ]
<GetExpression> := { database | dataset } { alphabetic_item | 
group_item |number_item | real_item | 
field_item | count_item | recordtype_item } [ [subscript] ]

Parameters

AccessExt can be abbreviated as AEXT.

Description

The AccessExt logic command is not supported on applications deployed to Windows. This command is valid for MCP-based systems only.

The AccessExt command enables an MCP-based system user to inquire on a different DMS II database. One or two databases might be named in the Segment/Environment configuration properties of each Configuration Set. The labels DB1 and DB2 are used to access these databases through the AccessExt command.

Two options are available: Find and Get. The Find option is used to access a data set, locate and read a particular record. The Get option moves a value from a record accessed by the Find option into an attribute. This value can then be manipulated by logic.

The System attribute Glb.Status is set to ***** if an exception occurs. The System attribute Glb.ExName and Glb.ExText provide information about the reason for the exception. Refer to A Series DMS II Interpretive Interfaces for more information on the description of the exception messages that might be used.

The DMS II Interpreter program DMINTERPRETER/ database must have been generated for the required database. It is your responsibility to ensure that this program matches the current version of your Specification. It is also your responsibility to ensure compatibility between the parameters of the AccessExt command and the structure of the database.

Notes:

  • The access provided by the AccessExt command requires more system resources than a normal database access.

  • The data names used must be the names as declared in the DASDL source.

  • You can use the AccessExt command to access another database (since Builder generates DMS II databases), but using the External method for an Ispec is the recommended method.

Examples

Example 1

The branch name for a customer is recorded in an existing DMS II database, and is required for validation in the System.

The database DB1 is expected to contain a dataset CUST, which contains at least CUSNAME and BRCHNAME Attributes. The CUST record for the required CUSTOMER is located and read. The GET command moves the BRCHNAME value to the Attribute SDBRANCH, where it can be used by other commands.

Move "CUST AT CUST-CUSNAME = \"" SDPARAM
Attach CUSTOMER SDPARAM
Attach "\"" SDPARAM
AccessExt DB1 Find SDPARAM
If GLB.STATUS = GLB.SPACES
        AccessExt DB1 Get "CUST CUST-BRCHNAME" SDBRANCH
        If BRANCH = SDBRANCH
                ...

Example 2

The DB2 database is expected to contain a dataset GOODPRINTERS, containing at least the DASDL Attribute PRINTER-NAME. The first record in GOODPRINTERS is located and read. The GET command moves the value of the first record in the DASDL Attribute PRINTER-NAME to SD-PRINTER for later processing.

Move "FIRST GOODPRINTERS" SD-PARAM
AccessExt DB2 Find SD-PARAM
If Glb.Status = Glb.Spaces
		    AccessExt DB2 Get "GOODPRINTERS PRINTER-NAME" SD-PRINTER
        ...