ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahh_5.4.0.1/pcmldttg.htm

434 lines
30 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="PCML data tag" />
<meta name="abstract" content="The PCML data tag can have the following attributes." />
<meta name="description" content="The PCML data tag can have the following attributes." />
<meta name="DC.Relation" scheme="URI" content="pcmlsyn.htm" />
<meta name="DC.Relation" scheme="URI" content="lengthprecisionrelative.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="pcmldttg" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>PCML data tag</title>
</head>
<body id="pcmldttg"><a name="pcmldttg"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">PCML data tag</h1>
<div><p>The PCML data tag can have the following attributes.</p>
<div class="section"><p> Attributes enclosed in brackets, [], indicate that the attribute
is optional. If you specify an optional attribute, do not include the brackets
in your source. Some attribute values are shown as a list of choices enclosed
in braces, {}, with possible choices separated by vertical bars, |. When you
specify one of these attributes, do not include the braces in your source
and only specify one of the choices shown.</p>
<pre><strong>&lt;data type=</strong><em>"{ char | int | packed | zoned | float | byte | struct }"</em>
<strong>[ bidistringtype</strong>="<em>{ ST4 | ST5 | ST6 | ST7 | ST8 | ST9 | ST10 | ST11 | DEFAULT }</em>"]
<strong>[ ccsid=</strong><em>"{ number | data-name }"</em><strong> ]</strong>
<strong>[ chartype=</strong>"<em>{ onebyte | twobyte }</em>"<strong>]</strong>
<strong>[ count=</strong><em>"{ number | data-name }"</em><strong> ]</strong>
<strong>[ init=</strong><em>"string"</em><strong> ]</strong>
<strong>[ length=</strong><em>"{ number | data-name }"</em><strong> ]</strong>
<strong>[ maxvrm=</strong><em>"version-string"</em><strong> ]</strong>
<strong>[ minvrm=</strong><em>"version-string"</em><strong> ]</strong>
<strong>[ name=</strong><em>"name"</em><strong> ]</strong>
<strong>[ offset=</strong><em>"{ number | data-name }"</em><strong> ]</strong>
<strong>[ offsetfrom=</strong><em>"{ number | data-name | struct-name }"</em><strong> ]</strong>
<strong>[ outputsize=</strong><em>"{ number | data-name | struct-name }"</em><strong> ]</strong>
<strong>[ passby=</strong><em> "{ reference | value }"</em><strong> ]</strong>
<strong>[ precision=</strong><em>"number"</em><strong> ]</strong>
<strong>[ struct=</strong><em>"struct-name"</em><strong> ]</strong>
<strong>[ trim=</strong><em>"{ right | left | both | none }"</em><strong> ]</strong>
<strong>[ usage=</strong><em>"{ inherit | input | output | inputoutput }"</em><strong> ]&gt;</strong>
<strong>&lt;/data&gt;</strong></pre>
<p>The following table lists the data tag attributes.
Each entry includes the attribute name, the possible valid values, and a description
of the attribute.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="border" border="1" rules="all"><thead align="left"><tr class="tablemainheaderbar"><th valign="top" width="33.33333333333333%" id="d0e152"><strong>Attribute</strong></th>
<th valign="top" width="33.33333333333333%" id="d0e155"><strong>Value</strong></th>
<th valign="top" width="33.33333333333333%" id="d0e158"><strong>Description</strong></th>
</tr>
</thead>
<tbody><tr><td valign="top" width="33.33333333333333%" headers="d0e152 "><strong>type=</strong></td>
<td valign="top" width="33.33333333333333%" headers="d0e155 "><em>char</em> where <em>char</em> indicates a character value. A <em> char</em> data
value is returned as a <em>java.lang.String</em>. For more information, see
the <a href="lengthprecisionrelative.htm#lengthprecisionrelative"><em>char</em> values
for length</a>. <p><em>int</em> where <em>int</em> is an integer value. An <em>int</em> data
value is returned as a <em>java.lang.Long</em>. For more information, see the
<a href="lengthprecisionrelative.htm#lengthprecisionrelative"><em>int</em> values
for length and precision</a>. </p>
<p><em>packed</em> where <em>packed</em> is
a packed decimal value. A <em>packed</em> data value is returned as a <em>java.math.BigDecimal</em>.
For more information, see the <a href="lengthprecisionrelative.htm#lengthprecisionrelative"><em>packed</em> values
for length and precision</a>. </p>
<p><em>zoned</em> where <em>zoned</em> is
a zoned decimal value. A <em>zoned</em> data value is returned as a <em>java.math.BigDecimal</em>.
For more information, see the <a href="lengthprecisionrelative.htm#lengthprecisionrelative"><em>zoned</em> values
for length and precision</a>. </p>
<p><em>float</em> where <em>float</em> is
a floating point value. The <strong> length</strong> attribute specifies the number
of bytes, "4" or "8". A 4-byte integer is returned as a <em>java.lang.Float</em>.
An 8-byte integer is returned as a <em>java.lang.Double</em>. For more information,
see the <a href="lengthprecisionrelative.htm#lengthprecisionrelative"><em>float</em> values
for length</a>. </p>
<p><em>byte</em> where <em>byte</em> is a byte value.
No conversion is performed on the data. A <em>byte</em> data value is returned
as an array of <em>byte</em> values (<em>byte[]</em>). For more information,
see the <a href="lengthprecisionrelative.htm#lengthprecisionrelative"><em>byte</em> values
for length</a>. </p>
<p><em>struct</em> where <em>struct</em> specifies the
name of the <strong> &lt;struct&gt;</strong> element. A <em>struct</em> allows you to define
a structure once and reuse it multiple times within the document. When you <strong>type=</strong><em>"struct"</em>,
it is as if the structure specified appeared at this location in the document.
A <em>struct</em> does not allow for a length value and has no value for precision.</p>
</td>
<td valign="top" width="33.33333333333333%" headers="d0e158 "><p>Indicates the type of data being used (character, integer, packed,
zoned, floating point, byte, or struct).</p>
<p>Values for the length and
precision attributes are different for different data types. For more information,
see the <a href="lengthprecisionrelative.htm#lengthprecisionrelative">Values
for length and precision</a>. </p>
</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e152 "><strong>bidistringtype=</strong></td>
<td valign="top" width="33.33333333333333%" headers="d0e155 "><p><em>DEFAULT</em> where DEFAULT is the <a href="javadoc/com/ibm/as400/access/BidiStringType.html#DEFAULT">default string type</a> for non-bidirectional data (LTR).</p>
<p><em>ST4</em> where <em>ST4</em> is <a href="javadoc/com/ibm/as400/access/BidiStringType.html#ST4">String
Type 4</a>.</p>
<p><em>ST5</em> where <em>ST5</em> is <a href="javadoc/com/ibm/as400/access/BidiStringType.html#ST5">String Type 5</a>.</p>
<p><em>ST6</em> where <em>ST6</em> is <a href="javadoc/com/ibm/as400/access/BidiStringType.html#ST6">String
Type 6</a>.</p>
<p><em>ST7</em> where <em>ST7</em> is <a href="javadoc/com/ibm/as400/access/BidiStringType.html#ST7">String Type 7</a>.</p>
<p><em>ST8</em> where <em>ST8</em> is <a href="javadoc/com/ibm/as400/access/BidiStringType.html#ST8">String
Type 8</a>.</p>
<p><em>ST9</em> where <em>ST9</em> is <a href="javadoc/com/ibm/as400/access/BidiStringType.html#ST9">String Type 9</a>.</p>
<p><em>ST10</em> where <em>ST10</em> is <a href="javadoc/com/ibm/as400/access/BidiStringType.html#ST10">String Type 10</a>.</p>
<p><em>ST11</em> where <em>ST11</em> is <a href="javadoc/com/ibm/as400/access/BidiStringType.html#ST11">String Type 11</a>.</p>
</td>
<td valign="top" width="33.33333333333333%" headers="d0e158 "><p>Specifies the bidirectional string type for <strong> &lt;data&gt;</strong> elements
with <strong> type=</strong><em>"char"</em>. If this attribute is omitted, string type
for this element is implied by the CCSID (whether explicitly specified or
the default CCSID of the host environment).</p>
<p>String types are defined
in the <a href="javadoc/com/ibm/as400/access/BidiStringType.html#NAVBAR_TOP"> javadoc for the BidiStringType class</a>.</p>
</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e152 "><strong>ccsid=</strong></td>
<td valign="top" width="33.33333333333333%" headers="d0e155 "><em>number</em> where <em>number</em> defines a fixed, never-changing CCSID.
<p><em>data-name</em> where <em>data-name</em> defines the name that will contain,
at runtime, the CCSID of the character data. The <em>data-name</em> specified
can be a fully qualified name or a name that is relative to the current element.
In either case, the name must reference a <strong>&lt;data&gt;</strong> element that
is defined with <strong> type=</strong><em>"int"</em>. See <a href="lengthprecisionrelative.htm#lengthprecisionrelative">Resolving
Relative Names</a> for more information on how relative names are resolved.</p>
</td>
<td valign="top" width="33.33333333333333%" headers="d0e158 ">Specifies the host Coded Character Set ID (CCSID) for character data
for the <strong>&lt;data&gt;</strong> element. The <strong> ccsid</strong> attribute can be specified
only for <strong> &lt;data&gt;</strong> elements with <strong> type=</strong><em>"char"</em>. <p>If
this attribute is omitted, character data for this element is assumed to
be in the default CCSID of the host environment.</p>
</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e152 "><strong>chartype=</strong></td>
<td valign="top" width="33.33333333333333%" headers="d0e155 "><p><em>onebyte</em> where <em>onebyte</em> specifies the size of each character.</p>
<p><em>twobyte</em> where <em>twobyte</em> specifies
the size of each character.</p>
<p>When using <em>chartype</em>, the <strong>length=</strong><em>"number"</em>
attribute specifies the number of characters, not the number of bytes.</p>
</td>
<td valign="top" width="33.33333333333333%" headers="d0e158 ">Specifies the size of each character.</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e152 "><strong>count=</strong></td>
<td valign="top" width="33.33333333333333%" headers="d0e155 "><em>number</em> where <em>number</em> defines a fixed, never-changing number
of elements in a sized array. <p><em>data-name</em> where <em>data-name</em> defines
the name of a <strong> &lt;data&gt;</strong> element within the PCML document that will
contain, at runtime, the number of elements in the array. The <em> data-name</em> specified
can be a fully qualified name or a name that is relative to the current element.
In either case, the name must reference a <strong>&lt;data&gt;</strong> element that
is defined with <strong>type=</strong><em>"int"</em>. See <a href="lengthprecisionrelative.htm#lengthprecisionrelative">Resolving
Relative Names</a> for more information on how relative names are resolved.</p>
</td>
<td valign="top" width="33.33333333333333%" headers="d0e158 ">Specifies that the element is an array and identifies the number of
entries in the array. <p>If the <em>count</em> attribute is omitted, the element
is not defined as an array, although it may be contained within another element
that is defined as an array.</p>
</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e152 "><strong>init=</strong></td>
<td valign="top" width="33.33333333333333%" headers="d0e155 "><em>string</em></td>
<td valign="top" width="33.33333333333333%" headers="d0e158 ">Specifies an initial value for the <strong> &lt;data&gt;</strong> element. The <em>init</em> value
is used if an initial value is not explicitly set by the application program
when <strong>&lt;data&gt;</strong> elements with <strong> usage=</strong><em>"input"</em> or <strong> usage=</strong><em>"inputoutput"</em>
are used. <p>The initial value specified is used to initialize scalar values.
If the element is defined as an array or is contained within a structure
defined as an array, the initial value specified is used as an initial value
for all entries in the array.</p>
</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e152 "><strong>length=</strong></td>
<td valign="top" width="33.33333333333333%" headers="d0e155 "><em>number</em> where <em>number</em> defines the number of bytes that
the data requires. However, when using the <em>chartype</em> attribute, <em>number</em> specifies
the number of characters, not the number of bytes. <p><em>data-name</em> where <em>data-name</em> defines
the name of a <strong> &lt;data&gt;</strong> element within the PCML document that will
contain, at runtime, the length. A <em>data-name</em> can be specified only
for <strong>&lt;data&gt;</strong> elements with <strong>type=</strong><em>"char"</em> or <strong> type=</strong><em>"byte"</em>.
The <em>data-name</em> specified can be a fully qualified name or a name that
is relative to the current element. In either case, the name must reference
a <strong> &lt;data&gt;</strong> element that is defined with <strong> type=</strong><em>"int"</em>.
See <a href="lengthprecisionrelative.htm#lengthprecisionrelative">Resolving
Relative Names</a> for more information on how relative names are resolved.</p>
</td>
<td valign="top" width="33.33333333333333%" headers="d0e158 ">Specifies the length of the data element. Usage of this attribute
varies depending on the data type. For more information, see the <a href="lengthprecisionrelative.htm#lengthprecisionrelative">Values
for length and precision</a>.</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e152 "><strong>maxvrm=</strong></td>
<td valign="top" width="33.33333333333333%" headers="d0e155 "><em>version-string</em></td>
<td valign="top" width="33.33333333333333%" headers="d0e158 ">Specifies the highest version of iSeries™ on which this element exists.
If the iSeries version
is greater than the version specified on this attribute, this element and
its children, if any exist, will not be processed during a call to a program.
This attribute is helpful for defining program interfaces which differ between
releases of iSeries.
<p>The syntax of the version string must be "VvRrMm", where the capitals
letters "V," "R," and "M" are literal characters and "v," "r," and "m" are
one or more digits representing the version, release and modification level.
The value for "v" must be from 1 to 255 inclusively. The value for "r" and
"m" must be from 0 to 255, inclusively.</p>
</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e152 "><strong>minvrm=</strong></td>
<td valign="top" width="33.33333333333333%" headers="d0e155 "><em>version-string</em></td>
<td valign="top" width="33.33333333333333%" headers="d0e158 ">Specifies the lowest version of iSeries on which this element exists.
If the iSeries version
is less than the version specified on this attribute, this element and its
children, if any exist, will not be processed during a call to a program.
This attribute is helpful for defining program interfaces which differ between
releases of iSeries.
<p>The syntax of the version string must be "VvRrMm," where the capitals
letters "V," "R," and "M" are literal characters and "v," "r," and "m" are
one or more digits representing the version, release and modification level.
The value for "v" must be from 1 to 255 inclusively. The value for "r" and
"m" must be from 0 to 255, inclusively.</p>
</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e152 "><strong>name=</strong></td>
<td valign="top" width="33.33333333333333%" headers="d0e155 "><em>name</em></td>
<td valign="top" width="33.33333333333333%" headers="d0e158 ">Specifies the name of the <strong>&lt;data&gt;</strong> element.</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e152 "><strong>offset=</strong></td>
<td valign="top" width="33.33333333333333%" headers="d0e155 "><em>number</em> where <em>number</em> defines a fixed, never-changing offset.
<p><em>data-name</em> where <em>data-name</em> defines the name of a <strong> &lt;data&gt;</strong>
element within the PCML document that will contain, at runtime, the offset
to this element. The <em> data-name</em> specified can be a fully qualified
name or a name that is relative to the current element. In either case,
the name must reference a <strong>&lt;data&gt;</strong> element that is defined with <strong>type=</strong><em>"int"</em>.
See <a href="lengthprecisionrelative.htm#lengthprecisionrelative">Resolving
Relative Names</a> for more information on how relative names are resolved.</p>
</td>
<td valign="top" width="33.33333333333333%" headers="d0e158 ">Specifies the offset to the <strong>&lt;data&gt;</strong> element within an output
parameter. <p>Some programs return information with a fixed structure followed
by one or more variable length fields or structures. In this case, the location
of a variable length element is typically specified as an offset or displacement
within the parameter.</p>
<p>An <strong>offset</strong> attribute is used in conjunction
with the <strong>offsetfrom</strong> attribute. If the <strong> offsetfrom</strong> attribute
is not specified, the base location for the offset specified on the <strong>offset</strong> attribute
is the parent of this element. See <a href="#pcmldttg__pcmldttgspecifyingoffsets"> Specifying
Offsets</a> for more information on how to use the <strong>offset</strong> and <strong>offsetfrom</strong>
attributes.</p>
<p>The <strong>offset</strong> and <strong>offsetfrom</strong> attributes are
only used to process output data from a program. These attributes do not
control the offset or displacement of input data.</p>
<p>If this attribute
is omitted, the location of the data for this element is immediately following
the preceding element in the parameter, if any.</p>
</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e152 "><strong>offsetfrom=</strong></td>
<td valign="top" width="33.33333333333333%" headers="d0e155 "><em>number</em> where <em>number</em> defines a fixed, never-changing base
location. <em>Number</em> is most typically used to specify <strong>number=</strong><em>"0"</em> indicating
that the offset is an absolute offset from the beginning of the parameter.
<p><em>data-name</em> where <em>data-name</em> defines the name of a <strong> &lt;data&gt;</strong>
element used as a base location for the offset. The element name specified
must be the parent or an ancestor of this element. The value from the <strong> offset</strong> attribute
will be relative to the location of the element specified on this attribute.
The <em>data-name</em> specified can be a fully qualified name or a name that
is relative to the current element. In either case, the name must reference
an ancestor of this element. See <a href="lengthprecisionrelative.htm#lengthprecisionrelative"> Resolving
Relative Names</a> for more information on how relative names are resolved.</p>
<p><em>struct-name</em> where <em>struct-name</em> defines
the name of a <strong> &lt;struct&gt;</strong> element used as a base location for the
offset. The element name specified must be the parent or an ancestor of this
element. The value from the <strong> offset</strong> attribute will be relative to
the location of the element specified on this attribute. The <em>struct-name</em> specified
can be a fully qualified name or a name that is relative to the current
element. In either case, the name must reference an ancestor of this element.
See <a href="lengthprecisionrelative.htm#lengthprecisionrelative"> Resolving
Relative Names</a> for more information on how relative names are resolved.</p>
</td>
<td valign="top" width="33.33333333333333%" headers="d0e158 ">Specifies the base location from which the <strong>offset</strong> attribute
is relative. <p>If the <strong>offsetfrom</strong> attribute is not specified, the
base location for the offset specified on the <strong> offset</strong> attribute is
the parent of this element. See <a href="#pcmldttg__pcmldttgspecifyingoffsets">Specifying
Offsets</a> for more information on how to use the <strong>offset</strong> and <strong> offsetfrom</strong> attributes.</p>
<p>The <strong>offset</strong> and <strong>offsetfrom</strong> attributes are only used to process output data from a program. These attributes
do not control the offset or displacement of input data.</p>
</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e152 "><strong>outputsize=</strong></td>
<td valign="top" width="33.33333333333333%" headers="d0e155 "><em>number</em> where a <em>number</em> defines a fixed, never-changing
number of bytes to reserve. <p><em>data-name</em> where <em>data-name</em> defines
the name of a <strong> &lt;data&gt;</strong> element within the PCML document that will
contain, at runtime, the number of bytes to reserve for output data. The <em>data-name</em> specified
can be a fully qualified name or a name that is relative to the current
element. In either case, the name must reference a <strong>&lt;data&gt;</strong> element
that is defined with <strong>type=</strong><em>"int"</em>. See <a href="lengthprecisionrelative.htm#lengthprecisionrelative">Resolving
Relative Names</a> for more information on how relative names are resolved.</p>
</td>
<td valign="top" width="33.33333333333333%" headers="d0e158 ">Specifies the number of bytes to reserve for output data for the element.
For output parameters which are variable in length, the <strong>outputsize</strong> attribute
is needed to specify how many bytes must be reserved for data to be returned
from the iSeries program.
An <strong>outputsize</strong> attribute can be specified on all variable length fields
and variable sized arrays, or it can be specified for an entire parameter
that contains one or more variable length fields. <p><strong>Outputsize</strong> is
not necessary and must not be specified for fixed-size output parameters.</p>
<p>The
value specified on this attribute is used as the total size for the element
including all the children of the element. Therefore, the <strong>outputsize</strong>
attribute is ignored on any children or descendants of the element.</p>
<p>If <strong>outputsize</strong> is
omitted, the number of bytes to reserve for output data is determined at
runtime by adding the number of bytes to reserve for all of the children
of the <strong> &lt;struct&gt;</strong> element.</p>
</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e152 "><strong>passby=</strong></td>
<td valign="top" width="33.33333333333333%" headers="d0e155 "><em>reference</em> where <em>reference</em> indicates that the parameter
will be passed by reference. When the program is called, the program will
be passed a pointer to the parameter value. <p><em>value</em> where <em>value</em> indicates
an integer value. This value is allowed only when <strong>type=</strong><em> "int"</em> and <strong> length=</strong><em>"4"</em>
is specified.</p>
</td>
<td valign="top" width="33.33333333333333%" headers="d0e158 ">Specifies whether the parameter is passed by reference or passed by
value. This attribute is allowed only when this element is a child of a <strong>&lt;program&gt;</strong> element
defining a service program call.</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e152 "><strong>precision=</strong></td>
<td valign="top" width="33.33333333333333%" headers="d0e155 "><em>number</em></td>
<td valign="top" width="33.33333333333333%" headers="d0e158 ">Specifies the number of bytes of precision for some numeric data types.
For more information, see the <a href="lengthprecisionrelative.htm#lengthprecisionrelative">Values
for length and precision</a>. </td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e152 "><strong>struct=</strong></td>
<td valign="top" width="33.33333333333333%" headers="d0e155 "><em>name</em></td>
<td valign="top" width="33.33333333333333%" headers="d0e158 ">Specifies the name of a <strong>&lt;struct&gt;</strong> element for the <strong>&lt;data&gt;</strong> element.
A <strong> struct</strong> attribute can be specified only for <strong> &lt;data&gt;</strong> elements
with <strong> type=</strong><em>"struct"</em>.</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e152 "><strong>trim=</strong></td>
<td valign="top" width="33.33333333333333%" headers="d0e155 "><p><em>right</em> where <em>right</em> is the default behavior that means
to trim trailing white spaces.</p>
<p><em>left</em> where <em>left</em> means
to trim preceding white spaces.</p>
<p><em>both</em> where <em>both</em> means
to trim both preceding and trailing white spaces.</p>
<p><em>none</em> where <em>none</em> means
that white spaces are not trimmed.</p>
</td>
<td valign="top" width="33.33333333333333%" headers="d0e158 ">Specifies how to trim white space from character data.</td>
</tr>
<tr><td rowspan="4" valign="top" width="33.33333333333333%" headers="d0e152 "><strong>usage=</strong></td>
<td valign="top" width="33.33333333333333%" headers="d0e155 "><em>inherit</em></td>
<td valign="top" width="33.33333333333333%" headers="d0e158 ">Usage is inherited from the parent element. If the structure does
not have a parent, usage is assumed to be <em> inputoutput</em>.</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e155 "><em>input</em></td>
<td valign="top" width="33.33333333333333%" headers="d0e158 ">Defines an input value to the host program. For character and numeric
types, the appropriate conversion is performed.</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e155 "><em>output</em></td>
<td valign="top" width="33.33333333333333%" headers="d0e158 ">Defines an output value from the host program. For character and numeric
types, the appropriate conversion is performed.</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e155 "><em>inputoutput</em></td>
<td valign="top" width="33.33333333333333%" headers="d0e158 ">Defines both and input and an output value.</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="pcmldttg__pcmldttgspecifyingoffsets"><a name="pcmldttg__pcmldttgspecifyingoffsets"><!-- --></a><h4 class="sectiontitle">Specifying offsets</h4><p>Some
programs return information with a fixed structure followed by one or more
variable length fields or structures. In this case, the location of a variable
length element is typically specified as an offset or displacement within
the parameter.</p>
<p>An offset is the distance in bytes from the beginning
of the parameters to the beginnings of a field or structure. A displacement
is the distance in bytes from the beginning of one structure to the beginning
of another structure.</p>
<p>For offsets, since the distance is from the beginning
of the parameter, you must specify <strong>offsetfrom="0"</strong>. The following is
an example of an offset from the beginning of the parameter:</p>
<pre>&lt;pcml version="1.0"&gt;
&lt;program name="myprog" path="/QSYS.lib/MYLIB.lib/MYPROG.pgm"&gt;
&lt;!-- receiver variable contains a path --&gt;
&lt;struct name="receiver" usage="output" outputsize="2048"&gt;
&lt;data name="pathType" type="int" length="4" /&gt;
&lt;data name="offsetToPathName" type="int" length="4" /&gt;
&lt;data name="lengthOfPathName" type="int" length="4" /&gt;
&lt;data name="pathName" type="char" length="lengthOfPathName"
<strong>offset="offsetToPathName" offsetfrom="0"</strong>/&gt;
&lt;/struct&gt;
&lt;/program&gt;
&lt;/pcml&gt;</pre>
<p>For displacements, since the distance is from the
beginning of another structure, you specify the name of the structure to which
the offset is relative. The following is an example of an displacement from
the beginning of a named structure:</p>
<pre>&lt;pcml version="1.0"&gt;
&lt;program name="myprog" path="/QSYS.lib/MYLIB.lib/MYPROG.pgm"&gt;
&lt;!-- receiver variable contains an object --&gt;
&lt;struct name="receiver" usage="output" &gt;
&lt;data name="objectName" type="char" length="10" /&gt;
&lt;data name="libraryName" type="char" length="10" /&gt;
&lt;data name="objectType" type="char" length="10" /&gt;
&lt;struct name="pathInfo" usage="output" outputsize="2048" &gt;
&lt;data name="pathType" type="int" length="4" /&gt;
&lt;data name="offsetToPathName" type="int" length="4" /&gt;
&lt;data name="lengthOfPathName" type="int" length="4" /&gt;
&lt;data name="pathName" type="char" length="lengthOfPathName"
<strong>offset="offsetToPathName" offsetfrom="pathInfo"</strong>/&gt;
&lt;/struct&gt;
&lt;/struct&gt;
&lt;/program&gt;
&lt;/pcml&gt;</pre>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="lengthprecisionrelative.htm">Values for length and precision</a></strong><br />
Values for the length and precision attributes are different for different data types.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="pcmlsyn.htm" title="PCML consists of the following tags, each of which has its own attribute tags.">PCML syntax</a></div>
</div>
</div>
</body>
</html>