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

97 lines
6.1 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="Generating an SCS data stream" />
<meta name="abstract" content="" />
<meta name="description" content="" />
<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="printscs" />
<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>Generating an SCS data stream</title>
</head>
<body id="printscs"><a name="printscs"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Generating an SCS data stream</h1>
<div><p></p>
<div class="section"><p>To generate spooled files that will print on certain printers
attached to the server, an SNA Character Stream (SCS) data stream must be
created. (SCS is a text-based, EBCDIC data stream that can be printed on SCS
printers, IPDS™ printers,
or to PC printers.) SCS can be printed by converting it using an emulator
or the host print transform on the server.</p>
<p>You can use the SCS writer
classes to generate such an SCS data stream. The SCS writer classes convert Java™ Unicode
characters and formatting options into an SCS data stream. Five SCS writer
classes generate varying levels of SCS data streams. The caller chooses the
writer that matches the final printer destination to which the caller or end
user will be printing.</p>
<p>Use the following SCS writer classes to generate
an SCS printer data stream:</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="50%" id="d0e30">SCS writer class</th>
<th valign="top" width="50%" id="d0e32">Description</th>
</tr>
</thead>
<tbody><tr><td valign="top" width="50%" headers="d0e30 "><a href="javadoc/com/ibm/as400/access/SCS5256Writer.html"> SCS5256Writer</a></td>
<td valign="top" width="50%" headers="d0e32 ">The simplest SCS writer class. Supports text, carriage return, line
feed, new line, form feed, absolute horizontal and vertical positioning, relative
horizontal and vertical positioning, and set vertical format.</td>
</tr>
<tr><td valign="top" width="50%" headers="d0e30 "><a href="javadoc/com/ibm/as400/access/SCS5224Writer.html"> SCS5224Writer</a></td>
<td valign="top" width="50%" headers="d0e32 ">Extends the 5256 writer and adds methods to set character per inch
(CPI) and lines per inch (LPI).</td>
</tr>
<tr><td valign="top" width="50%" headers="d0e30 "><a href="javadoc/com/ibm/as400/access/SCS5219Writer.html"> SCS5219Writer</a></td>
<td valign="top" width="50%" headers="d0e32 ">Extends the 5224 writer and adds support for left margin, underline,
form type (paper or envelope), form size, print quality, code page, character
set, source drawer number, and destination drawer number.</td>
</tr>
<tr><td valign="top" width="50%" headers="d0e30 "><a href="javadoc/com/ibm/as400/access/SCS5553Writer.html"> SCS5553Writer</a></td>
<td valign="top" width="50%" headers="d0e32 ">Extends the 5219 writer and adds support for character rotation, grid
lines, and font scaling. The 5553 is a double-byte character set (DBCS) data
stream.</td>
</tr>
<tr><td valign="top" width="50%" headers="d0e30 "><a href="javadoc/com/ibm/as400/access/SCS3812Writer.html"> SCS3812Writer</a></td>
<td valign="top" width="50%" headers="d0e32 ">Extends the 5219 writer and adds support for bold, duplex, text orientation,
and fonts.</td>
</tr>
</tbody>
</table>
</div>
<p>To construct an SCS writer, the caller needs an output stream and,
optionally, an encoding. The data stream is written to the output stream.
To create an SCS spooled file, the caller first constructs a SpooledFileOutputStream,
and then uses that to construct an SCS writer object. The encoding parameter
gives a target EBCDIC coded character set identifier (CCSID) to convert the
characters to.</p>
<p>Once the writer is constructed, use the <a href="javadoc/com/ibm/as400/access/SCS5256Writer.html#WRITE(CHAR[], INT, INT)"> write()</a> methods to output text. Use the <a href="javadoc/com/ibm/as400/access/SCS5256Writer.html#CARRIAGERETURN()"> carriageReturn()</a>, <a href="javadoc/com/ibm/as400/access/SCS5256Writer.html#LINEFEED()"> lineFeed()</a>, and <a href="javadoc/com/ibm/as400/access/SCS5256Writer.html#NEWLINE()"> newLine()</a> methods to position the write cursor on the
page. Use the <a href="javadoc/com/ibm/as400/access/SCS5256Writer.html#ENDPAGE()"> endPage()</a> method to end the current page and start a
new page.</p>
<p>When all of the data has been written, use the <a href="javadoc/com/ibm/as400/access/SCS5256Writer.html#CLOSE()"> close()</a> method
to end the data stream and close the output stream.</p>
</div>
<div class="section"><h4 class="sectiontitle">Example</h4><p>The following example shows how to generate
a SCS data stream using the SCS3812Writer class, and how to write the stream
to a spooled file on the server:</p>
<blockquote><a href="npexamplecreatescssplf.htm#npexamplecreatescssplf">Example:
Creating SCS spooled files</a></blockquote>
</div>
</div>
</body>
</html>