Creating an .mfdirset file

You can create your own .mfdirset file and reference it in your project settings, build configuration, folder, and file properties.

Directive set references are a useful way of having a set of files which use directives that the application needs for different groups of programs.

Use the following .mfdirset schema and modify the elements as required. Alternatively, you could copy an existing .mfdirset and modify that, for example, copy Program1.cbl.mfdirset to Program2.cbl.mfdirset:

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
   targetNamespace="http://microfocus.com/directivesset"
   xmlns:tns="http://microfocus.com/directivesset"
   elementFormDefault="qualified" 
   version="1.0">

	<xs:annotation>
		<xs:appinfo>Directives set definition</xs:appinfo>
		<xs:documentation xml:lang="en">This schema defines the
			format of the directives set files
		</xs:documentation>
	</xs:annotation>

	<xs:element name="dirset" type="tns:dirsetType"/>

	<xs:complexType name="dirsetType">
		<xs:annotation>
			<xs:documentation xml:lang="en">Root element type
			</xs:documentation>
		</xs:annotation>
		<xs:sequence minOccurs="1" maxOccurs="unbounded">
			<xs:sequence minOccurs="0" maxOccurs="unbounded">
				<xs:element ref="tns:reference" />
			</xs:sequence>
			<xs:sequence minOccurs="0" maxOccurs="unbounded">
				<xs:element ref="tns:directive" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="tns:ecm" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="tns:preprocessor" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="tns:category" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
		</xs:sequence>
		<xs:attribute name="schemaVersion" type="xs:decimal" use="required" fixed="1.0">
			<xs:annotation>
				<xs:documentation xml:lang="en">Schema version used to create the directives set.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>

	<xs:element name="reference">
		<xs:annotation>
			<xs:documentation xml:lang="en">Reference to another
				directives set
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="file" type="xs:string" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="en">Location of another
						directives set file. Path can be relative to referring file.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>
		</xs:complexType>
	</xs:element>

	<xs:element name="directive">
		<xs:annotation>
			<xs:documentation xml:lang="en">An individual directive
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="id" type="xs:string" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="en">Unique identifier of
						the directive. If possible the id should match the name of the
						directive within the relevant settings.xml file (for example,
						plisettings.xml). Where the directive is not defined in the
						settings xml any unique string may be used. Note: This id string is
						used when matching directives to IDE GUI elements.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="name" type="xs:string" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="en">The name of the
						directive. Used to create the command-line directive.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

			<xs:attribute name="value" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">The value of the
						directive, will be appended to the name to form the command-line
						directive.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

			<xs:attribute name="no" type="xs:boolean" use="optional"
				default="false">
				<xs:annotation>
					<xs:documentation xml:lang="en">Set to true if the
						directive should be prefixed with NO. For example, NOWARNING.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

			<xs:attribute name="handler" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">The id of the directive handler. Used to categorize the directive within the UI.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

		</xs:complexType>
	</xs:element>

	<xs:element name="preprocessor">
		<xs:annotation>
			<xs:documentation xml:lang="en">A single integrated
				preprocessor
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="tns:directive" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="id" type="xs:string" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="en">The identifier of
						the preprocessor. This is the name of the preprocessor For example, "Micro Focus - CP Preprocessor". The id forms a namespace
						with ecm and category elements such that other elements with the same id can override settings.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

			<xs:attribute name="vendor" type="xs:string"
				use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">
						Vendor identifier, may be used to pair the
						directive with registry settings.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

			<xs:attribute name="enabled" type="xs:boolean"
				default="true" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">
						True if the integrated preprocessor is enabled.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

			<xs:attribute name="stackable" type="xs:boolean"
				default="true" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">
						True if the integrated preprocessor supports
						stacking with other preprocessors.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

			<xs:attribute name="bgpEnabled" type="xs:boolean"
				default="true" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">
						True if the integrated preprocessor can be used
						whilst background parsing, this is true if the
						CP preprocessor is used to read the source code
						rather than the preprocessor directly access the
						source files.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

			<xs:attribute name="location" type="xs:string"
				use="required">
				<xs:annotation>
					<xs:documentation xml:lang="en">
						The PREPROCESS directive including the location
						of the preprocessor to use to invoke the
						preprocessor. Excludes the preprocessor's own
						directives and terminating ENDP directive
						<br />
						For example, p(location)
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

			<xs:attribute name="directives" type="xs:string"
				use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">
						One of this attribute or the use of directive elements is required. The directives for the preprocessor specified by
						the location attribute. Excludes the ENDP
						directive.
						<br />
						For example, prep-dir1 prep-dir2
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

			<xs:attribute name="handler" type="xs:string"
				use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">
						The id of the directive handler. Used to
						categorize the directive within the UI.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

			<xs:attribute name="editable" type="xs:boolean"
				default="true" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">
						True if the integrated preprocessor can be
						edited within the UI.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

			<xs:attribute name="predefinedId" type="xs:integer"
				default="0" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">
						Identifier of the predefined preprocessor, may
						be used to pair the directive with registry
						settings. Set to 0 when the preprocessor was
						defined within the UI rather than being
						predefined by the system.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

		</xs:complexType>

	</xs:element>

	<xs:element name="ecm">
		<xs:annotation>
			<xs:documentation xml:lang="en">A single external
				compiler module
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="tns:directive" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="id" type="xs:string" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="en">Unique ECM identifier. The id forms a namespace
						with preprocessor and category elements such that other elements with the same id can override settings
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

			<xs:attribute name="prefix" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">Prefix to the ECM
						command-line directives. For example, "SQL(". Output before any ECM
						directives. Different values would be specified for PL/I and COBOL
						directives sets, for example, the PL/I equivalent might be -sql odbc
						-optsql"
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

			<xs:attribute name="postfix" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">Suffix to the ECM
						command-line directives. For example, ")". Output after any ECM
						directives. Different values would be specified for PL/I and COBOL
						directives sets, for example, the PL/I equivalent might be "
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

			<xs:attribute name="handler" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">The id of the directive handler. Used to categorize the directive within the UI.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

			<xs:attribute name="enabled" type="xs:boolean" default="true" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">True if the ecm is enabled. If false the child directive elements are not used unless another 
					instance of the element in another dirset file overrides the setting to true.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

		</xs:complexType>
	</xs:element>

	<xs:element name="category">
		<xs:annotation>
			<xs:documentation xml:lang="en">A group of directives which can be enabled and disabled
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="tns:directive" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="id" type="xs:string" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="en">Unique category identifier. The id forms a namespace
						with ecm and preprocessor elements such that other elements with the same id can override settings
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

			<xs:attribute name="handler" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">The id of the directive handler. Used to categorize the directive within the UI.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

			<xs:attribute name="enabled" type="xs:boolean" default="true" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="en">True if the category is enabled. If false the child directive elements are not used unless another 
					instance of the element in another dirset file overrides the setting to true.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>

		</xs:complexType>
	</xs:element>

</xs:schema>