ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzakd_5.4.0.1/rzakdmstptline.htm

217 lines
12 KiB
HTML

<?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="LINE (Line) keyword in printer files" />
<meta name="abstract" content="Use this record-level keyword to print a horizontal or vertical line." />
<meta name="description" content="Use this record-level keyword to print a horizontal or vertical line." />
<meta name="DC.subject" content="LINE (Line) keyword" />
<meta name="keywords" content="LINE (Line) keyword" />
<meta name="DC.Relation" scheme="URI" content="rzakdmstprkey.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakdmstptcolor.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakdmstpositn.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2001, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2001, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzakdmstptline" />
<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>LINE (Line) keyword in printer files</title>
</head>
<body id="rzakdmstptline"><a name="rzakdmstptline"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">LINE (Line) keyword in printer files</h1>
<div><p>Use this record-level keyword to print a horizontal or vertical
line.</p>
<div class="section"><p>The format of the keyword is:</p>
<pre>LINE(position-down | &amp;position-down-field
position-across | &amp;position-across-field
line-length | &amp;line-length-field
line-direction
line-width | &amp;line-width-field
[line-pad]
[color value])</pre>
<p>The position-down parameter is required and defines
the vertical starting point of the line relative to the margins specified
on the FRONTMGN or BACKMGN parameter on the CRTPRTF command. Valid values
are 0 to 57.790 cm (0 to 22.750 in.).</p>
<p>The position-across parameter
is required and defines the horizontal starting point of the line relative
to the margins specified on the FRONTMGN or BACKMGN parameter on the CRTPRTF
command. Valid values are 0 to 57.790 cm (0 to 22.750 in.).</p>
<p>You
can specify the position-down and position-across parameters as constants,
program-to-system fields, or a combination of both, as shown in the following
examples:</p>
<ul><li>LINE(0.5 7.1 … )</li>
<li>LINE(&amp;field1 1.3 … )</li>
<li>LINE(2.75 &amp;field2 … )</li>
<li>LINE(&amp;field3 &amp;field4 … )</li>
</ul>
<p>Field1, field2, field3, and field4 are the names of program-to-system
fields. The fields must exist in the same record format as the LINE keyword
and be defined as having length 5 with 3 decimal positions, data type S (zoned
decimal), and usage P (program-to-system).</p>
<p>The line-length parameter
is required and defines the length of the line. Valid values are 0.001 to
57.790 cm (0.001 to 22.750 in.). The parameter can be a program-to-system
field. The field must exist in the same record format as the LINE keyword
and be defined as having length 5 with 3 decimal positions, data type S (zoned
decimal), and usage P (program-to-system).</p>
<div class="p">The line-width parameter
is required and defines the width of the line. Valid values are 0.001 to 57.790
cm (0.001 to 22.750 in.). The parameter can be a program-to-system field.
The field must exist in the same record format as the LINE keyword and be
defined as having length 5 with 3 decimal positions, data type S (zoned decimal),
and usage P (program-to-system). Instead of a numeric value or program-to-system
field, the following special values can also be specified:
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="void" border="0" rules="none"><thead align="left"><tr><th valign="top" width="NaN%" class="firstcol" id="d0e50">Value</th>
<th valign="top" width="NaN%" id="d0e52">Line width</th>
</tr>
</thead>
<tbody><tr><th valign="top" width="NaN%" class="firstcol" id="d0e56" headers="d0e50 ">&nbsp;</th>
</tr>
<tr><th valign="top" width="NaN%" class="firstcol" id="d0e58" headers="d0e50 ">*NARROW</th>
<td valign="top" width="NaN%" headers="d0e58 d0e52 ">12/1440 in. (0.008 in., 0.022 cm)</td>
</tr>
<tr><th valign="top" width="NaN%" class="firstcol" id="d0e63" headers="d0e50 ">*MEDIUM</th>
<td valign="top" width="NaN%" headers="d0e63 d0e52 ">24/1440 in. (0.017 in., 0.042 cm)</td>
</tr>
<tr><th align="left" valign="top" width="NaN%" class="firstcol" id="d0e68" headers="d0e50 ">*WIDE</th>
<td valign="top" width="NaN%" headers="d0e68 d0e52 ">36/1440 in. (0.025 in., 0.064 cm)</td>
</tr>
</tbody>
</table>
</div>
<div class="note"><span class="notetitle">Notes:</span> <ol><li>The UOM parameter on the CRTPRTF command determines the units of measure
for the position-down, position-across, line-length, and line-width parameter
values. If the value specified for a parameter is outside the valid range,
it is flagged when the spooled file is created.</li>
<li>Depending on printer hardware, lines smaller than approximately 0.004
in. (0.010 cm) might not print because of printer resolution. No message is
issued when this occurs.</li>
</ol>
</div>
</div>
<p>The line-direction parameter is required and can have
a value of horizontal (*HRZ) or vertical (*VRT).</p>
<p>The line-pad parameter
is optional. It specifies where the line-width value is placed in relationship
to the actual line coordinates. For example, if line-width is 5 and line-pad
is *TOP, the line extends above the point identified by the position-across
and position-down parameters. Valid values are *TOP and *BOT for *HRZ lines,
and *LEFT and *RIGHT for *VRT lines. The defaults are *BOT for horizontal
lines and *RIGHT for vertical lines.</p>
<p>The optional color parameter lets
you specify the color of the line. Specify the color as an expression in one
of the following forms:</p>
<ul><li>Color name method: <samp class="codeph">(*COLOR color-name)</samp></li>
<li>RGB (red/green/blue) color model: <samp class="codeph">(*COLOR *RGB rvalue gvalue bvalue)</samp></li>
<li>CMYK (cyan/magenta/yellow/black) color model: <samp class="codeph">(*COLOR *CMYK cvalue
mvalue yvalue kvalue)</samp></li>
<li>CIELAB color model: <samp class="codeph">(*COLOR *CIELAB lvalue c1value c2value)</samp></li>
<li>Highlight color model: <samp class="codeph">(*COLOR *HIGHLIGHT hvalue coverage)</samp></li>
</ul>
<p>When the LINE keyword is specified on a record format, all fields
within the record format must be positioned using the POSITION keyword.</p>
<p>An
error message is issued if a constant field is specified in a record format
where the LINE keyword is also specified.</p>
<p>An error message is issued
at print time if the line does not fit on the page.</p>
<p>Specify DEVTYPE(*AFPDS)
on the CRTPRTF command when LINE is specified in the file. If DEVTYPE is changed
to anything other than *AFPDS, the keyword is ignored and a warning message
is issued at print time.</p>
<p>You can specify this keyword a maximum of 40
times on a record.</p>
<p>You cannot specify LINE with the following keywords:</p>
<ul><li>SPACEA</li>
<li>SPACEB</li>
<li>SKIPA</li>
<li>SKIPB</li>
</ul>
<p>Option indicators are valid for this keyword.</p>
</div>
<div class="section"><h4 class="sectiontitle">Example 1</h4><p>The following example shows how to specify
the LINE keyword.</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
A*
A R REC1 LINE(1.5 3.0 4.25 *HRZ 0.2 *TOP)
A*
A R REC2 LINE(2.1 1.5 7.5 *HRZ 0.05 *BOT)
A LINE(&amp;FLD1 &amp;FLD2 4.25 *VRT 0.01 +
A *LEFT)
A FLD1 5S 3P
A FLD2 5S 3P
A*
A R REC3
A 02 LINE(1.0 1.1 6 *HRZ 1)
A*
A R REC4 LINE(3.5 6.0 4.25 *HRZ 0.2 *TOP +
A* (*COLOR *RGB 20 15 75))
A
A</pre>
<div class="note"><span class="notetitle">Note:</span> The UOM parameter on the CRTPRTF command determines
the units of measure for the parameter values.</div>
<p>REC1 prints a horizontal
line 4.25 units long. The line starts 1.5 units down and 3.0 units across
from the margins specified on the FRONTMGN or BACKMGN parameter on the CRTPRTF
command. The line is 0.2 units wide. The extra width is added at the top of
the line.</p>
<p>REC2 prints two lines. The first line, printed horizontally,
starts 2.1 units down and 1.5 units across from the margins specified on the
FRONTMGN or BACKMGN parameter on the CRTPRTF command. The line is 7.5 units
long and 0.05 units wide. The extra width is added below the line.</p>
<p>The
position of the second line is determined by the value assigned to program-to-system
fields FLD1 and FLD2. The line, printed vertically, is 4.25 units long and
0.01 units wide. The extra width is added on the left side of the line.</p>
<p>REC3
prints a line only if indicator 02 is on. The extra width is added on the
bottom of the line.</p>
<p>REC4 prints a line with the RGB color model and
specifies color values of 20, 15, and 75.</p>
</div>
<div class="section"><h4 class="sectiontitle">Example 2</h4><p>The following coding example uses DDS
and P-fields.</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
*
R REC1 LINE(4 3 5 *HRZ .01)
LINE(&amp;FLD1&amp;FLD2 2 *VRT .015 *RIGHT)
FLD1 5S 3P
FLD2 5S 3P</pre>
<p>The following example
illustrates the location of the lines using the previous DDS
code, when the application assigns a numeric value of 3 to FLD1 and a numeric
value of 5 to FLD2. Both the FRONTMGN and BACKMGN parameters on the CRTPRTF
command are set to 2. Line 1 starts at 4 down and 3 across and its horizontal
length is 5. Line 2 starts at 3 down and 5 across and its vertical length
is 2.</p>
<br /><img src="rzakd503.gif" alt="An illustration&#xA;of the results produced by Example 2, as described in the text." /><br /></div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakdmstprkey.htm" title="See the valid keyword entries for defining printer files in this topic.">Keyword entries for printer files (positions 45 through 80)</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="rzakdmstptcolor.htm" title="Use this field-level keyword to specify the color for a field.">COLOR (Color) keyword in printer files</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="rzakdmstpositn.htm" title="Use this field-level keyword to define the location of a named field on the page.">POSITION (Position) keyword in printer files</a></div>
</div>
</div>
</body>
</html>