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

124 lines
7.6 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="concept" />
<meta name="DC.Title" content="Position (positions 42 through 44)" />
<meta name="abstract" content="These positions specify the starting position of the field." />
<meta name="description" content="These positions specify the starting position of the field." />
<meta name="DC.subject" content="position positional entry" />
<meta name="keywords" content="position positional entry" />
<meta name="DC.Relation" scheme="URI" content="posy44.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="pos4244" />
<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>Position (positions 42 through 44)</title>
</head>
<body id="pos4244"><a name="pos4244"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Position (positions 42 through 44)</h1>
<div><p>These positions specify the starting position of the field.</p>
<p>The position you specify is based on the value of the characters
per inch value for the printer file, which is either specified or implicit
in the font being used. If the printer file uses *DEVD for the font, a coded
font, or a font character set, text fields are positioned using blanks (x'40')
to position to the required columns. Non-text fields, such as barcodes, are
positioned using an implied value of 10 CPI. If a proportional spaced font
is being used, this might produce columns which do not line up. It is recommended
that the Position keyword be used for this situation. The entry must be right-aligned;
leading zeros are optional.</p>
<p>If you specify a location of a field
in a record and the field is not ignored, you can specify the location of
subsequent fields within that record by leaving the line number blank and
specifying a plus value (+n) for 42 through 44 (position entry). The plus
value indicates the number of spaces to be left between the end of the previous
field and the beginning of the field that you are defining. The plus value
must be in the range of 0 through 99. If you specify a plus value, the line
number entry must be blank. If the plus value causes an implicit space operation
and line numbers are not being used for the record format, then skip/space
keywords must be used to cause spacing to occur.</p>
<p>The system uses the page width specified on the CRTPRTF command as the
width limit when figuring field positions. For example, a user specifies the
page width as 132. If the record format being created uses reference positioning
instead of hard-coded positions, the fields will be wrapped at position 132.
If a line number is specified on a field in the format, the overlapping fields
are wrapped to the next line. If no line number is specified for the format,
the data is wrapped over the data at the beginning of that same line.</p>
<p>After the positions are calculated, the real values are stored and treated
as if they were hard-coded. Therefore, if a field was wrapped and now resides
on line 1, position 5, that is where the field remains even if the page width
is increased using the CHGPRTF command.</p>
<p><a href="#pos4244__e2">Figure 1</a> illustrates this problem and two possible
solutions (for a page width of 132 characters).</p>
<div class="fignone" id="pos4244__e2"><a name="pos4244__e2"><!-- --></a><span class="figcap">Figure 1. Specify the line and position location</span><div class="note"><span class="notetitle">Note:</span> By using the code examples, you agree to the terms of the <a href="codedisclaimer.htm">Code license and disclaimer information</a>.</div>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
A*
A* POSITION PLUS VALUE CAUSES PRFLD1 TO OVERLAP PRFLD2
A*
A R PRTOUT SKIPB(1)
A PRFLD1 130 1TEXT('START LOC 1,1 END LOC 1,130')
A PRFLD2 130 +2TEXT('OVERLAPS PRFLD1')
A*
A* SOLUTION 1 TO PREVENT OVERLAP IS TO SPECIFY SPACEA OR SKIPA WITH PRFLD1
A* OR TO SPECIFY SPACEB OR SKIPB WITH PRFLD2
A*
A R PRTOUT2 SKIPB(1)
A PRFLD1A 130 1
A PRFLD2A 130 +2SPACEB(1)
A*
A* SOLUTION 2 PROVIDES A FUNCTIONAL EQUIVALENT NOT USING SKIP/SPACE
A*
A R PRTOUT3
A PRFLD1B 130 1 1
A PRFLD2B 130 +2
A</pre>
</div>
<p>If FOLD(*YES) is specified for the CRTPRTF, CHGPRTF, or OVRPRTF command,
any field that extends beyond the end of a line is continued on the next line.
The break occurs at the end of the line but you can cause it to be folded
at a blank by specifying the BLKFOLD keyword. If FOLD(*NO) is in effect, a
field that extends beyond the end of a line is truncated.</p>
<p>The data description specifications determine which fields
appear on the same print line. The data description processor diagnoses overlap
at file creation time. Keywords or fields containing optional keywords are
assumed to be selected. Therefore, no overlap check is made for the cases
in which the keywords or fields are not selected. In <a href="#pos4244__e3">Figure 2</a>,
no fields will overlap unless indicator 01 is on, in which case F1, F3, and
F4 will overlap. A diagnostic is sent for the format indicating that field
selection or conditioning of space/skip keywords can cause fields to overlap
at run time.</p>
<p>On some printers, printer throughput speed is better when fields on the
same line are specified in the DDS in right-to-left order.</p>
<div class="fignone" id="pos4244__e3"><a name="pos4244__e3"><!-- --></a><span class="figcap">Figure 2. Overlapping fields</span><pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
A*
A* OVERLAPPING FIELDS ONLY IF IND 01 IS ON
A*
A R REC1 SKIPB(1)
A F1 1 1
A NO1 F2 1 1SPACEB(1) SPACEA(1)
A F3 1 1
A F4 1 1
A NO1 SPACEB(1)
A</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="posy44.htm" title="Use these positions to specify where the beginning of the field that you are defining appears on the page. You specify the line (positions 39 through 41) and the position (positions 42 through 44).">Location for printer files (positions 39 through 44)</a></div>
</div>
</div>
</body>
</html>