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

211 lines
11 KiB
HTML
Raw Permalink 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="CPI (Characters Per Inch) keyword in printer files" />
<meta name="abstract" content="This record- or field-level keyword specifies the horizontal printing density for the record format or field that you are defining." />
<meta name="description" content="This record- or field-level keyword specifies the horizontal printing density for the record format or field that you are defining." />
<meta name="DC.subject" content="CPI (Characters Per Inch) keyword, Characters Per Inch (CPI) keyword" />
<meta name="keywords" content="CPI (Characters Per Inch) keyword, Characters Per Inch (CPI) keyword" />
<meta name="DC.Relation" scheme="URI" content="rzakdmstprkey.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakdmstzfont.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="rzakdmstptcpi" />
<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>CPI (Characters Per Inch) keyword in printer files</title>
</head>
<body id="rzakdmstptcpi"><a name="rzakdmstptcpi"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">CPI (Characters Per Inch) keyword in printer files</h1>
<div><p>This record- or field-level keyword specifies the horizontal printing
density for the record format or field that you are defining.</p>
<div class="section"><div class="p">Use CPI to: <ul><li>Darken logos and other printed graphics that you create using the DFNCHR
keyword</li>
<li>Place more data in less space on printed forms</li>
<li>Fit the appearance of a form to your needs</li>
</ul>
</div>
<div class="p">The format of the keyword is: <pre>CPI (10 | 15)</pre>
</div>
<p>10
or 15 specifies the number of characters per inch.</p>
<p>This keyword is valid
only for the 5224 and 5225 SCS printers. If you do not specify CPI, the density
is set by the CPI parameter on the Create Printer File (CRTPRTF), Change Printer
File (CHGPRTF), or Override with Printer File (OVRPRTF) command.</p>
<p>If
you specify CPI at the record level, all fields in the record format are at
the same density except those for which you specify CPI at the field level.</p>
<p>If
you specify CPI at the field level, you can specify different densities for
fields printed on the same line. The position you specify for each field (in
positions 42 through 44) is based on the value of the CPI parameter on the
CRTPRTF, CHGPRTF, or OVRPRTF command (see the following examples).</p>
<p>When
you specify CPI at the field level, overlapping fields are not diagnosed.</p>
<p>A
warning message results at creation time if you specify CPI in a file created
with DEVTYPE(*IPDS) or DEVTYPE(*AFPDS). To change the CPI, you must specify
the FONT keyword.</p>
<p>You cannot specify CPI on the same record format as
the DRAWER keyword.</p>
<p>Option indicators are valid for this keyword.</p>
</div>
<div class="section"><h4 class="sectiontitle">Examples</h4><p>The following examples show how to specify
the CPI keyword for a record format.</p>
<p><strong>Example 1:</strong></p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A R RECORD1
00020A 02 CPI(15)
00030A FLD1 20 3 1
00040A FLD2 5 0 +2
00050A R RECORD2 SPACEB(1)
00060A FLD3 1
A</pre>
<p>In this example, if option indicator 02 is set to on,
both FLD1 and FLD2 in RECORD1 are printed at 15 characters per inch. If option
indicator 02 is set to off, FLD1 and FLD2 are printed at the density specified
for the CPI parameter on the CRTPRTF, CHGPRTF, or OVRPRTF command.</p>
<p>The
printer spaces one line before printing RECORD2. FLD3 in RECORD2 is printed
at the density specified for the CPI parameter on the CRTPRTF, CHGPRTF, or
OVRPRTF command.</p>
<p><strong>Example 2:</strong></p>
<p>The following example shows
what happens when a field at 15 CPI is printed between fields printed at 10
CPI.</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A R RCDA SPACEA(1)
00020A FLD1 10 1
00030A FLD2 10 11CPI(15)<strong>1</strong>
00040A FLD3 10 21
A</pre>
<div class="p">In this example, all positions entries <strong>1</strong> refer
to columns measured at 10 CPI (as specified on the CRTPRTF, OVRPRTF, or CHGPRTF
command). Therefore, RCDA is printed as follows: <pre>11111111112222222222 3333333333</pre>
</div>
<div class="p">FLD2,
being compressed at 15 CPI, uses less room than FLD1 or FLD3. To avoid the
gap, specify FLD3 more to the left. To calculate the position of FLD3, add
the length of FLD2 to the specified position of FLD2. To calculate the length
of FLD2, use the following formula: <pre><u>length specified X file density</u> = printed length
density for the field</pre>
</div>
<div class="p">or, for FLD2: <pre><u>10 X 10</u> = <u>10 X 2</u> = 6.67 (rounded up to 7)
15 3</pre>
</div>
<div class="p">Add 7 to 11, the specified position of FLD2,
as follows: <pre>7 + 11 = 18</pre>
</div>
<div class="p">The resulting corrected
DDS for Example 2 becomes: <pre>R RCDA SPACEA(1)
FLD1 10 1
FLD2 10 11CPI(15)
FLD3 10 18</pre>
</div>
<div class="p">The record format then prints
as follows: <pre>11111111112222222222 3333333333</pre>
</div>
<p><strong>Example
3:</strong></p>
<p>The following example shows what happens when a field at 10 CPI
is printed between fields printed at 15 CPI.</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A R RCDB SPACEA(1)
00020A FLD4 10 1
00030A FLD5 10 11CPI(10) <strong>1</strong>
00040A FLD6 10 21
A</pre>
<div class="p">In this example, the positions entries <strong>1</strong> refer
to positions measured at 15 CPI (as specified on the CRTPRTF, OVRPRTF, or
CHGPRTF command). The system uses the following formula to calculate the beginning
position of fields printed at 10 CPI within files printed at 15 CPI: <pre><u>2(specified position - 1)</u> + 1 = printed position (truncated if fractional)
3</pre>
</div>
<div class="p">or, for FLD5: <pre><u>2(11-1)</u> + 1 = 7.67 (truncated to 7)
3</pre>
</div>
<div class="p">The truncation can cause overprinting
of FLD4 by FLD5, as shown in the following example: <pre>44444444445555556666666666666</pre>
</div>
<p>To
avoid the overprinting, specify FLD5 one more position to the right (position
12).</p>
<div class="p">To calculate the position of FLD6, add the length of FLD5 to the
position of FLD5. To calculate the length of FLD5, use the following formula:
<pre><u>length specified X density for the file</u> = printed length
density for the field</pre>
</div>
<div class="p">or, for FLD5: <pre><u>10 X 15</u> = 15 (rounded up if necessary)
10</pre>
</div>
<div class="p">Add 15 to the (adjusted) position of FLD5: <pre>15 + 12 = 27</pre>
</div>
<div class="p">The
resulting corrected DDS for Example 3 becomes: <pre>R RCDB SPACEA(1)
FLD4 10 1
FLD5 10 12CPI(10)
FLD6 10 27</pre>
</div>
<div class="p">The record format then prints as follows:
<pre>4444444444 5555555555 6666666666</pre>
</div>
<p><strong>Example
4:</strong></p>
<p>The following example shows the effect of the CPI keyword on
how the system truncates or folds fields at the right side of the printer
form. This depends on the values of the FOLD and PAGESIZE parameters on the
CRTPRTF, CHGPRTF, or OVRPRTF commands.</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A R RCDC SPACEA(1)
00020A FLD7 10 140
00030A FLD8 10 150CPI(10)
A</pre>
<div class="p">In this example, if the file is being printed at 15 CPI
with a forms width of 160, FLD7 and FLD8 are printed as follows: <ul><li>FLD7 starts at position 140 for a print length of 10 at 15 CPI (16.9 mm
or 0.667 inch).</li>
<li>FLD8 starts at position 150 for a print length of 10 at 10 CPI (25.4 mm
or one inch).</li>
</ul>
</div>
<div class="p">Printing FLD8 at position 150 calculated at 15 CPI causes FLD8
to extend beyond the right margin. Therefore, FLD8 is either truncated or
folded onto the next line (depending on the FOLD parameter on the CRTPRTF,
CHGPRTF, or OVRPRTF command). To calculate the length of FLD8, use the following
formula: <pre><u>length specified X density for the file</u> = printed length
density for the field</pre>
</div>
<div class="p">or, for FLD8: <pre><u>10 X 15</u> = 15 (truncated to next lower integer if necessary)
10</pre>
<div class="note"><span class="notetitle">Note:</span> When a file printed at 15 CPI contains fields printed
at 10 CPI, the right margin of the form is adjusted for all fields according
to the following formula:</div>
<pre><u>2(specified length of the field - 1)</u> + 1 = adjustment
3 (truncated if fractional)</pre>
</div>
</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="relref"><strong>Related reference</strong><br />
<div><a href="rzakdmstzfont.htm" title="Use this record- or field-level keyword to specify the font ID for printing a named or constant field or fields within a record.">FONT (Font) keyword in printer files</a></div>
</div>
</div>
</body>
</html>