Access Files for Model 204

In this section:

How to:

Reference:

Each Master File for a Model 204 file must have a corresponding Access File. The name of the Access File must be the same as that of the Master File. In z/OS, the Access File PDS is allocated to ddname ACCESS in the server JCL. The Access File associates a segment in the Master File with the Model 204 logical record type it describes.

The Access File consists of account, segment, and field declarations. The Access File minimally identifies account and segment information and field suffix operators. It can also contain field declarations for aliases that exceed 66 characters.

In multi-segment structures, the Access File must contain a segment declaration for each logical record type described in the Master File. Segment information may include Embedded Joins and Model 204 record type fields. The order of segment declarations in the Access File must correspond to the order in the Master File.

The Access File consists of 80 character declarations in comma-delimited format. Rules for declarations are:

For example, the VEHICLE Access File contains one segment declaration because the VEHICLE Master File contains only one logical record type.

The following sections summarize the syntax for each type of declaration and provide detailed explanations for each attribute.


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

ALIAS

Full Model 204 field name, if its length exceeds 66 bytes.

TYPE

Model 204 key field type.

ATTRIBUTE

ATTRIBUTE will incorporate Model 204 FOR EACH VALUE processing on a BY field in a server COUNT request. The field defined with ATTRIBUTE=FRV must be a Model 204 Ordered field or a Model 204 KEY/FRV field.

ACCDATA

ACCDATA will instruct the adapter to generate either character string or numeric HLI selection tests for Model 204 fields that do not have a Model 204 key specification (Non-Ordered, Non-KEY, Non-Numeric Range).



x
Syntax: How to Enter an Account Declaration

The account declaration indicates authorization to access Model 204 files. At most, one account declaration is required; if included, it must be the first declaration in the Access File

[[ACCOUNT=userid[account], ACCOUNTPASS=password,] IFAMCHNL=channel ,$]

where:

userid

Is the user ID of 1-10 characters by which you are known to Model 204.

account

Is a string of 1-10 characters to be used only if an account under which the user will log in to Model 204 must be supplied.

password

Is the 1- to 16-character password for the account.

channel

Is the 1- to 8-character site specific CRAM channel name. The default is IFAMPROD for z/OS.


Top of page

x
Reference: ACCOUNT and ACCOUNTPASS Attributes

The ACCOUNT and ACCOUNTPASS attributes describe Model 204 accounts, user IDs, and passwords. They protect Model 204 files from unauthorized access. The account must have authorization to read the Model 204 file or group.

You can omit the ACCOUNT and ACCOUNTPASS attributes from the declaration if you:


Top of page

x
Reference: IFAMCHNL Attribute

The IFAMCHNL attribute describes the CRAM channel name for z/OS. You must specify the CRAM channel if more than one ONLINE or IFAM2 job is running or if the CRAM channel name is not IFAMPROD. For the channel name used at your site, check with your Model 204 database administrator or the IFAM2 systems support staff.

If the attribute CONNECTION is provided in the segment declaration, the channel name is taken from the appropriate SET CONNECTION_ATTRIBUTES command.


Top of page

x
Syntax: How to Enter a Segment Declaration

The segment declaration in the Access File establishes the link between the server Master File and the Model 204 file or group. Attributes that constitute the segment declaration are: SEGNAME, FILE, PASS, CONNECTION, KEYFLD, IXFLD, RECTYPE, RECTVAL, and ACCESS. Values for SEGNAME, FILE, and PASS are required. The attributes KEYFLD and IXFLD apply to multi-segment structures. The ACCESS attribute applies to OCCURS segments

SEGNAME=name, FILE=m204file, PASS=password [,CONNECTION=connection_name]
  [,KEYFLD=pfield] [,IXFLD=cfield] [,RECTYPE=rtfield] [,RECTVAL=rtvalue]
  ,ACCESS={ALL|nnnn[/xxx]|AUTO[/xxx]}

where:

name

Is the SEGNAME value from the Master File.

m204file

Is the 1- to 8-character name for the Model 204 file.

password

Is the 1- to 8-character read password for the Model 204 file. The value can be blank if a password does not exist.

connection_name

Is the valid connection that was previously set by the SET CONNECTION_ATTRIBUTES command.

pfield

Is the field name of the common field from the parent segment, and is used to implement the Join relationship. It is required in dependent segment declarations for multi-segment structures.

cfield

Is the field name of the common field from the dependent segment, and is used to implement the Join relationship. It is required in dependent segment declarations for multi-segment structures.

rtfield

Is the field name for the Model 204 record type field that exists when a Model 204 file has several logical record types.

rtvalue

Is the value that identifies the Model 204 record type or a field name.

ALL
nnnn/xxx
AUTO/xxx

Indicates how OCCURS segments should be processed when all occurrences cannot fit into the buffer at once and a (FOC4883) IFMORE FAILED message results. ALL is the default value. These options are described in Access Files for Model 204.

Note:


Top of page

x
Reference: SEGNAME Attribute

The SEGNAME value must be the first attribute in each Access File segment declaration. It must be identical to the SEGNAME value in the Master File.


Top of page

x
Reference: FILE and PASS Attributes

The FILE and PASS attributes are required in each Access File segment declaration. They describe Model 204 file security information.

The value for the FILE attribute is the name of the Model 204 file or group that contains the logical record type. The value for the PASS attribute is either the read password associated with the Model 204 file or blank if the password does not exist. For both attributes, acceptable values are 1- to 8-character values.

Access Files can be encrypted to prevent access to this security information.


Top of page

x
Reference: CONNECTION Attribute

The CONNECTION attribute may be used in the Access File on the segment level. The value of this attribute is the valid connection_name that was previously set by the SET CONNECTION_ATTRIBUTES command. If this attribute is used in the Access File, the file-level parameters must be omitted or they will be overwritten by the value from the SET command.

SEGNAM=RNG, CONNECTION=M204, FILE=RNG, $
  FIELD=FKEY, TYPE=KEY, ATTRIBUTE=FRV, $
  FIELD=FORC, TYPE=KEY, $
  FIELD=FORN, TYPE=KEY, $
  FIELD=FRNG, TYPE=RNG, $

Top of page

x
Syntax: How to Declare KEYFLD and IXFLD

The KEYFLD and IXFLD attributes identify the common fields for parent/child relationships in a multi-segment Master File. These relationships are referred to as Embedded Joins, server views, or cross-references.

For each dependent segment, the KEYFLD and IXFLD attributes identify the field names of the common or shared field that implements the Embedded Join. The parent field supplies the value for cross-referencing; the dependent field contains the corresponding value. The adapter implements the relationship by matching values at run time.

The value for the KEYFLD attribute is a 1- to 66-character field or alias name from the parent segment. The value for the IXFLD attribute is a 1- to 66-character field or alias name from the dependent segment.

Note:

A JOIN can be based on more than one field in the host and cross-referenced logical record types. If the Model 204 file uses multiple fields to establish a relationship or link between logical record types, you can specify concatenated fields in an Embedded Join (you can also specify multiple fields with the Dynamic JOIN command).

In a multi-field Embedded Join, the KEYFLD and IXFLD values consist of a list of the component fields separated by slashes (/). Additional Access File attributes are not required.

KEYFLD = field1/field2/....
IXFLD = cfield1/cfield2/....

where:

fieldl/...

Is a composite of up to 16 key fields from the parent segment. Slashes are required.

cfieldl/...

Is a composite of up to 16 key fields in the dependent segment.

The adapter compares each field pair for comparable data formats prior to format conversion. It evaluates each field pair with the following rules:

To implement Joins, the Model 204 DBMS converts the alphanumeric server field formats to equivalent Model 204 field formats in order to perform the necessary search and match operations. When the Model 204 DBMS returns the answer set of matched values, it also converts the values back to alphanumeric formats.

Internally, each KEYFLD value is passed to the Model 204 DBMS in the IFFIND call to retrieve all matching records (segment instances) for the dependent segment.


Top of page

x
Syntax: How to Declare RECTYPE and RECTVAL

The RECTYPE and RECTVAL attributes identify the Model 204 record type field and its corresponding value. A Model 204 record type field exists in a Model 204 file description when the file has more than one logical record type. If the Model 204 file consists of one logical record type, it may contain an optional record type field.

The value for the RECTYPE attribute is the 1- to 66-character field or alias name of the Model 204 record type field. The value for the RECTVAL attribute is the identifying value for the record type field; it can be up to 255 characters in length or a field name. The RECTVAL attribute is required whenever the RECTYPE attribute is used.

The RECTYPE and RECTVAL attributes are required in each Access File segment declaration (including the one for the root) if the Model 204 file contains record types.

Note: Do not use the name RECTYPE as a field name in the Master File.


Top of page

x
ACCESS

How to:

Reference:

OCCURS segments are generally described only in the Master File and do not require corresponding segment declarations in the Access File. However, sometimes the number of occurrences retrieved for an OCCURS segment exceeds the Model 204 buffer capacity, causing an error condition. You can alter the processing of OCCURS segments by including a segment declaration in the Access File.

The Model 204 buffer is used to return data to IFAM2 applications. Buffer capacity is sometimes exceeded when both of the following conditions exist:

The size of the IFAMBS buffer is determined by a predefined formula:

IFAMBS := (LIBUFF * 7) + 284 s 32688

When the buffer capacity is exceeded, the Model 204 DBMS sends the adapter the following message:

IFMORE error M204.0903 - Results too long

This causes the server message:

(FOC4883) IFMORE FAILED

If you encounter this condition, you can include a segment declaration in the Access File to alter the number of occurrences retrieved. The adapter incorporates your specification in its HLI call to the DBMS.

An OCCURS segment declaration in an Access File consists of two attributes, SEGNAME and ACCESS. The ACCESS attribute indicates the type of processing to be performed.

SEGNAME=name, ACCESS={ALL|nnnn[/xxx]|AUTO[/xxx]} ,$

where:

name

Is the SEGNAME value for the OCCURS segment from the Master File.

ALL

Indicates that the adapter will attempt to retrieve all occurrences of the OCCURS segment. ALL is the default value.

Note: If the ACCESS attribute is omitted, the ALL setting is assumed.

nnnn

Specify the largest number of occurrences that exists for the multiply occurring field. Based on the nnnn value, the adapter may manipulate the length of the QTBL buffer for the user session and then reset it to its original length.

AUTO

Indicates that the adapter will retrieve up to 5000 occurrences. If there are more than 5000 occurrences, use nnnn instead of AUTO.

/xxx

Instructs the adapter to issue multiple IFMORE calls, with each call retrieving xxx occurrences. This parameter is optional.

Append to the nnnn or AUTO parameters to indicate that you want to control the number of records to be retrieved by each IFMORE call. If xxx is larger than the maximum allowed (based on the size of the buffers used by the Adapter for Model 204), you will receive the message:

(FOC4873) SPECIFIED NUMBER OF INSTANCES CANNOT FIT INTO BUFFER

To correct the problem, decrease the xxx value and rerun the request.

Note:



x
Syntax: How to Enter Field Declarations

Field declarations in the Access File provide an alternate method for describing certain Model 204 field characteristics. Include a field declaration if the Model 204 field has a Model 204 key designation or if the Model 204 field name (the ALIAS attribute) exceeds 66 characters.



x
Reference: Supporting Types of Key Fields

The Model 204 DBMS supports a variety of key field types. The adapter supports the Model 204 key designations with comparable abbreviations called suffix operators. You describe these operators with the TYPE attribute in the Access File. The actual Model 204 key designation determines the proper suffix operator to apply.

The following chart lists Model 204 key designations and the corresponding suffix operators.

Model 204 Key Designation

Master File Suffix Operator

Key

KEY

Key, invisible

IVK

Ordered Character

ORA

Ordered Numeric

ORN

Numeric Range

RNG

Numeric Range, invisible

IVR

Ordered Character, invisible

IOA

Ordered Numeric, invisible

ION

Note: Master Files created in earlier server releases may contain field declarations with suffix operators for Model 204 key fields. While this earlier method is supported, the recommended method is to specify suffix operators in the Access File.



x
Syntax: How to Declare Field Attributes in an Access File
FIELD=field [,ALIAS=m204field] [,TYPE=suffix] [,ATTRIBUTE=FRV],
  [ACCDATA= {STR|NUM}] ,$

where:

m204field

Is a Model 204 field name that exceeds 66 characters. 256 characters is the maximum amount.

Note: Omit the ALIAS attribute if the ALIAS attribute in the Master File already specifies the Model 204 field name.

suffix

Is one of the suffix operators KEY, IVK, ORA, ORN, RNG, IVR, IOA, ION.

FRV

This attribute value incorporates Model 204 FOR EACH VALUE processing on a BY field in a server COUNT request.

STR

This attribute value will generate character string HLI selection tests for Model 204 fields that do not have a Model 204 key specification (Non-Ordered, Non-KEY, Non-Numeric Range).

NUM

This attribute value will generate numeric HLI selection tests for Model 204 fields that do not have a Model 204 key specification (Non-Ordered, Non-KEY, Non-Numeric Range).

Two additional field attributes, ATTRIBUTE and ACCDATA are available:


iWay Software