Access Files for DATACOM

How to:

Reference:

Each Master File must have a corresponding Access File. The file name of the Access File must be the same as that used for the Master File.

The Access File serves as a link between the server and DATACOM. It stores such information as the URT name, DATACOM Database ID(s), DATACOM table name(s), keyname(s), and element security information. In addition, the Access File provides you with the TRACE parameter, a useful debugging tool.

The Access File contains four types of logical records:

Each consists of a list of keyword and value pairs, separated by commas and terminated by a comma and dollar sign (,$). The list is free-form and may span several lines; keywords may be in any order.


Top of page

x
Syntax: How to Use the Header Logical Record

The header record contains these attributes

[USERTABLE=urt_name
 [,TRACE={NO|CBS}]
 [,SEQACCESS=[NO|YES}]
 [,FOUNDIMIT=nnnnnn]
 [,REJECTLIMIT=nnnnnn]
,$]

where:

urt_name

Is the name of the load module that supplies the DATACOM User Requirements Table (URT) information to be dynamically loaded. The URT must contain all the database IDs and file specified in the Master File, or you will not have access to the records.

This attribute is generated when you create a synonym based in a specified URT.

TRACE

NO indicates no trace. NO is the default value.

CBS sets the accumulation of Compound Boolean Selection (CBS) diagnostics to PXX by making "$$$" the first 3 bytes of the User Information Block for each Datacom command.

This attribute is generated when you create a synonym based on the specified URT.

SEQACCESS

NO provides access to the root segment as stipulated in the request. This value is the default.

Note: While SEQACCESS is a valid keyword, it is supported for backward compatibility and must be added to the Access File manually. You can perform the same function in the connection string using the SKIPSELECT option.

YES provides sequential access to the root segment in the Access File even if logical criteria exist for the segment.

However, if a join connection has been defined to the root segment, a selection command is used.

FOUNDLIMIT/REJECTLIMIT

Enable you to set interrupt limits to monitor the process of record selection. Accepted (Found) or Rejected records are physical records that either satisfy or do not satisfy the provided search values for non-indexed fields.

nnnnnn

Is the number of Interrupt Records rejected or accepted (found). When this number is reached, selection terminates. This value is applied for all segments of the Access File.

If required, you can add these attributes to the Access File manually.


Top of page

x
Syntax: How to Use the Segment Logical Record

The segment record contains these attributes

SEGNAME=segname 
 ,{DBID=dbid|CONNECTION=connection_name} 
 ,TABLENAME=tablename 
 ,KEYNAME=keyname 
[,KEYFLD=keyfld, IXFLD=ixfld,]
[,FOUNDLIMIT=nnnnnn]
[,REJECTLIMIT=nnnnnn]
,$

where:

segname

Identifies the segment name. The Master File SEGMENT attribute is the same as the SEGNAME attribute in the Access File.

dbid

Identifies the numeric DATACOM database ID.

This attribute is generated when you create a synonym based on a specified URT.

connection_name

May be used in the Access file on the segment level. The value of this keyword is the valid connection _name that was previously set by the SET CONNECTION_ATTRIBUTES command.

Connection is used in the Access File only when the file level keyword USERTABLE is omitted. Otherwise, connection information is ignored.

Values for the keywords USERTABLE, DBID, TRACE, and SEQACCESS (or SKIPSELECT) are taken from the connection string and used for the current segment only.

This attribute is generated when you create a synonym based on a specified connection.

tablename

Identifies the 3-byte DATACOM table name to which the segment identified by SEGNAME corresponds. You can find this name in the DATA DICTIONARY Element Field Report, under DBNAME.

keyname

Is the 5-character alphanumeric name of the key being used in sequential access commands (GSETL/GETIT). The key name is defined in the Data dictionary KEY entity-occurrence field DATACOM-NAME.

For fastest sequential retrieval, specify the Native Key, which is in the DATA DICTIONARY Indented Report, where MN stands for mandatory native. If the KEYNAME value is not provided, records are processed in the physical sequence using the GSETP/GETPS commands. If a key other than the Native Key is specified, the data is internally requested. (Note that Random retrieval is slower than sequential retrieval.)

Note: KEYNAME does not have to be the native key. If you wish to use a different keyname, that is acceptable. However, be aware that you may not get all the records.

keyfld

Is the server field name from the parent segment of a cross-reference; it is mandatory for everything but the root segment. You may also specify multiple field names, concatenated with the forward slash symbol (/) without blanks. The keyword value must be contiguous, and on the same line. The key list can span multiple lines.

If required, you can add this attribute to the Access File manually.

ixfld

Is the server field name in the cross-referenced segment that establishes the cross-reference. It is mandatory for all but the root segment. The value(s) of these field(s) must have USAGE and ACTUAL formats comparable to the KEYFLD.

You may also specify multiple field names, concatenated with the forward slash symbol (/) without blanks. The keyword value may not span more than one line. The key list can span multiple lines.

If required, you can add this attribute to the Access File manually.

FOUNDLIMIT/REJECTLIMIT

Enable you to set interrupt limits to monitor the process of record selection. Accepted (Found) or Rejected records are physical records that either satisfy or do not satisfy the provided search values for non-indexed fields.

nnnnnn

Is the number of Interrupt Records rejected or accepted (found). When this number is reached, selection terminates. This value is applied only to the designated segment.

If required, you can add these attributes to the Access File manually.


Top of page

x
Syntax: How to Use the Element Logical Record

You must specify an element logical record if an element is defined to DATACOM with a security code.

The element record contains these attributes

ELEMENTNAME=element, SECURITY=hh ,$

where:

element

The 5-byte name of the element.

hh

The two-position hexadecimal value of the 1-byte DATACOM security code.

If the Data Dictionary contains a value for the element, this attribute is automatically generated in the Access File when you create a synonym.


Top of page

x
Syntax: How to Use the Field Logical Record

The field record contains these attributes

FIELD=fieldname, SIGN={Y|N}, TYPE={C|P|U|Q} ,$

where:

SIGN

Has the same value as the option SIGN associated with this field in the Data Dictionary. Valid values are:

Y indicates signed fields. This is the default value.

indicates unsigned fields.

TYPE

Has the same value as the option TYPE-NUMERIC associated with this field in the Data Dictionary. The synonym is automatically generated with the correct numeric type:

to indicate a conventional signed field (either positive or negative). Data must have the sign C for a positive signed fields and D for a negative signed fields.

to indicate a conventional signed positive field. Data must have the sign C.

U to indicate an unconventional signed field (either positive or negative). Data may have the unconventional signs A, B, or E. This is the default value.

to indicate an unconventional signed positive field. Data may have the unconventional signs A or E.

Note: This attribute is generated when you create a synonym based on the specified URT or Connection.


Top of page

x
Reference: Access File Attributes

The following chart lists Access File attributes generated during synonym creation. Note that attributes vary depending on whether the synonym is generated based on a user requirements table or a connection string.

Keyword

Description

CONNECTION

May be used in the Access file on the segment level. The value of this keyword is the valid connection _name that was previously set by the SET CONNECTION_ATTRIBUTES command.

Connection is used in the Access File only when the file level keyword USERTABLE is omitted. Otherwise, connection information is ignored.

Values for the keywords USERTABLE, DBID, TRACE, and SEQACCESS (or SKIPSELELCT) are taken from the connection string and used for the current segment only.

Note: This attribute is generated when you create a synonym based on a specified connection.

For related syntax, see How to Use the Segment Logical Record.

DBID

Identifies the numeric, 5-byte DATACOM database ID. It can be 5 digits with a maximum of 5000 values.

Values for DBID are taken from the connection string. They will be used for the current segment only.

Note: This attribute is generated when you create a synonym based on a specified URT.

For related syntax, see How to Use the Segment Logical Record.

ELEMENTNAME SECURITY

You must specify an element logical record if an element is defined to DATACOM with a security code.

If the Data Dictionary contains a value for the element, this attribute is automatically generated in the Access File when you create a synonym.

For related syntax, see How to Use the Element Logical Record.

FIELD

You must specify a field logical record if a file has a numeric (N) or decimal (D) Datacom data type.

For related syntax, see How to Use the Field Logical Record.

FOUNDLIMIT

REJECTLIMIT

You can set interrupt limits to monitor the process of record selection. Accepted (Found) or Rejected records are physical records that either satisfy or do not satisfy the provided search values for non-indexed fields.

If required, you can add these attributes to the Access File manually.

For related syntax, see How to Use the Header Logical Record and How to Use the Segment Logical Record.

IXFIELD

Is the server field name in the cross-referenced segment that establishes the cross-reference. It is mandatory for all but the root segment. The value(s) of these field(s) must have USAGE and ACTUAL formats comparable to the KEYFLD.

You may also specify multiple field names, concatenated with the forward slash symbol (/) without blanks. The keyword value may not span more than one line. The key list can span multiple lines.

If required, you can add this attribute to the Access File manually.

For related syntax, see How to Use the Segment Logical Record.

KEYNAME

Is a 5-character alphanumeric name of the key being used in the sequential access commands (GSETL and GETIT). The key name is defined in the Data Dictionary KEY entity-occurrence field, DATACOM-NAME.

For fastest sequential retrieval, specify the Native Key, which is in the Data Dictionary Indented Report, where MN stands for mandatory native. If the KEYNAME value is not provided, records are processed in the physical sequence using the commands GSETP/GETPS commands. If a key other than the Native key is specified, the data is internally requested. (Note that Random retrieval is slower than sequential retrieval.)

KEYNAME does not have to be the native key. You may assign a different keyname, however, if you do so you may not get all the records.

For related syntax, see How to Use the Segment Logical Record.

KEYFIELD

Is the server field name from the parent segment of a cross-reference; it is mandatory for everything but the root segment. You may also specify multiple field names, concatenated with the forward slash symbol (/) without blanks. The keyword value must be contiguous, and on the same line. The key list can span multiple lines.

If required, you can add this attribute to the Access File manually.

For related syntax, see How to Use the Segment Logical Record.

SEGNAME

Identifies the segment name. The Master File SEGMENT attribute is the same as the SEGNAME attribute in the Access File.

For related syntax, see How to Use the Segment Logical Record.

SEQACCESS

While SEQACCESS is a valid keyword, it is supported for backward compatibility and must be added to the Access File manually. You can perform the same function in the connection string using the SKIPSELECT option.

Values for SEQACCESS are taken from the connection string. They will be used for the current segment only.

For related syntax, see How to Use the Header Logical Record.

TRACE

Enables you to set the accumulation of Compound Boolean Selection (CBS) diagnostics to the DATACOM diagnostics file (PXX) by making "$$$" the first 3 bytes of the User Information Block for each Datacom command.

Note: This attribute is generated when you create a synonym based on the specified URT.

For related syntax, see How to Use the Header Logical Record.

TABLENAME

Identifies the 3-byte DATACOM table name to which the segment identified by SEGNAME corresponds. You can find this name in the DATA DICTIONARY Element Field Report, under DBNAME.

For related syntax, see How to Use the Segment Logical Record.

USERTABLE

Identifies the load module that supplies the DATACOM User Requirements Table (URT) information to be dynamically loaded. The URT must contain all the database IDs and file specified in the Master File, or you will not have access to the records.

Values for the keyword USERTABLE are taken from the connection string. They will be used for the current segment only.

Note: This attribute is generated when you create a synonym based in a specified URT.

For related syntax, see How to Use the Header Logical Record.



Example: Access Files Generated by URT and Connection

This Access File was generated with the URT option on the Create Synonym pane.

USERTABLE=ALXURT, TRACE=NO, $ 
 SEGNAME=ORDERS, TABLENAME=ORD, DBID=10, KEYNAME=ORDID, $
  FIELD=ORD_ID,      SIGN=N, TYPE=C, $
  FIELD=ORD_ID1,     SIGN=N, TYPE=C, $
  FIELD=ORD_ID2,     SIGN=N, TYPE=C, $
  FIELD=DISC_PCT,    SIGN=Y, TYPE=C, $
  FIELD=ORDER_TOTAL, SIGN=Y, TYPE=C, $
  FIELD=FRT_AMT,     SIGN=Y, TYPE=C, $
  FIELD=ORD_AMT,     SIGN=Y, TYPE=C, $

This Access file was generated with the Connection option on the Create Synonym pane.

SEGNAME=TABLEA, TABLENAME=CAT, CONNECTION=CON02, KEYNAME=NATKY, $
  ELEMENTNAME=ALEX1, SECURITY=e1, $
  FIELD=READING1, SIGN=N, TYPE=C, $
  FIELD=PATMRN,   SIGN=N, TYPE=C, $
  ELEMENTNAME=ALEX2, SECURITY=e2, $
  ELEMENTNAME=ALEX3, SECURITY=e3, $

WebFOCUS