A73 Programmers Guide PDF
A73 Programmers Guide PDF
A73 Programmers Guide PDF
Programmer’s Guide
Version A7.3
Copyright Notice
Copyright © 2012, Oracle. All rights reserved.
Trademark Notice
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their
respective owners.
License Restrictions Warranty/Consequential Damages Disclaimer
This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and
are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not
use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish or display any part, in any
form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for
interoperability, is prohibited.
Subject to patent protection under one or more of the following U.S. patents: 5,781,908; 5,828,376; 5,950,010; 5,960,204; 5,987,497;
5,995,972; 5,987,497; and 6,223,345. Other patents pending.
Warranty Disclaimer
The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors,
please report them to us in writing.
Restricted Rights Notice
If this software or related documentation is delivered to the U.S. Government or anyone licensing it on behalf of the U.S.
Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTS
Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are
"commercial computer software" or "commercial technical data" pursuant to the applicable Federal
Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and
adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent
applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer
Software License (December 2007). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065.
Hazardous Applications Notice
This software is developed for general use in a variety of information management applications. It is not developed or intended for
use in any inherently dangerous applications, including applications which may create a risk of personal injury. If you use this
software in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy and other
measures to ensure the safe use of this software. Oracle Corporation and its affiliates disclaim any liability for any damages caused
by use of this software in dangerous applications.
Third Party Content, Products, and Services Disclaimer
This software and documentation may provide access to or information on content, products and services from third parties. Oracle
Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third party
content, products and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred
due to your access to or use of third party content, products or services.
Contains GNU libgmp library; Copyright 1991 Free Software Foundation, Inc. This library is free software which
can be modified and redistributed under the terms of the GNU Library General Public License.
Includes Adobe PDF Library, Copyright 1993-2001 Adobe Systems, Inc. and DL Interface, Copyright 1999-2008 Datalogics Inc. All
rights reserved. Adobe is a trademark of Adobe Systems Incorporated.
Portions of this program contain information proprietary to Microsoft Corporation. Copyright 1985-1999 Microsoft Corporation.
Portions of this program contain information proprietary to Tenberry Software, Inc. Copyright 1992-1995 Tenberry Software, Inc.
Portions of this program contain information proprietary to Premia Corporation. Copyright 1993 Premia Corporation.
This product includes code licensed from RSA Data Security. All rights reserved.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/).
This product includes cryptographic software written by Eric Young ([email protected]).
This product includes software written by Tim Hudson ([email protected]). All rights reserved.
This product includes the Sentry Spelling-Checker Engine, Copyright 1993 Wintertree Software Inc. All rights reserved.
Open Source Disclosure
Oracle takes no responsibility for its use or distribution of any open source or shareware software or documentation and disclaims
any and all liability or damages resulting from use of said software or documentation. The following open source software may be
used in Oracle's JD Edwards World products and the following disclaimers are provided.
This product includes software developed by the Apache Software Foundation (http://www.apache.org/). Copyright (c) 1999-2000
The Apache Software Foundation. All rights reserved. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE
FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Table of Contents
Overview ....................................................................................................................................................... 3
What’s in this Publication ..................................................................................................................... 3
Other Publications................................................................................................................................. 3
This publication provides detailed technical information for the A7.3 software
release from J.D. Edwards. It is written for programmers that integrate other
software with J.D. Edwards software, or customize J.D. Edwards software for
their particular needs. It does not provide an understanding of the “big
picture,” or how programs work together within the J.D. Edwards system, but
it has details of specific interest to the programmer.
This publication includes database and system changes for the following
product groups:
Other Publications
Use this publication with the technical upgrade notes, which are provided by
J.D. Edwards in two ways:
Reinstallation Workbook
Upgrade Reference Guide
If you have suggestions for items to include or not include in this document,
call your J.D. Edwards Worldwide Customer Support representative.
Database Changes
This chapter lists database changes for financial systems and electronic
commerce.
Financial Systems
Fields Added
New Files
Obsolete Files
File Description
Message Log Ledger File - Obsolete Physical (replaced by F01131,
F0113 F01132, F01133)
Obsolete logical over F0113
F0113LA
Electronic Commerce
Fields Added
F470161 EDI P.O. Additional Header This file contains additional tax Z3
- Outbound and terms data
F470171 EDI P.O. Additional Detail - This file contains additional tax Z4
Outbound and terms data
F471861 EDI Product Transfer and This file contains additional tax S3
Resale Report Additional and terms data
Header - Outbound
F471871 EDI Product Transfer and This file contains additional tax S4
Resale Report Additional and terms data
Detail - Outbound
This chapter describes changes made to the J.D. Edwards e-mail (PPAT)
system.
File Normalization
As of release A7.3, the Message Log Ledger File has been broken up into three
different files as part of a significant enhancement to the PPAT system. We also
added two new files to support new features in the system. Following is a brief
description of the type of information contained in each file. The final section is
an explanation on how to use the called program X00PPAT1 to send automatic
e-mail messages from within other programs.
This file contains the information from the header portion of a PPAT message
such as Sender, Recipient, and Mailbox ID. This file is uniquely keyed on the
following field:
This file contains the detail text of a PPAT message. It is uniquely keyed on the
following fields:
A new system feature in A7.3 is the ability to establish bulletin boards that users
may subscribe to if they are interested in viewing the contents. This file contains
information about who has subscribed to each bulletin board. This file is
uniquely keyed on the following fields:
User ID (ZWUSER)
User Class/Group (ZWUGRP)
Bulletin Board Address Number (ZWAN8)
This program can be called from within any other program and will send an
automatic e-mail message to a recipient. For example, in the standard J.D.
Edwards software, we use this module to send messages from our Purchase
Requisition Entry program to the approver of each requisition. The message
alerts the approver that there is a requisition awaiting their approval.
An additional optional feature of this module is the ability to turn the message
into an “active message”. When F15 is pressed on the message text viewing
screen on an active message, the user will be automatically exited to a program
that will help them carry out the requested action. In the above purchasing
example, we use F15 to send the approver directly to the Purchase Requisition
Approval program with the required requisition record preloaded on the screen
for their review. Anything you can do from an AS/400 command line can also
be done with an active message.
(*CHAR 8) (*CHAR 2)
The text in bold type is the actual message the user will see. Notice the
characters ‘&1’ and ‘&2’. These are the “placeholders” for variable text
that you want substituted in at runtime. In this case, we want to include
the specific purchase requisition document number and document type
in each message. The information at the very bottom of the screen is the
definition of the data items that are going to be substituted in place of
the ‘&’ items. In this case, Document Number is an eight-byte character
field that will be substituted for ‘&1’ and Document Number is a two-
byte character field that will be substituted for ‘&2’. The definitions must
be entered on the last line of the screen exactly as shown.
NOTE: The data item name must start with the characters ‘JDE’ and the
item must be created in glossary group ‘J’.
2. Once the data dictionary item is in place, you must make it available to
X00PPAT1 by running a batch job that will write the template from the
NOTE: Additional details about the parameters and how to use them
are included as comments in the source code for X00PPAT1.
This step is actually a repeat of the above three steps with some minor changes.
As mentioned earlier, you can do anything with an active message that you can
The way you create the command string is almost exactly the same way you
create the viewable message:
1. Create a data dictionary template. The only difference here is that this
template is actually the shell of an interactive CL command with ‘&’
values in place of the actual parameters that will be supplied at runtime.
For example, the template for the call to the Purchase Requisition
Approval program would look like this:
CALL P43080 (‘&1’ ‘&2’ ‘&3’ ‘&4’ ‘&5’)
2. Run batch job J98DDMSGF. No change here.
3. Call X00PPAT1. Other that the obvious fact that this call should include
information about the command string template rather that the message
template, there is only one minor but critical difference to note. You
must pass in the serial number that you receive back from the first call
(see the output parameter description above) as an input parameter to the
second call. This is so we can associate this command string with the
viewable message that was just created. This link enables the message
display program to know which command string to execute with a
particular message.
Database Changes
This chapter lists database changes for the distribution, manufacturing, and load
and delivery management systems.
Fields Added
Fields Changed
Fields Deleted
New Files
File Description
New Logicals
An item can now be marked as obsolete. This is done using the Stocking Type
field (STKT) in the Item Branch Master file (F4102). The values of ‘O’ for
Obsolete and ‘U’ for Obsolete - Use Up are now hard-coded in the appropriate
distribution and manufacturing programs.
The voucher match program has been modified to update the receiver file
differently for a 2-way match. During the 3-way match process, the ‘1’ match
type receipt record (PRMATC = ‘1’) was created during receipts, and the ‘2’
match type receipt record (PRMATC = ‘2’) was created during voucher match.
For the 2-way match process, both ‘1’ and ‘2’ match type receipt records were
created during voucher match. The 2-way match process has been modified to
no longer create ‘1’ match type receipt records during voucher match.
If you have ‘custom’ programs that use this type ‘1’ 2-way match record, you
can identify where the match type ‘1’ records came from by using the Written
By Program (PRRTBY) field. This field will contain a BLANK if the record was
written by the receipts program for a 3-way match. This field will contain a ‘02’
if the record was written by the match program for a 2-way match.
If you do not have ‘custom’ programs using this record, then no conversion will
be necessary. The information in the records will be updated correctly as you
perform the matching process.
The order process has been enhanced so that the customer open order amount
will NOT include amounts from orders that are COD or for which cash has
been or will be paid.
This requires modifications to all programs that update the open order amount
in the customer master record based on an amount accumulated from an order
detail line. This is accomplished by using the payment instrument (RYIN). A ‘1’
in the first position of the special handling code of the UDC table 00/PY
indicates this payment instrument is cash.
The F49211 sales detail tag file is currently used by ECS. This file was changed
to a system 40/40 and in A7.3 is also used by the base sales system. The base
sales system will only write a record to the F49211 if the client is using the new
inter-branch invoicing or invoice cycle. For ECS clients, a F49211 record will
exist for every sales detail line as it does in A7.1. Code was added to check for
the existence of the F49211 record in specific programs (see below).
Inter-Branch Processing
In A7.1, the field SDSO01 was set to a ‘1’ to indicate the order was an inter-
branch order. Programs checked this field equal to a ‘1’ or not equal to a ‘1’.
Invoice Cycle
$49211 IFEQ ’ ’
OPEN F49211 81
*IN81 IFEQ *OFF
MOVE ’1’ $49211 1
END
END
The price files F4070, F4071, F4072, F4075, F4076, and F4106 now have a
corresponding audit file (F4070A, F4072A, and so on) that is written to,
whenever a record in these files is changed. A record is written to the audit file
before the change, and then a record is written to the audit file with new data.
Programs updating any of these files are changed to write to the audit file if the
Pricing Audit (Y/N) flag is set to ‘Y’. This flag is located on the pricing
constants window.
Currently there is no way to ensure the integrity of related sales and purchase
orders created during the Transfer Order procedure. This procedure creates
related sales and purchase orders. However, changes to these orders in their
respective systems do not affect the related order. Changes to the related order
have to be done manually, creating duplication of labor and adding to the
possibility of keying errors.
The programs to be modified for sales order/purchase order integrity will be:
To update a sales order detail line generated by Transfer Order Entry (P4201A),
a server will be called to update the related purchase order detail line.
Conceptual Approach
For sales and purchase orders generated by Transfer Order Entry, a flag will be
set in both detail records to mark these records as being generated from these
procedures. Also, any procedure in the Sales Order System that updates these
sales orders will call a server to update the related purchase order. The fields to
be updated include branch plant, quantities, cost amounts, lot numbers, serial
numbers, unit of measures, and prices.
1. The client goes into the Enter Sales Order procedure and updates the
sales order.
2. After the sales order has been updated, a server is called and the related
Purchase Order is updated.
The following logic flow describes the Enter Sales Order - Line Mode
procedure.
3. The client goes into the Enter Sales Order - Line Mode procedure and
updates a detail line.
4. After the sales order detail line has been updated, a server is called and
the related purchase order detail line is updated.
The following logic flow describes the Ship Confirm procedure.
5. The client goes into the Ship Confirm procedure and follows the normal
confirmation process.
6. After the sales order has been updated, a server is called and the related
purchase order is updated, including the mirroring of any split detail lines
on the sales order.
Database Specifications
The use of field PDPS01 in the Purchase Order detail file (F4311) and field
SDSO11 in the Sales Order detail file (F4211) will be updated for line items
generated by the Sales Transfer Order procedure. These flags will enable the
update programs in the Sales Order System to identify which sales orders have
related purchase orders to be updated.
Program Specifications
This is a new server to be called when a sales order generated by the Transfer
Order procedure is updated. This server will update the related purchase order
with the changes to the inventory detail lines of the sales order. This is
determined by flag SDSO11 in the sales order detail record being set to ‘1’.
Summary Matching/Re-Costing
There are two issues that some companies encounter when processing invoices.
The first issue is the receiving of an adjustment invoice for product that was
already invoiced. This may occur due to a price change that affected the
product shipped to the company. This also may be a correction amount for the
initial invoice that was billed in error. In either case, the company needs to
adjust the previous voucher to reflect the new cost.
The second issue is that some companies process large volumes of transactions
in a given period. They may, however, receive summarized invoices for
numerous transactions. Matching these individual receipts to the summarized
line on the invoice is a slow and error-prone task.
Objectives
Scope
This issue will require the following new programs as well as modifications to
existing programs:
See the detail designs for each of the following programs for specific impact.
Conceptual Approach
Display
The receipts displayed can be receipts that have not been vouchered or receipts
that have already been vouchered. The receipts that have not been vouchered
(type 1) will be matched with the invoice and closed. The receipts that have
been vouchered will create an adjustment voucher that is associated with the
original receipt.
Matching (Vouchering)
Once the information displayed is verified, then the subfile lines may be matched
in detail or summary mode. In detail mode, the program would simply call the
P4314 (Detail Voucher Match) program for each receipt or voucher that exists
for the subfile line to be processed. If the display mode is summary, then the
program will call the P4314 program for every receipt record that was
summarized into the subfile line.
An entry that contains the version of program P43800 to call will be written to
a data queue (D43800). The data queue will activate the sleeper program
J43800Q, which will call P43800.
The P43800 program will then read the receipts file for all records flagged with
‘P’ in the processed field. It will then chain to the F43800 file to retrieve the
new cost information for that receipt. Once the new information is received,
records will be written to the EDI files F47041 and F47042 to represent the
voucher.
Once all records are processed, the P43800 program will call the P470411
program to match the receipts.
Database Specifications
Existing Files
F43121LF Purchase Order Receiver File - Logical File - Match Type, Supplier Number,
Item Number, Business Unit, Receipt Date
New Files
F43121LJ Purchase Order Receiver File - Logical File - Match Type, Supplier Number,
Contract Number, Contract Number, Item Number
F43121LK Purchase Order Receiver File - Logical File - Match Type, Supplier Number,
Supplier Remark, Item Number
Term Definitions
Term Definition
LSN The item’s lot/serial number. This is the lowest trackable unit. Throughout
the Programmer’s Guide, we will use this term to refer to the lot or serial
number.
Serialized This implies that the item has an LSN and has been set up so that the
Tracked Item quantity for the item may not exceed one.
Lot-Tracked This implies that the item has an LSN and has been set up so that the
Item quantity for the item may exceed one.
Memo Lot 1 A higher classification or grouping of serialized items. For example, a group
of items will have unique serial numbers but the same lot number.
Memo Lot 3 A higher classification or grouping of memo lot 1 and memo lot 2.
Serial Number This field, in the current J.D. Edwards system, controls whether an item
Required requires a serial number to be entered during shipment confirmation. These
(SRNR) values will remain the same to provide consistency with the current J.D.
Edwards system and will be referred to as basic serial number processing.
This design document will only address the new advanced serial number
processing. Three new values will be added to this data item to control
memo and supplier lot functionality for the advanced serial number
processing.
3 Supplier lot number required (Purchasing only).
4 Supplier lot number required (Purchasing only). Lot 1 required
(Purchasing, Sales Order Processing, Manufacturing, and
Inventory).
5 Supplier lot number required (Purchasing only). Memo Lot 1
required (Purchasing, Sales Order Processing, Inventory, and Shop
Floor Control). Memo Lot 2 required (Purchasing, Sales Order
Processing, Inventory, and Shop Floor Control).
N No serial number processing.
Y Basic serial number processing.
Purchasing
There are no changes to this file. It will contain a record for each item with a
serial number attached to it. The quantity will be restricted to no more than one
when the rules dictate it.
Inventory Management
F4101 Item Master There are no changes to this file. The LSN designation
can be made here to default into the Item Branch
records. This applies to the Lot Process Type and
Serial Number Required fields also.
F4102 Item Branch There are no changes to this file, but the Lot Process
Type and Serial Number Required fields will be
looked at here by all appropriate programs for LSN
processing.
F41021 Item Location There are no changes to this file. It will contain a
record for each item with a serial number attached to
it. The quantity will be restricted to no more than one
when the rules are set accordingly.
F4108 Lot Master Three new fields were added to maintain related lot
information for serial number items. The three new
fields are Memo Lot 1, 2 and 3 and were added in the
A7.1 release. All three of these fields will be
maintainable using the Lot Master Revisions program
(P4108). Memo Lot 1 or Memo Lot 1 and 2 may be
required throughout the transaction programs,
depending on the Serial Number Required field
(SRNR) for the item.
A new file will be added that contains fields to identify work order assemblies
with LSN’s.
There are no changes to this file. It will contain a record for each item with a
serial number attached to it.
The Lot Number (LOTN) field will be used for both serial and lot numbers
depending on tracking required for individual items.
We will display only 12 characters of the LOTN field for allowing entry of
either the serial number or lot number.
We will only display and use the Memo Lot 1 and Memo Lot 2 fields. The
exception to this will be on the Lot Master maintenance video where all three
will be displayed and maintained. Memo Lot 3 will be retained for future use.
All current lot processing functions (such as lot expiration date, lot status code,
duplicate lots allowed, and so on) will continue to function over the LSN. This
will require an expiration date for all LSN-controlled items.
The original serial number processing for purchase order and sales order
processing will continue to exist and will be referred to as basic serial number
processing. You cannot do both the basic and advanced serial number
processing simultaneously on an item.
During sales order entry, if an item is serialized, the transaction unit of measure
must be in primary.
The on-hand flag will determine when time a serial number must be entered.
This means that a serial number must be attached to a transaction before the
process can be moved to on-hand. However, in receipt routing, the serial
number can be assigned during any step in the process.
In the purchasing system, an item can be entered into the system as you can
currently do today, but when an item is received, whether through receipt
routing or not, the receipt must be entered by using the Primary Unit of Measure
field when the item allows serial numbers.
A purchase order receiver record will exist for every serial number moved to an
on-hand status by using the receipts program or the receipts routing process.
Inventory
LSNs can be assigned to specific assemblies at any time before work order
completion by using the Assign Work Order LSN program. Assembly LSNs
can also be assigned at the time of work order completions by using the
Associate Issued Item LSNs program.
Program Purpose
This server will be modified to process the LSN based on the new SRCE values
and perform the additional edits. The item’s SRCE value will be checked when
processing an item. If the item’s SRCE value is a 4, 5, 6, or 7, this program will
ensure that the resulting quantity of the transaction being performed does not
exceed one. This quantity check should occur across all locations and branch
plants (see X41QTY).
Nature of Change
All current edits being performed over the LOTN field based on the current
SRCE values should include the new SRCE values.
The following list represents all programs calling this server. These programs
will be affected by the server changes but will not need to be changed:
Purpose of Program
This server will be used to check item locations that are under LSN control to
ensure that transactions manipulating inventory quantities do not result in a
quantity for the item that exceeds one (1). This server will check the existing
quantity for an item’s LSN across all branch plant locations marked as quantity
restricted. This program will ensure that the quantity in the system, plus the
quantity of the transaction for the LSN, cannot exceed one (1).
Program Type
Server routine.
Special Logic
When calling this program, two errors parameters are returned. The first should
be a hard error that indicates that a quantity restrictions attempt violation. The
second error should be considered a ‘soft’ error. Some programs have
processing options (indicating restrictions on item replenishment) that will
indicate if this additional error parameter should be checked. If a program does
not contain this processing option, this error parameter should be ignored.
Program Purpose
This server will be modified to update the new Memo Lot fields in the Lot
Master file from the calling programs. All programs that are used by this server
will need the Memo Lot fields added to the data structures. If a program allows
entry of memo lot information, those values will need to be moved into the
program data structure so that this routine can create the LSN Master records
with the correct information. This functionality will only be available for the
creation of the LSN master records.
Nature of Change
The following programs call this server and will need to be changed to pass in
the new Memo Lot fields in the data structure:
Program Name
Program Purpose
This program will generate LSNs for new balance records based on the SRCE
value for the item. This routine will be enhanced to generate the LSN based on
the new SRCE values being added to the system.
Nature of Change
The program currently processes with A5 logic for the SRCE field, and uses the
values ‘6’ and ‘7’ for SRCE. This code will be removed from the program.
The program currently generates an LSN based on the SRCE value of ‘1’ or ‘2’.
This routine will be modified to include the new SRCE values (SRCE = ‘5’ and
‘6’). All processing for SRCE ‘1’ and ‘2’ will be performed for SRCE ‘5’ and ‘6’
respectively.
Program Purpose
This program currently contains two formats. One format is used during the
sales cycle and the second is used during the purchasing cycle. The new Memo
Lot 1 and 2 fields and the Vendor Lot field will also be added to both formats.
The LSN expiration date and status code will also be added to the sales format.
When called from the purchasing programs, the calling programs should ensure
proper editing is performed to ensure that the item’s LSNs, Vendor Lot, and
Memo Lot 1 information are entered (if required). This editing information will
be retrieved from the item’s SRCE and SRNR values.
When called from ship confirmation, this program will allow the user to record
the LSN, vendor lot, and Memo lot 1 and 2 values for the first time for items
containing a SRCE value of four (4 - LSN optional with a quantity restriction)
and/or an SRNR value of 1 through 3.
Nature of Change
Add the Memo Lot 1 and 2 and Vendor Lot fields to both formats.
Add the LSN expiration date and status code to the second format.
For the purchasing format, the lot fields will be in the header and
will default to the subfile lines in which no lot field information has
been entered.
The following logic should be performed for inventory receipts.
When entering an item’s LSN, the new SRCE values should be
included for the edit checks.
All editing for SRCE value 0 should include SRCE 4.
All editing for SRCE value 1 should include SRCE 5.
All editing for SRCE value 2 should include SRCE 6.
All editing for SRCE value 3 should include SRCE 7.
When processing an item with a SRCE value of 5-7, or when the
item’s SRCE value is 4 and a value has been entered in the LOTN
field, the X41QTY server should be called. The item number,
MCU, and transaction quantity should be passed to this server.
This server will then determine if the quantity for this transaction
will result in a quantity for the item’s LSN to be greater than one.
The appropriate error message should be issued from this
program.
The item’s SRNR value should be checked and based on its value
required by the Vendor Lot and Memo Lot 1 and 2 values.
Program Name
This window will display: memo lot 1 and 2, vendor lot, LSN range, and lot
status (inventory only). A parameter is passed to this program to indicate if the
calling program is a purchasing, sales, inventory, manufacturing, or warehouse
program. The program will pass back any values entered in the window to be
used by the calling program to display only the LSNs that pass the criteria.
Multi-Location (P42053)
Item Summary (P41202)
Purpose of Program
This program is used to select items from multiple locations and return the
quantities selected to the calling program. Some additional fields will be added
to allow the user to vary the way items are viewed/selected. This window
program is called from a number of applications. These applications must have
their processing options set to enable this program.
Nature of Change
The video will have the following new fields added to it. These fields will allow
the user to view/select items by using different search criteria.
Fields Description
Item Number Display all locations for an item. The search window will also call
P40SEL through a function key for the additional search criteria.
Memo Lot 1 Display only those LSNs for this Memo Lot 1 value (LSN mode only).
Memo Lot 2 Display only those LSNs for this Memo Lot 2 value (LSN mode only).
Stock Valuation provides the tools for companies to effectively determine their
stock values for reporting and evaluating their profit margins. Stock valuation is
calculated monthly, quarterly, or yearly.
Objectives
Scope
Program Title
Program Title
Database Specifications
New files
F3911JA F4111/F3911
Container Management
The sale of products in containers have a unique inventory process that requires
an enhanced inventory management system compared to the standard
Distribution industry systems. The containers are not sold to the customers,
only the product in the containers are sold. Hence, the container is only loaned
to the customer for the storage of the product sold. A customer may have one
or more containers in their possession based on their need and application and
will periodically return the empty containers to the company in exchange for
full containers.
Objectives
Allow the company to account for the containers that they own. This is
imperative, since the containers are of high value to the company,
ranging from three to four times the cost of the product sold in them.
Track and manage the deposits and rental fees per container as charged
for each customer.
Scope
Database Specifications
New files
Database Changes
New files
Fields Added
Data Dictionary
Fields Changed
File Servers
Purpose of Program
This program will perform two major functions within the Agreement
Management system. In search mode, it will perform a contract search based on
the parameters passed from the calling program. In edit mode, it will edit the
agreement and contract supplement.
Parameters
The following parameters will be used to receive data from and send data to the
calling program. Note that the bulk of the parameters will be defined within a
200-byte data structure to better allow for additional parameters being added at
a later date.
Purpose of Program
Parameters
The following parameters will be used to receive data from and send data to the
calling program. Note that the bulk of the parameters will be defined within a
200-byte data structure to better allow for additional parameters being added at
a later date.
The next five fields represent the unique key to a F38012 record for purposes
of updating commitment quantities.
The next three fields represent the item, quantity (with UOM) to be committed.
The next four fields represent the order line keys to be used if a committed
quantity needs to be added or reversed.
Conversion Programs
Purpose of Program
The Actual Trip Detail Conversion program is a DREAM Writer program that
will create Actual Trip Detail (F49110) records from the Trip Detail File
(F4911) for trips that have not been delivery-confirmed.
Processing Options
The UOM conversion server is used to retrieve conversion factors from the
primary unit of measure for an item. It can also be used to convert any given
unit of measure to any other unit of measure, as long as both units are in either
the Item Specific conversion table (F41002) or the Standard conversion table
(F41003).
Although there were several changes internal to the UOM conversion server,
only two could affect other programs:
Configurator Enhancements
Modularization
The existing processing for the configurator was broken into manageable units
based on functionality. This structural change was necessary both to simplify
implementing current and future enhancements as well as to provide a means of
calling certain parts of the configurator through batch programs. The programs
that were modularized are Configured Item Specifications (P3294), formerly
known as ATO Coded Specification Entry, and the Sales Order Detail Server
(X3294). What follows are descriptions of the configured Item Specifications
program and the Sales Order Detail Server as they currently exist and
descriptions of new programs created.
The Configured Item Specifications program was changed to remove all rule
processing. The program includes the calling of the Configurator window, the
handling of function keys attached to the window, and the simple edits derived
from entering values by using Configured Item Segments (P3291). Even these
edits were placed in a copy module executed by the Configured Item
Specifications program. The copy module is C3294, Configured Item Segment
Editing. This module will process the edits for the UDC tables, numeric yes/no
fields, and upper and lower segment values.
Prior to the A7.3 enhancement, the Sales Order Detail Server was called once
for each sales line item that would be written by the configurator. P3294 and
X3294 were changed so that the Sales Order Server will only be called once to
update a configured item. In order to implement this change, the structure of
X3294 was modified. Rather than being organized to process one sales line at a
time, the program will now loop through the existing logic a number of times
equal to the number of records read from the sales detail user index. Following
the write of the detail records, the parent record will be written.
In addition to processing ‘R’ and ‘P’ rule types, Process Work Orders (P31410)
will also process the new ‘Q’ rules. This rule type was also implemented to
improve interactive performance. Parts that do not need to be included as a line
item on the sales order can be ‘Q’ rather than ‘P’ rules. The part will still appear
on the parts list but will not be processed interactively and placed on the sales
order. ‘Q’ rules are processed only interactively when the kit pricing method
chosen is price by components. To calculate an accurate price or cost for the
configured item, ‘Q’ rules are interpreted. However, the ‘Q’ parts rules are only
used as far as determining price or cost, and when the Configurator Constant
option ‘Cost Quotes’ is set to ‘Y’. Updates to the sales order will not take place.
A new file was created that contains a “string” of information for each
configuration. This string will be composed of segment values for all
levels of the configuration, including respective configured items for
multi-level configured items. Each occurrence in this file will be unique
by configured string identifier per item.
This file contains the same information as the Configured String Master
file except that each segment and its respective value will be stored in a
separate record.
In addition to being used for keeping track of the different
configurations that can be stocked, these files were also found to be
useful when interpreting rules from Process Work Orders (P31410).
Assembly Inclusion Rules can be based on values input at any level of a
configuration. Prior to the creation of these files, the configured string
was pulled apart, separated, and each piece of the string was read until
the necessary portion was located. Through the use of the string files,
batch processing can be accelerated by finding a value with a single read
to the Configured String Detail.
The configured string within Configured String History (F3294) has been
increased from 360 bytes to 500 bytes. This represents the maximum
length of a string for each configured component, at each level, as well as
the configured parent. The Configured String Master (F32941) has a
1000-byte field used to store a concatenation of configured strings at all
levels of a configuration. The 1000-byte field is used to search for a
matching string to reuse configured string ID numbers. Although the
optimal situation would be a concatenated string that is less than 1000
bytes, the F32941 file also contains a sequence number used for
overflow. Processing overflow records will not perform as quickly as the
direct approach of searching on the first 1000 bytes.
Sequence Number
The parameter list used when an external program is called was changed for
version A7.3. Prior to this release, the call using the external program field that
is available in Assembly Inclusion Rules was coded as follows:
49.00 C*
50.00 CSR CALL KYEPGM
51.00 C* ---- ------
52.00 CSR PARM PSITM 80
53.00 CSR PARM PSMCU 12
54.00 CSR PARM DSKITP Sales info
55.00 CSR PARM PSEXVR 30
56.00 C*
The difference between the two calls is that the third parameter is a data
structure that holds all of the information passed in by Sales Order Entry. This
gives clients access to the sales order header information, detail line
Configurator Constants
This file was created as a tag file to Sales Order/Purchasing text file
F4314. The Configured Model Text file contains the sequence number
for all levels of the configuration. When text is placed on a work order,
this file is used to quickly determine which text lines match up with
specific levels of the configuration.
A new feature was created to enable rule processing to perform a lookup from a
pre-defined table based on segment values selected in the configuration process.
A field was added to Assembly Inclusion Rules to provide for entry of the name
of the table to be accessed. This new feature will include programs to create and
maintain tables, as well as a retrieval program.
A file was added for defining tables including description, table type,
number of segments required to look up a value, and whether the lookup
will return multiple values.
A file was added to define which segment values to use in table lookups
for each configured item. Segments may be defined at different levels of
the configuration. For tables with multiple values, the number of values
are defined in this file.
A file was added for tables which will return multiple values to calculated
segments. This file holds the segments that will be populated with the
returned values. Segments can be populated at any level of the
configuration.
A file was added to store the actual table values for each combination of
segment values defined for the table.
A new planning rule (Rule H) was added to allow the use of forecast
consumption logic. This logic will prevent the problem of demand being
duplicated because a sales order does not fall on the same date as a forecast.
Forecast consumption logic allows MRP to “consume” the forecast with sales
orders and shipped quantities within user-defined forecast consumption
periods.
Forecast consumption periods are defined by a new program (P3405) and are
stored in new file F3405.
Server XF3462
This server is used to provide access to the forecast shipment summary file.
This server is currently used by P4205 (Shipment Confirmation), P42800 (Sales
Update), and P49700 (Cycle Billing).
A new file (F3108) has been created to store the link between summarized work
order number and the individual work orders that were summarized. A
corresponding inquiry screen was created to view the new file.
This section provides database changes for the human resources and payroll
systems.
Several database changes have been made to the Payroll and HRM systems to
accomodate enhancements made for public services clients. The areas affected
the most by these changes involve the ability for employees to have more than
one position/job, and enhancements to position budgeting and control.
In addition to public services, enhancements have been made to the HRM and
Payroll systems for Canadian Employment Equity Federal requirements.
F08040 - HR Constants - JT
HR Files - System 08
Architecture/Engineering/Construction Systems
Fixed assets
Property management
Work orders
Contract management
Homebuilder management
Service billing
Contract billing
Job cost
Equipment management
Database Changes
This chapter lists database changes for fixed assets, property management, work
orders, contract management, homebuilder management, service billing,
contract billing, job cost, and equipment management systems.
Fixed Assets
New Files
It is IMPORTANT that if you use F1202, you must initialize this field to
BLANK if the field is NOT one of the above categories. Consult the glossary
for the element CHCD for valid values.
Property Management
Work Orders
No database changes have been made to the work order product between A7.1
and A7.3.
Contract Management
Service Billing
Fields Added
Contract Billing
Fields Added
Job Cost
Fields Added
Fields Added
Fields Changed
New Files
Customers must review the source for these re-engineering modules to make
sure they work at their site. For example, source in a customer library can have
Members shipped for use in upgrading your custom source code include:
Member Description
J89501
P89501X A6/A7 Source Conversion Error Report
J89501B A6/A7 Source Conversion CL
P89501 A6/A7 Source Conversion Driver
R89501 A6/A7 Source Conversion RPG
A6/A7 Source Conversion Error Report
Member Description
J89502
P89502 DREAM Writer/Language Preference Conversion CL
P89502C DREAM Writer/Language Preference Conversion RPG
P89502E DREAM Writer/Language Preference Conversion CLP
P89502O DREAM Writer/Language Pref Conversion Error Report
DREAM Writer/Language Preference Conversion CL
J89510
J89510B DDS Fold Area Conversion CL
P89510 DDS Fold Area Conversion Driver
R89510 DDS Fold Area Conversion
DDS Fold Area Conversion Error Report
RPG Changes
CL Program Changes
General Messages
Naming Convention Issues - Beginning with the A6.1 release, DREAM Writer
versions have a new naming convention:
Version Description
XJDExxxxx The versions that J.D. Edwards ship as DEMO versions, owned by
J.D. Edwards, follow the naming convention of XJDExxxx (where
xxxx is a version number). These versions are replaced by merges and
do not require ASIs.
ZJDExxxxx The versions that the client owns for “default” (hard-coded) versions
follow the naming convention of ZJDExxxx (where xxxx is a version
number). The ZJDE versions are not overlaid by merges and require
ASIs.
Version Description
XJDE All “DEMO” versions that do not have hard-coded references must be
changed to “XJDExxxx” where xxxx is the version number.
Processing Option Processing option text references to versions should be changed to the
Text new naming convention. Such references normally need to be
converted to a ZJDE version. If the value of the processing option is
a DREAM Writer version, it must be changed to a ZJDE version
number. ASIs are necessary for changes to processing option values.
Source code is available to be used as a model only. We assume that you will
customize. They are not to be used “as is.”
Purpose
Data items that have been added to files must be added to the
program and possibly to the display/report file.
Data structures defined in the program should be checked. If such
a structure exists, and the file has changed, you may need to
redefine the structure.
CASE-Generated Programs
The following topics review the programs provided to convert all existing
CASE-generated programs. These programs are used for source that still have
CAP status equal to ‘Y’. The most significant change is the use of file servers
for the data dictionary and the cost center master, as well as the use of a new
file server for user defined codes.
You can find the CASE conversion program on menu A97U1. This conversion
removes the specifications for files processed by servers from F93102 and
F93103. It also removes the key field definitions from F93105.
You can also find CASE merge programs for logic modules and program types
on menu A97U1. These merges update the F93000, F93001, and F93108 files
for changes in master source.
Double-Byte Enablement
All fields that can contain text material were redefined as “open” fields for
Release A6 and forward by changing the field-type attribute to “O” in the data
dictionary. Technically, a field defined as “open” allows for the entry of single-
byte data, double-byte data, or a combination of both. The basic technical
requirement is whenever a string of double-byte characters is entered into a text
field, the double-byte character string must be bracketed with special characters.
These special characters, called shift-out and shift-in characters, tell the system
where the double-byte character string begins and ends. Without these
delimiting characters, the system cannot resolve the correct meaning of the bits
and bytes contained in a character string, and an AS/400 system error results.
Program modifications must be made to process all field truncations of “open”
fields through a special subroutine (C9822).
All programs must be checked for any truncated open fields. If any such field
truncations occur, those fields must be edited by using C9822.
Procedure
3. Modify field MOVEs for all fields being truncated as shown below:
H/TITLE PMODELDBCS - MODEL - Execute Text Truncation
H*-----------------------------------------------------------
C*
C* Move Field xxx to Field zzz for Output. Execute C9822
C*
CSR CLEAR@UA
CSR MOVEA xxx @UA
CSR Z-ADD yyy #OUTLG
CSR EXSR C9822
C* ---- -----
CSR MOVEA@UB zzz C*
C*-----------------------------------------------------------
Explanation of variables:
@UA = Input processing array
@UB = Output processing array
xxx = Field name that contains text to be truncated
yyy = Length of output field. (numeric value)
zzz = Display field
The way programs use computer resources profoundly affects response time (or
batch run time). If a program does many expensive instructions for each
transaction, it uses a large part of the CPU and the response time is poor. If a
program does many input/output (I/O) operations, it spends a large amount of
time waiting for data to be transferred between the disk and the CPU, and
response time is slow.
Sometimes it is hard to judge what will turn out to be “a lot of I/O” when the
program runs at a customer site. Customers run our software against thousands
or millions as many records as we have in our test data files. Customers set up
their operation such that they incur many expensive instructions for each
transaction record processed. They often run our software on computers much
slower than our development machine.
Program Calls/Initialization
Some common subroutines perform program calls (for example C00161 and
C0000). On the AS/400, calling a program is relatively expensive. If the
program being called is a CL program, it is even more expensive. The best way
to minimize this expense is to check whether we really need to call the program
(again). For example, if the transaction date hasn’t changed, don’t convert it
again. Just use the results of the previous conversion. This is called
“conditioning” the calls.
NOTE: The variables within the program do not clear automatically. For
example, if Indicator 83 was on, it will still be on. You may need to add code to
initialize some fields that the code currently assumes will contain zeroes and
blanks the first time around. Any files that were open when the program last
ended will still be open.
Database Read/Write
Database requests usually show up as the most expensive thing our programs
do. The most effective way to reduce cost is to reduce the number of requests.
For batch, use sequential I/O where possible. Add record blocking for
sequential I/O. We changed one batch program that did a lot of writes to use
sequential-blocked writes. It reduced the run time by two thirds. See Sequential
I/O for further discussion.
For example, if company number has not changed since the last transaction,
there is no need to re-read the company file. See Caching Control Files for further
discussion.
In a subfile program from which a user may select a particular record to see
more detail, store the extra fields for the detail as hidden fields in the subfile. In
this way, the detail code does not have to re-read the record. If necessary, the
information can be passed to another program in a data structure.
Don’t “scan” the database. If we allow users to type record selection criteria in
a subfile program, we should have supporting logical files so that we can read
only the records they are interested in. We should not read 200 records,
discarding 185 of them to present 15 records to the user. The problem with
If there are multiple subfiles defined for a program, and the user can pick and
choose the ones to look at (this is usually controlled by a processing option),
don’t fill all the subfiles ahead of time. Fill the subfile only if the user asks for it.
Customer/Vendor Ledger Inquiry programs now have this logic in place.
Where a file has been normalized (for example, the F0101 Address Book file
was split into eight files in A7.1), don’t assume that all the new file information
is needed. Don’t just replace CHAIN I0101 with CHAIN I0101, CHAIN
I0112, CHAIN I0113, CHAIN 10114, CHAIN I0115, CHAIN I0116, CHAIN
I0301, CHAIN I0401. Look at the fields that are needed, and only CHAIN to
the formats that contain those fields. This is especially important for file server
programs.
If you normally expect a record not to be there, don’t CHAIN every time to
find it. An example is when you use next numbers to allocate a key for your file.
Next numbers usually should come up with a key that does not exist in your
file. If your file is defined as having a unique key, it is much less expensive to
WRITE the new record with an error indicator on the WRITE (usually the
write will succeed) than to CHAIN with the new key first (usually the CHAIN
will fail).
Even more expensive is using SETLL where the SETLL positions past the end
of the file. This forces an FEOD (RPG-abbreviated CLOSE and OPEN of the
file).
For example, a control file has company as the major key. The customer has set
up their control data for company 00000. The transaction records are for
company 12345. For every transaction record, we do a SETLL to the control
file with a key of company 12345. This causes an FEOD because no records
exist with a key higher than 00000. We don’t find an eligible record, so we do
the SETLL again with company 00000.
If the program reads through a file that has the record selection and sequencing
done through DREAM Writer, you should be able to use sequential processing
with that file. RPG allows the file to be opened for sequential-only processing if
one of the following statements is true:
If you are reading through a file, and only every tenth or twentieth record is
updated (or deleted), it would be best to open the file twice. (For example, open
the physical for the READ, and open the logical for the update). Read through
the physical. When you get to the record that needs updating, retrieve and
update it through the logical.
NOTE: If there already is an override for that file in the CL, you must change
the existing override by adding the extra parameters to it.
If you can’t achieve true sequential processing for a file, you still can get some
benefit from blocking the file with a different override:
For example, you read through a master file, and for each master record you do
SETLL and READE in a transaction file. You will not get sequential-only
processing on the transaction file, but you can still block it. If you read through
the master file in employee sequence, and access the transaction file by
If the key sequence of the two files is different, block the transaction file with
something closer to the average number of records per master file record.
NOTE: If you use a much-larger blocking factor than the number of records
you are reading sequentially at a time, the job will run slower than a job with no
blocking added.
Expert Cache
The operating system will ignore this paging option if it determines that there
aren’t enough memory or CPU cycles to use it.
Programs often access multiple control files for each transaction record
processed. In order to cut down on reads to the control files, many programs
have caching logic for them. Most of the file servers also have caching logic.
This usually consists of an array of 100 or more entries in which valid codes are
stored. For example, to validate a deduction type in Payroll, the program first
will do a LOKUP in the deduction-type array. If it doesn’t find the deduction
type there, it will CHAIN to the deduction-type file. If it finds the deduction
type in the file, it will add it to the array.
The biggest problem we face is that customers set up and use a variable number
of control records. If we knew that every customer set up no more than 100
pay types, for example, the caching would work fine. Customers who set up
more than 100 types may get no benefit from a cache with 100 entries. If we
increase the size of the array to more than 100, it is no longer efficient. If we
start trying to use “smart” logic to keep the 100 types most recently used in the
cache, we end up spending more time managing the cache than we would have
by just CHAINing to the control file each time.
The second problem is that customers tend to set up control files as generically
as possible. For example, if they can get away with setting up a sales tax rate for
company 00000 for the USA, they will. If not, they will set it up by state for
company 00000. If that isn’t specific enough, they will set it up by county for
company 00000. Only as a last resort, they will set it up for each company
separately. Because we don’t know how granular their definition is, our
programs look for the most specific value first, then gradually work down to the
most general value as each CHAIN or SETLL fails.
A program may do more than ten failed CHAINs or failed SETLLs to find the
applicable control code for one field in a transaction record. If the program has
caching for this file, and it stores the answer as it found it in the database (that
is, the sales tax rate for company 00000 for Jefferson County is .034), we will go
through a cache search followed by all the failed CHAINs all over again for
each transaction record. We need to store the answer in the cache the way the
question was asked. We started out looking for the sales tax rate for company
12345 for Jefferson County. We found the answer as company 00000 for
Jefferson County. Put Company 12345/Jefferson County/3.4% in the cache.
Also try to set flags as you go along that tell you what to look for. For example,
test the sales tax rate file in S999 to see if there are ANY records for companies
greater than 00000.
User indexes
Some programs use user indexes instead of arrays to cache control records.
These have the advantage of being able to grow as needed (unlike arrays). If we
can populate the array correctly (for example, if we store the answers in the
array the way the question gets asked), a user index READ performs about the
same as a successful LOKUP on a 1000-entry array. If we have a higher failure
rate on the array LOKUP, the user index starts looking attractive for a smaller
number of codes (about 250).
We can tell the number of records in a control file by looking in the file
information data structure when we open the file. (See copy book I00INFDS -
field FIRCNT). If we are using a 100-entry array cache, and there are 100
records or less in the control file, we can load all entries in S999 into a sorted
array. This will speed up every LOKUP to the array. The downside to this
technique is that we will have to define two arrays: one sorted and one not
sorted. If you define the array as a sorted array, but the contents are not in the
correct sequence, the LOKUP will fail.
* SORTED ARRAY
E A 100 3 A
* UNSORTED ARRAY
E B 100 3
Expensive Instructions
There are some instructions in RPG which are surprisingly expensive. You need
to be cautious when you use these instructions in the subroutines that are
executed repetitively. For example, be particularly careful with subroutines S004
and S005, which execute the body of instructions for each transaction record.
Array Handling
Searching large arrays is expensive. If the array has to be larger than 250 entries,
consider a user index instead. Whenever possible, define arrays as sorted. This
speeds up the search greatly. Although LOKUP can be expensive, doing it
yourself is even more expensive. For example:
Z-ADD 1 #A
#A DOWLE 100
SRCH IFEQ ARR,#A
GOTO T66
ELSE
ADD 1 #A
ENDIF
ENDDO
T66 TAG
The following code runs much faster than the above:
Z-ADD 1 #A
SRCH LOKUPARR,#A
E A 250 150
E B 250 150
E C 250 150
C A ADD B C
It is important to size your arrays carefully.
Data Structures
If you are initializing data structures repetitively, pay attention to using the most
efficient method. For a large data structure with many subfields, the CLEAR
opcode will generate individual instructions to move blanks to the entire data
structure, then move BLANKS and ZEROES to each individual field. RESET
is a less expensive instruction to use, because it overlays the data structure with
a saved copy of the initialized version (only executing one instruction). If the
data structure has only a few numeric fields, consider moving BLANKS to the
data structure name followed by individual Z-ADD *ZERO instructions for the
numeric sub-fields.
IEXAMP IDS
I 1 100NUM1
I 11 40 ALPH1
I P 41 430PKD1
I 44 73 ALPH2
I 74 810NUM2
C RESETEXAMP
NOTE: If you will be using RESET, and the data structure contains numeric
fields, you must initialize the data structure with ‘I’ on the DS statement.
Multiple-occurrence data structures are more efficient than storing related fields
in multiple arrays. For example, if you are caching the UDC codes and
descriptions in four arrays:
Arithmetic
Multiplication and division are more expensive than addition and subtraction.
You can make these even more expensive by causing an overflow condition.
This provokes system error handling. Error handling is always expensive. Older
versions of X0028 (date conversion) had a deliberate overflow as part of the
code that determines whether the year was a leap year:
Error Handling
CRTLIB ABC
MONMSG CPF2111
CRTDUPOBJ DEF PRODLIB *FILE ABC
MONMSG CPF5813
Printing
If your application requires much printing throughout the day (for example,
printing pick slips), printing can be expensive. Our Order Entry application
offers customers their choice of whether they want to print picking slips
interactively (by pressing a function key), print in batch by submitting a job for
each picking slip, or print in a subsystem. The third option is the best for
performance.
The problem with printing interactively is that your program ties up precious
resources while it prints.
Printing in batch is very expensive if the customer has a large volume of print
requests. Job initiation is expensive. If we see a print job being submitted every
5 minutes, we know the job initiation is using a significant amount of CPU
resources.
Printing in a subsystem allows one job to run all day. The job usually starts
when the dedicated subsystem starts. The online program communicates with
the subsystem job by way of a data queue. It puts print requests onto the data
queue. The subsystem job waits on the data queue. It “sleeps” between print
requests. It wakes up when a request arrives on the data queue, and produces
the picking slip.
Many of our customers have remote locations. Subtle changes in the way we
define display files can have a big impact on response time.
Display files created before A5.2 all had the PUTOVR/OVRDTA keywords as
a standard. This requires the use of the RSTDSP(*YES) option when creating
the display file. The old-style windows that we used in A5.2 required the use of
RSTDSP(*YES) as well. RSTDSP(*YES) can slow down response time for
remote users. It also impacts local users when there are remote users on the
same system. With RSTDSP(*YES), the system saves a copy of everything on
the screen before it puts out a new display file on that screen.
For example, the user is looking at a sales order. P4211 writes the V4211 display
file to the screen. The user positions the cursor in the customer number field,
and presses HELP. Our program calls the Customer Name Search program
(P01NS), which writes V01NS to the screen.
If this is a remote user, the save action creates a lot of extra traffic on the
communications line. A larger problem for everyone is that while the save and
restore actions are going on, the user’s job stays in memory, using an activity
level. This means that other users potentially cannot get memory to do their
work. Now this user’s wait for the save/restore action to complete could get
added to other users’ response time, because they have to wait for it to
complete before they get a shot at the CPU. If the user is on a 9600-baud line,
the save/restore could take a relatively long time to complete.
It appears that many of our display files are defined with RSTDSP(*YES)
unnecessarily. The only time we need RSTDSP(*YES) is if we have
PUTOVR/OVRDTA keywords in the display file DDS, or if we have an old-
style window (does not use WINDOW keyword). Unfortunately,
RSTDSP(*YES) is the default on the SVR record. If we don’t type anything in
the MAINT/RSTDSP field, it will compile the display file with
RSTDSP(*YES).
Changing the RSTDSP attribute during testing is very easy. Use the CHGDSPF
command with the RSTDSP(*NO) parameter. If you need the RSTDSP(*YES)
attribute, the screen gets corrupted when you take a subfile option or press a
function key that displays a different screen. It is easy to fix the problem by
changing the display file back (CHGDSPF ... RSTDSP(*YES)). You must set
this attribute correctly in the SVR record, because it can be very expensive for
our customers if we specify RSTDSP(*YES) unnecessarily.
All of the preceding techniques for speeding up your application (except for
display file considerations) also apply to batch jobs. There are some additional
techniques that are unique to batch.
Batch Window
The batch window is usually the off-shift time when most of the employees are
home. The customer wants to get all batch jobs done before business opens for
the day. This could be 6p.m. to 7a.m., or a shorter time. One of the ways we
If you are creating and updating summary records in a database file as part of
the batch run, consider processing the input file in the correct sequence to do
“level break” logic. For example, you want to create a summary record by
salesman in a territory. If you read the input records in that same sequence, you
can accumulate totals for the salesman until the salesman changes. Then you
would write out the summary record for that salesman, and so on. If you
process the data in a different sequence, you will have to repetitively retrieve
and update the summary record for the salesman. This is expensive. See
Database Read/Write.
Look for opportunities to combine job steps to reduce passes through the data.
If there are two reports that read the data in the same sequence, you could
combine them into one program. Read through the data once to produce both
reports.
Logical Files
In general, you should not set up a logical file solely to accommodate batch
requirements. Use DREAM Writer or OPNQRYF to sequence and select the
data for your program (or use SORT or RGZPFM).
Sort
FMTDTA INFILE((F0311))
OUTFILE(F0311WRK)
SRCFILE(QFMTSRC)
SRCMBR(GENMBR)
Sort can both select and sequence data for you. You need SORT control
statements in a source member before you run the SORT. If these statements
will not change, type them into a source member. You can prompt to get the
format when you are editing the source member by using prompt types RH,
RR, RF, or RC (for example, type IPRH in the sequence number field). If the
The following are some of the SORT control statements created by P062904.
The first line is the header (prompt type RH). It defines the total length of sort
fields, whether the sort is ascending or descending, and whether the sort fields
should be included in the output record (an X means leave them out).
HFILE 88A X
The next group of statements defines the sort fields (prompt type RF). The N
in the second position means that it is a sort control field. It must be sorted
according to the Header statement. An O would specify a sort control field to
be sorted OPPOSITE to the Header statement. This way you can have some
fields that sort in an ascending way and some that sort in a descending way. The
third position defines the field type (character, packed, or zoned). The start and
end positions are the start and end positions of this field in the input record.
FNC 3 7 CO
FNC 10 21 MCU
FNC 22 27 OBJ
FNC 28 35 SUB
FNU 61 62 FY
FNU 63 64 PN
FNU 65 70 DGJ
FNP 128 130 PDBA
FNU 71 78 AN8
The last statement also is a field definition (prompt type RF). It redefines the
entire input record as one character field and specifies it must be written to the
output file (the D in position two means that it is a data field).
Reorganize
RGZPFM FILE(F0311)
KEYFILE(*LIBL/F0311LA F0311LA)
Reorganizing requires an existing access path over the data in the sequence you
require. Reorganizing will not select data for you.
Beginning with A7.3, J.D. Edwards complies with IBM’s V3R1 National
Language Support features. A7.3 users now can take advantage of IBM’s
Character Data Representation Architecture (CDRA), which is not supported
by prior J.D. Edwards releases. This chapter discusses the aspects of CDRA
that are relevant to J.D. Edwards software, the J.D. Edwards approach to
compliance, and guidelines for A7.3 programmers. For a thorough introduction
to CDRA, refer to IBM’s AS/400 National Language Support for V3R1.
CDRA Overview
The invariant character set (see Invariant Character Set in this chapter) is a special set
of characters that are mapped to the same code points in virtually all code
pages. Therefore, their hex values never change even if they are transmitted
across different CCSIDs. We refer to characters outside of this set as chameleons
because their hex code points will change to adapt to different CCSIDs in order
to retain the same graphic character representation. Chameleons common to
the US code page are ‘$’, ‘#’, ‘@’, ‘!’, and ‘¢’.
The J.D. Edwards approach to tagging file data is to distinguish between textual
data and non-textual data at the field level. Those fields that contain text
(marked with an open data type in the data dictionary) are tagged with CCSID
00037, which is the CCSID of our development AS/400. This CCSID is
generally used by North American AS/400s. Those character fields that are not
used to store descriptive text (marked with an alpha data type in the data
dictionary) are tagged with CCSID 65535. This CCSID indicates that the data is
to be treated as hexadecimal data rather than coded graphic character data. In
this way, we preserve the graphic character integrity of our textual data while
also preserving the hexadecimal integrity of our non-textual character data.
We also changed the display and printer file create commands to include the
*JOBCCSID value for the CHRID parameter (default is *DEVD). This will
preserve character data integrity for display and printer files where the user’s job
CCSID is different from the user’s device description CHRID.
Programming Guidelines
Follow these guidelines when you modify J.D. Edwards objects, or when you
create objects by using the J.D. Edwards FDA, RDA, SDA, or CASE tool.
Do not change any file CCSIDs either at the file or the field level.
If you create a source file to use for J.D. Edwards programs or
with J.D. Edwards programming utilities, be sure to tag it with a
CCSID of 00037. A source file CCSID defaults to the CCSID of
the job that created it.
If you modify a source member through PDM:
For physical file DDS, do not change the CCSID keyword
values. Otherwise, you can easily destroy data integrity. If you want
to add a field, use File Design Aid, which will automatically insert
the appropriate CCSID attribute for you.
When you create an object through PDM, be sure your job
CCSID is 00037. A user’s job CCSID defaults to the user profile
CCSID. To change it, enter CHGJOB CCSID(00037).
A B C D E F G H I
J K L M N O P Q R
S T U V W X Y Z a
b c d e f g h i j
k l m n o p q r s
t u v w x y z 0 1
2 3 4 5 6 7 8 9 +
t + u % & * (
) , _ - . / : ; ?