<?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="DBCS field definition" /> <meta name="abstract" content="Consider the characteristics of DBCS data when you define a DBCS field." /> <meta name="description" content="Consider the characteristics of DBCS data when you define a DBCS field." /> <meta name="DC.Relation" scheme="URI" content="rbagsenadbcs.htm" /> <meta name="DC.Relation" scheme="URI" content="../dds/kickoff.htm" /> <meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" /> <meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" /> <meta name="DC.Format" content="XHTML" /> <meta name="DC.Identifier" content="rbagsdbcsfielddefin" /> <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>DBCS field definition</title> </head> <body id="rbagsdbcsfielddefin"><a name="rbagsdbcsfielddefin"><!-- --></a> <!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script> <h1 class="topictitle1">DBCS field definition</h1> <div><p>Consider the characteristics of DBCS data when you define a DBCS field.</p> <ul><li>Each DBCS character is 2 bytes long.</li> <li>The length of a DBCS character string is always even.</li> <li>Shift-out (SO) and shift-in (SI) control characters are required at the beginning and end of the DBCS character string, except for graphic-data type fields. Together, these characters are 2 bytes long.</li> <li>The system treats DBCS data the same as character data, and therefore cannot perform arithmetic operations on it.</li> <li>The following DBCS data types can be used to identify DBCS fields: <ul><li>J (DBCS-only) for fields that can contain only bracketed DBCS data.</li> <li>E (DBCS-either) for fields that can contain bracketed DBCS or SBCS data, but not both.</li> <li>O (DBCS-open) for fields that can contain both SBCS and bracketed DBCS data.</li> <li>G (DBCS-graphic) for fields that can contain graphic data without the SO and SI control characters.</li> </ul> <p>Data type O is allowed in all types of files. Data types J and E are allowed only in database and display files. Data type G is allowed in database, display, and printer files. In most cases, the operating system automatically inserts shift-out and shift-in characters. An exception is when data is written into a data type G field in a database file.</p> </li> </ul> </div> <div> <div class="familylinks"> <div class="parentlink"><strong>Parent topic:</strong> <a href="rbagsenadbcs.htm" title="A DBCS file is a file that contains double-byte data or is used to process double-byte data. Other files are called alphanumeric files. You can view DBCS files on display, printer, tape, diskette, and ICF devices.">Work with DBCS data</a></div> </div> <div class="relconcepts"><strong>Related concepts</strong><br /> <div><a href="../dds/kickoff.htm">DDS concepts</a></div> </div> </div> </body> </html>