ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaki_5.4.0.1/rzakiexplfldbdy.htm

100 lines
6.8 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="concept" />
<meta name="DC.Title" content="Example: MINENTDTA (*FLDBDY)" />
<meta name="abstract" content="The following SQL script provides an example of the of the *FLDBDY value used with the Minimized entry specific data (MINENTDTA) parameter for the CRTJRN and CHGJRN commands." />
<meta name="description" content="The following SQL script provides an example of the of the *FLDBDY value used with the Minimized entry specific data (MINENTDTA) parameter for the CRTJRN and CHGJRN commands." />
<meta name="DC.Relation" scheme="URI" content="rzakiminendta.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2004, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2004, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzakiexplfldbdy" />
<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: MINENTDTA (*FLDBDY)</title>
</head>
<body id="rzakiexplfldbdy"><a name="rzakiexplfldbdy"><!-- --></a>
<img src="./delta.gif" alt="Start of change" /><!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Example: MINENTDTA (*FLDBDY)</h1>
<div><p> The following SQL script provides an example of the of the *FLDBDY
value used with the Minimized entry specific data (MINENTDTA) parameter for
the CRTJRN and CHGJRN commands.</p>
<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>
<div class="p"><pre>/* Setup of environment */
create collection payroll
create table payroll/wages (employee int, wages char(10),
startdate date, benefits char(50))
create index payroll/wageix on payroll/wages (employee)
CL:CHGJRN payroll/QSQJRN jrnrcv(*GEN) minentdta(*FLDBDY)
/* Changes against files to be audited */
insert into payroll/wages values (1001, '22.00/hour',
'01/01/2003', 'Qualifies for health benefits, 401k match')
insert into payroll/wages values (1002, '18.00/hour',
'10/01/2004', 'Qualifies for health benefits')
update payroll/wages set wages = '24.50/hour' where employee = 1001
update payroll/wages set wages = '19.00/hour' where employee = 1002
/* Auditing procedure */
CL:DSPJRN JRN(PAYROLL/QSQJRN) JRNCDE((R)) OUTPUT(*OUTFILE) OUTFILFMT(*TYPE5)
OUTFILE(PAYROLL/DSPJRNOUT) ENTDTALEN(*CALC) NULLINDLEN(4)
create table payroll/auditfile (fixeddata char(555), nvi char(4),
employee int, wages char(10), startdate char(10), benefits char(50))
CL:CPYF FROMFILE(PAYROLL/DSPJRNOUT) TOFILE(PAYROLL/AUDITFILE)
MBROPT(*ADD) OUTFMT(*HEX) FMTOPT(*NOCHK)
select nvi, employee, wages, startdate, benefits
from payroll/auditfile
Note: the NVI (Null value indicator) field houses metadata which reveals which columns residing within
the journal entry were collected and what variety of data they house. Some columns will house null
values for fields which were collected, some will house a copy of the data deposited during the update
operation, while others will house filler values representing the default value for that column. Such
filler values will appear on behalf of those columns whose contents were not changed and were not
required to be collected. These are the same columns which did not consume space within the journal
entry because a copy of their value was not collected. In order to recognize the difference between these
three varieties, refer to the table below. The first NVI character corresponds to the first field (EMPLOYEE
), the second NVI character
corresponds to the second field (WAGES), etc. When the NVI value is a '0', it signifies that an exact copy
of the field is present. When the NVI value is a '1', the corresponding field houses a null. When the
NVI value is a '9', the corresponding field was not collected (because it was minimized) and, therefore,
what will be displayed is the default value.
NVI EMPLOYEE WAGES STARTDATE BENEFITS
0000 1,001 22.00/hour 2004-01-01 Qualifies for health benefits, 401k match
0000 1,002 18.00/hour 2004-10-01 Qualifies for health benefits
0099 1,001 22.00/hour 0001-01-01
0099 1,001 24.50/hour 0001-01-01
0099 1,002 18.00/hour 0001-01-01
0099 1,002 19.00/hour 0001-01-01</pre>
The first 2 entries are
for the inserts. The second 2 entries are the update before image and update
after image for the first update. The last 2 entries are the update before
image and update after image for the final update. Notice that the update
entries have real data for the first 2 fields and default data for the second
2 fields as indicated by the null value indicators. The first field is collected
because it is a key field. The second field is collected because the data
within the field has changed. Any of the <strong>fixed</strong> journal entry information
(for example, sequence number, journal code) can also be included by either
substringing the <strong>fixed</strong> field in the audit file or creating the audit
file with fields formatted such as the *TYPE5 outfile.</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <img src="./delta.gif" alt="Start of change" /><a href="rzakiminendta.htm" title="On the Create Journal (CRTJRN) and Change Journal (CHGJRN) commands, you can specify to allow for the deposit of minimized journal entries. This will decrease the size of your journal entries.">Minimized entry-specific data for journal entries</a><img src="./deltaend.gif" alt="End of change" /></div>
</div>
</div>
<img src="./deltaend.gif" alt="End of change" /></body>
</html>