<HTML>
<HEAD>
<META name=vsisbn content="1583040374">
<META name=vstitle content="DDS Programming for Display and Printer Files, 2E">
<META name=vsauthor content="James Coolbaugh">
<META name=vspublisher content="29th Street Press">
<META name=vspubdate content="03/01/99">
<META name=vscategory content="Hardware and Operating Systems: Operating Systems: AS/400">
<TITLE>DDS Programming for Display and Printer Files, 2E:Appendix C CRTDSPF and CRTPRTF Command Summary</TITLE>
<!-- HEADER -->
<STYLE type="text/css">
<!--
A:hover {
color : Red;
}
-->
</STYLE>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<!--ISBN=1583040374//-->
<!--TITLE=DDS Programming for Display and Printer Files, 2E//-->
<!--AUTHOR=James Coolbaugh//-->
<!--PUBLISHER=29th Street Press//-->
<!--APPENDIX=C//-->
<!--PAGES=375-402//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="ewtoc.html">Table of Contents</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<H2><A NAME="Heading1"></A><FONT COLOR="#000077">Appendix C<BR>CRTDSPF and CRTPRTF Command Summary
</FONT></H2>
<P>The CRTDSPF (Create Display File) and CRTPRTF (Create Printer File) commands have a number of parameters that you may find confusing. Although an accurate description of these parameters is provided in the <I>CL Reference</I> (SC41-3722) manual and in the Help text (obtained by pressing the Help key from the command prompter), the interpretation we provide will clarify the meaning of the parameters.</P>
<P>We break the parameters into three sections. The first section contains the parameters common to CRTDSPF and CRTPRTF in parameter name (e.g., FILE and AUT), meaning, function, and valid values. The second and third sections list those parameters that are particular to one or the other command, or that — although they have the same name — have different meaning, function, or valid values. The parameters are listed in alphabetical order within each section.</P>
<P><FONT SIZE="+1"><B>COMMON PARAMETERS</B></FONT></P>
<P><FONT SIZE="+1"><B><I>AUT (Authority)</I></B></FONT></P>
<P>Determines the default authority for the public to the display or printer file. Valid values are *LIBCRTAUT, *CHANGE, *ALL, *USE, *EXCLUDE, or an authorization list name. The default value is *LIBCRTAUT.
</P>
<P><FONT SIZE="+1"><B><I>DECFMT (Decimal Format)</I></B></FONT></P>
<P>Specifies which decimal format is to be used when numeric data is edited via the EDTCDE keyword within the DDS source member. This determines the use of commas and periods. The valid values are *JOB and *FILE. *JOB indicates that the file will use the value found on the job attributes at the time the file is opened. *FILE indicates that the file is to use the decimal format defined at the time the file was created.
</P>
<P><FONT SIZE="+1"><B><I>FILE (File Name)</I></B></FONT></P>
<P>Receives the qualified name of the display or printer file being created. Only the file name portion is required, because the library portion defaults to *CURLIB (current library). The library portion can also be any specific library in existence. If you use *CURLIB but your job has no current library, the display or printer file is placed in QGPL.
</P>
<P><FONT SIZE="+1"><B><I>FLAG (Flagging Severity Level)</I></B></FONT></P>
<P>Indicates which compile error messages are to be listed in the compiler listing. For instance, FLAG(10) tells the compiler to list all messages that have a severity level of 10 or greater. The default value is 0; valid values are from 0-30 or the level indicated by the GENLVL parameter, whichever is less.
</P>
<P><FONT SIZE="+1"><B><I>GENLVL (Generation Severity Level)</I></B></FONT></P>
<P>During compilation, the compiler generates error messages of various severity levels. The GENLVL parameter tells the compiler the maximum acceptable severity level before compilation aborts. For example, GENLVL(25) would indicate that the compiler is to stop if an error message with a severity level of 26 or greater is issued. The default value is 20.
</P>
<P><FONT SIZE="+1"><B><I>IGCDTA (User-Specified DBCS Data)</I></B></FONT></P>
<P>For program-described files: indicates whether or not the file can process double-byte character set (DBCS) data. It can have the values *YES or *NO, with *NO being the default value.
</P>
<P>For externally described files: indicates whether or not to include additional DBCS attributes and identifies DBCS attributes of fields, values, and messages. Valid values are *YES and *NO (the default).</P>
<P><FONT SIZE="+1"><B><I>IGCEXNCHR (DBCS Extension Characters)</I></B></FONT></P>
<P>Tells the system whether to process DBCS extension characters, which are those characters not part of the printer’s internal character set. Valid values are *YES (the default) and *NO.
</P>
<P><FONT SIZE="+1"><B><I>LVLCHK (Record Format Level Check)</I></B></FONT></P>
<P>Each record format (in any type of file) has a level identifier, which is a system-assigned code. If the record format changes (e.g., by adding, changing, or removing fields), the level identifier changes.
</P>
<P>LVLCHK(*YES) tells the system to check the level identifier expected by the program that uses the display or printer file against the level identifier recorded in the *FILE object itself; if there is a mismatch, the system issues an *ESCAPE message and will not open the file. LVLCHK(*NO), on the other hand, disregards mismatches in level identifiers. The default value is *YES, and you should never use the value *NO because unpredictable results may occur.</P>
<P>The following events change the level identifier of a record format:</P>
<DL>
<DD><B>•</B> adding a new field
<DD><B>•</B> changing an existing field’s length or data type
<DD><B>•</B> removing a field
<DD><B>•</B> adding an indicator
<DD><B>•</B> removing an indicator
<DD><B>•</B> changing the order of the fields within the input or output buffer
</DL>
<P>The following events do not change the level identifier:
</P>
<DL>
<DD><B>•</B> adding a new constant
<DD><B>•</B> changing a constant
<DD><B>•</B> changing an existing field’s column heading or text (COLHDG or TEXT)
<DD><B>•</B> changing a field’s “cosmetic” attributes (such as COLOR or DSPATR)
<DD><B>•</B> removing a constant
</DL>
<P>Every time you compile the DDS for a display or printer file, the compiler produces a listing that may or may not include the DDS source code. The OPTION parameter determines whether the DDS is included. The parameter accepts a maximum of three options.
</P>
<P>The first option determines whether to print the DDS source code. The default is to print the code, as indicated by the values *SRC or *SOURCE. If you’d rather not print the DDS source code, specify *NOSRC or *NOSOURCE.</P>
<P>The second option determines whether to produce an expanded source listing, which includes references to other file descriptions. The default is to print the expanded listing, as indicated by *LIST. *NOLIST omits the expanded listing.</P>
<P>The third option tells the compiler whether to include or omit second-level text for the compiler messages. The default is to omit second-level text, as indicated by *NOSECLVL. If you choose to print second-level text (additional information may clarify why the compile failed), specify *SECLVL.</P>
<P><FONT SIZE="+1"><B><I>REPLACE (Replace File)</I></B></FONT></P>
<P>When you successfully compile the DDS source, the system needs to create the display or printer file you want. If the file already exists (from a prior compile), REPLACE(*YES) tells the system to replace the existing file with the new one. The old file is placed in library QRPLOBJ, while the new file is placed in the library you spe