Remote Segment Descriptions

SEGTYPEs KLU and KL specify unique and non-unique segments for which the aggregate fields are remotely described in another Master File. In other words, a KLU or KL segment contains no field information. Its fields are fully defined in another Master File. The CRFILE attribute specifies the source or remote Master File. At execution time, the remote field descriptions are, in effect, copied into the current Maste File.

KLU and KL segment types are used when several Master Files are constructed for the same IDMS subschema. They save typing and maintenance effort. Use KLU if the underlying segment is unique (U), KL if the underlying segment is non-unique (S). Remote descriptions have no logical implications regarding parent/descendant relationships nor do they impact their implementation.


Top of page

Example: Specifying a Remote Segment Description

The following example illustrates how to specify a remote description:

SEGMENT=SALES,PARENT=DEPT,SEGTYPE=KL,CRFILE=RECORDS,$

To specify a remote description, you must give the KLU or KL segment the same name as the source segment in the remote Master File to ensure the proper use of field descriptions. The source Master File is specified as the CRFILE value.

This segment declaration indicates that the field descriptions for the SALES segment are obtained from the SALES segment in the RECORDS Master File. The SEGTYPE for the SALES segment in the RECORDS Master cannot be KL or KLU, it must be U or S. Only field names and their attributes from the source file are used. Original segment attributes are not. The source file does not have to be a Master File as long as it describes the named segment.


Information Builders