ibm-information-center/dist/eclipse/plugins/i5OS.ic.dds_5.4.0.1/inquiryfileexamp.htm

231 lines
12 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="Example: An inquiry display with two record formats in DDS" />
<meta name="abstract" content="The display is defined by the DDS in this example. It is displayed by output operations to the record formats PROMPT and RESPONSE." />
<meta name="description" content="The display is defined by the DDS in this example. It is displayed by output operations to the record formats PROMPT and RESPONSE." />
<meta name="DC.subject" content="examples of DDS, inquiry display" />
<meta name="keywords" content="examples of DDS, inquiry display" />
<meta name="DC.Relation" scheme="URI" content="rbafpmstexamp.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1999, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1999, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="inquiryfileexamp" />
<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>Example: An inquiry display with two record formats in DDS</title>
</head>
<body id="inquiryfileexamp"><a name="inquiryfileexamp"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Example: An inquiry display with two record formats in DDS</h1>
<div><p>The display is defined by the DDS in this example. It is displayed
by output operations to the record formats PROMPT and RESPONSE.</p>
<pre class="screen">CUSTOMER FILE ADD/UPDATE
Enter new or existing customer number
Enter A to ADD new Customer
Name XXXXXXXXXXXXXXXXXXXXXXX
Address XXXXXXXXXXXXXXXXXXXXXXX
City XXXXXXXXXXXXXXXXXXXXXXX
State XX Zip code NNNNN
Credit limit $NNN,NNN.NN
F3 - End Program &amp; Print Report F6 - Return to prompt</pre>
<dl><dt class="dlterm"><em>Name XXXXXXXXXXXXXXXXXXXXXXX</em></dt>
<dd>If the cursor is positioned in the area with Xs on the NAME field and
the Help key is pressed, online help information will appear.</dd>
</dl>
<p>The following keywords are important in the example:</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="void" border="0" rules="none"><tbody><tr><td valign="top" width="50%"> <p>CAnn<br />
CHECK<br />
DSPATR(HI BL)<br />
DSPATR(UL)<br />
EDTCDE(Y)<br />
EDTCDE(2 $)<br />
ERRMSG</p>
</td>
<td valign="top" width="50%"> <p>HELP<br />
HLPARA<br />
HLPRCD<br />
HLPBDY<br />
HLPDOC<br />
OVERLAY<br />
PRINT</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>The example uses +n to specify position.</p>
<div class="fignone" id="inquiryfileexamp__o8"><a name="inquiryfileexamp__o8"><!-- --></a><span class="figcap">Figure 1. Display with two record formats</span><pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A <strong>(1)</strong> PRINT
00020A CAO3(21 'End &amp; Print')
00030A CAO6(22 'Display PROMPT')
00040A <strong>(7)</strong> HELP
00050A <strong>(8)</strong> HLPDOC(START GENERAL HELP)
00060A <strong>(2)</strong> R PROMPT
00070A H <strong>(9)</strong> HLPDOC(LBL1 HELP#1 HELP)
00080A <strong>(9)</strong> HLPARA(2 2 2 50)
00090A 1 30'CUSTOMER FILE ADD/UPDATE'
00100A 3 2'Enter new or existing customer +
00110A number'
00120A <strong>(3)</strong> ACTNUM 5 0B +1CHECK(MF)
00130A 40 <strong>(4)</strong> ERRMSG('Customer number not +
00140A <strong>(4)</strong> found' 40)
00150A 4 2'Enter A to ADD new Customer'
00160A ADD 1 I +1
00170A <strong>(5)</strong> R RESPONSE <strong>(6)</strong> OVERLAY
00180A H <strong>(10)</strong> HLPRCD(NAMEHELP)
00190A HLPARA(6 10 6 28)
00200A H <strong>(11)</strong> HLPRCD(ADDRHELP)
00210A HLPARA(7 10 9 33)
00220A <strong>(12)</strong> HLPBDY
00230A H HLPRCD(HELPRCD1 HELPFILE)
00240A <strong>(13)</strong> HLPARA(12 18 12 40)
A
A
A</pre>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00250A*
00260A 6 2'Name' <strong>(14)</strong>
00270A NAME 18 B 6 10 <strong>(14)</strong>
00280A 7 2'Address' <strong>(14)</strong>
00290A ADDR 18 B 7 10 <strong>(14)</strong>
00300A 8 2'City' <strong>(14)</strong>
00310A CITY 18 B 8 10 <strong>(14)</strong>
00320A 9 2'State' <strong>(14)</strong>
00330A STATE 2 B 9 10 <strong>(14)</strong>
00340A 9 19'Zip code' <strong>(14)</strong>
00350A ZIP 5Y 0B +1 <strong>(14)</strong>
00360A 12 2'Credit Limit'
00370A <strong>(15)</strong> CRDLMT 8Y 2B 12 21EDTCDE(2 $) DSPATR(HI)<strong>(16)</strong>
00380A <strong>(17)</strong> 23 2'F3 - End Program &amp; Print Report +
00390A F6 - Return to prompt'
00400A*
00410A* HELP RECORDS
00420A*
00430A R NAMEHELP
00440A 2 2'HELP TEXT FOR NAME FIELD'
00450A 4 2'ENTER THE CUSTOMER NAME'
00460A R ADDRHELP
00470A 4 2'HELP FOR ADDRESS,CITY,STATE,ZIP'
00480A 6 2'ENTER ADDRESS,CITY,STATE &amp; ZIP'
A
A
A</pre>
</div>
<p><strong>Legend:</strong></p>
<dl><dt class="dlterm">(1)</dt>
<dd>The PRINT keyword allows the display station user to print the display
at any time by pressing the Print key.</dd>
<dt class="dlterm">(2)</dt>
<dd>An application program displays a prompt by issuing
an output operation to the record PROMPT, displaying the constant fields 'CUSTOMER
FILE ADD/UPDATE', 'ENTER EXISTING CUSTOMER NUMBER', 'ENTER A TO ADD NEW CUSTOMER',
and the named fields ACTNUM and ADD.</dd>
<dt class="dlterm">(3)</dt>
<dd>The CHECK(MF) keyword specifies that when the user types into one position
of the field ACTNUM, he must type into all five positions before pressing
the Enter key, or an error message is displayed and the keyboard is locked.
The user must press the Reset key and reenter through the input field.</dd>
<dt class="dlterm">(4)</dt>
<dd>If record format PROMPT is displayed and your program sets on indicator
40 when an output operation is sent to record format PROMPT, the error message
'Customer number not found' is displayed on the message line (line 24 of the
24-line display unless the MSGLOC keyword is specified). The message is highlighted,
field ACTNUM is displayed with its image reversed, and the keyboard is locked
until the user presses the Reset key.</dd>
<dt class="dlterm">(5)</dt>
<dd>After the user presses the Enter key, the application
program retrieves the required information from the database and sends an
output operation to record format RESPONSE, displaying the fields described
in the next paragraphs.</dd>
<dt class="dlterm">(6)</dt>
<dd>The OVERLAY keyword specifies that an output operation
to this record format (RESPONSE) does not cause the entire display to be cleared,
as it is by default.</dd>
<dt class="dlterm">(7)</dt>
<dd>The HELP keyword enables the Help key for this display.</dd>
<dt class="dlterm">(8)</dt>
<dd>The HLPDOC keyword specified at the file level identifies the document
to be displayed when no help area for the active records contains the current
cursor location.</dd>
<dt class="dlterm">(9)</dt>
<dd>The HLPDOC and HLPARA keywords on this H specification specify that the
HELP#1 document in the HELP folder will be displayed starting at the LBL1
help label if the Help key is pressed while the cursor is in positions 2 through
50 of line 2.</dd>
<dt class="dlterm">(10)</dt>
<dd>The HLPRCD and HLPARA keywords on this H specification cause the record
NAMEHELP to be displayed if the Help key is pressed while the cursor is in
positions 10 through 28 of line 6. The record NAMEHELP is defined in this
display file; therefore, a file name does not have to be specified on the
HLPRCD keyword. <div class="note"><span class="notetitle">Note:</span> When using application help keywords, the screen is
automatically cleared.</div>
</dd>
<dt class="dlterm">(11)</dt>
<dd>The HLPRCD and HLPARA keywords on this H specification
cause the ADDRHELP record to be displayed if the Help key is pressed while
the cursor is in positions 10 through 28 of line 7, 8, or 9.</dd>
<dt class="dlterm">(12)</dt>
<dd>The HLPBDY keyword limits the help records displayed when the Page key
is pressed. If either NAMEHELP or ADDRHELP is displayed when the Help key
is pressed, the NAMEHELP and ADDRHELP records are accessible using the Page
key. If HELPRCD1 is displayed when the Help key is pressed, the help records
from other H specifications are not accessible using the Page key.</dd>
<dt class="dlterm">(13)</dt>
<dd>The HLPRCD and HLPARA keywords on this H specification cause the record
HELPRCD1 in the file HELPFILE to be displayed if the Help key is pressed while
the cursor is in positions 18 through 40 of lines 12 through 40. This record
is in a separate display file called HELPFILE.</dd>
<dt class="dlterm">(14)</dt>
<dd>Five constant fields ('Name', 'Address', 'City', 'State', and 'Zip Code')
and five named fields (NAME, ADDRES, CITY, STATE, ZIP) are grouped together
on the display by the line/position specifications. NAME, ADDRES, CITY, and
STATE default to character-type fields (A in position 35) because no decimal
positions are specified. ZIP is a numeric-only, integer field (Y in position
35; 0 in position 37), so its display length equals its specified length.</dd>
<dt class="dlterm">(15)</dt>
<dd>The field CRDLMT is specified with EDTCDE (2 $).
EDTCDE(2) is used for monetary amounts, and the $ specifies the floating
currency symbol.</dd>
<dt class="dlterm">(16)</dt>
<dd>The DSPATR(H1) keyword highlights the field CRDLMT.</dd>
<dt class="dlterm">(17)</dt>
<dd>Instructions to the workstation user are generally
located at the bottom of the display, just above the message line.</dd>
</dl>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafpmstexamp.htm" title="This topic provides examples of data description specifications (DDS) for each type of file discussed in this topic. If you choose, you can use the examples in this topic with appropriate high-level language programs.">Examples: DDS for each file type</a></div>
</div>
</div>
</body>
</html>