Functional Description
Purpose
The purpose of this function will be to resolve two problems that exist when dealing with minimum,
maximum and target fields in Quality Management.
1. The fields used to store these values are defined alpha-numerically within the database. The
minimum, maximum and target fields can be defined both alpha-numerically and numerically in Quality
Management.
2. In OneWorld, the only way to override the number of decimals for a given field is at the
application level. In Quality Management, the number of decimals does not vary per application but varies per
test.
Setup Notes and Prerequisites
Prior to executing this function the calling program must fetch the Test Master record, F3701 and/or
the Quality Preference record, F40318. The Preference record may hold values that override the values
at the Test Master level. Which file should be used will be determined prior to calling this
business function. B3700010 will have access to a data structure, D3700010. This will be used to hold all
the pertinent data as well as the value to be converted or edited, two positions for return
alpha-numeric and return numeric, a flag to indicate whether the value should be just scrubbed for display,
scrubbed for the file or edited and an error message.
Special Logic
The program must be able to pass back a number that can contain as many as 9 decimal positions in the
Return Math Numeric Value.
Technical Specification
When the value passed in is numeric:
the user and pass back an alpha-numeric field that will display on the screen.
2. Edit - Numeric value. The function will also pass back the numeric equivalent of the same
value. This number will be used by the calling application to edit minimum, maximum and target.
3. Store - Decimal removal, zero fill, round out unnecessary digits. When numeric values are
stored in alpha-numeric fields, the decimal point is removed and the numbers are filled with
zeroes for each decimal position that is not used. Also, if additional digits past the decimals
number requested are passed in, those digits should removed and rounded up if the digit closest
to the requested number of digits is 5 or greater and rounded down if the digit closest to the
requested number is less than 5.
in the database. (The number 30 with 4 additional zeroes to the right.) If the number input is
40.56 and display decimals was still 4, 405600 is stored. This is done so that when the number
is retrieved from the database and scrubbed for display with 4 decimal positions it will appear
as the user expects 40.56. The final example is for passed in values with a number of digits
greater than the requested number. If .326666 is passed in, and four decimals are requested,
3267 should be the store value.
function will not have to handle the display of an alpha-numeric value. One World Tools will handle
this.
2.Edit - There are two parts to editing an alpha-numeric value.
the user is valid. Every alpha-numeric test that has a UDC table should have all possible
minimum, maximum and target values defined in the UDC table. Every alpha-numeric test
does not have to have a UDC table. If a table is not provided by the user then by definition,
the value does not have to be edited.
B.The function should pass back the numeric equivalent of the alpha- numeric
value that is retrieved from the UDC table.
the database. One World Tools will handle this.
D3700010 - Validate/Convert Minimum, Maximum, Target
Data Item Description I/ORequiredNotes
EV01 Call Type I Yes One byte field used to indicate the functions that should be processed:
1=Scrub for display; 2=Edit; 3=Scrub for database; 4=Process all.
EV02 Data origin IYes One byte field used to indicate where the data passed in originated:
1=Database; 2=Display.
NUMT Numeric 1/0 IYes 1 = numeric, 0 = alphanumeric.
CDEC Number of DecimalsINo Ignore if NUMT equals '0'. If NUMT equals '1' and CDEC is blank, assume
zero
decimals.
SY System Code INo Ignore if NUMT equals '1'. If NUMT equals '0' it is o.k. if SY is blank. If SY is
filled,
DS20 must exist in the UDC table passed in to the function. (SY/RT)
RT User Defined Code INo Ignore if NUMT equals '1'. If NUMT equals '0' it is o.k. if RT is blank. If RT is
filled,
DS20 must exist in the UDC table passed in to the function. (SY/RT)
DS20 String Received I/OYes Will hold the value to be scrubbed for display, scrubbed for the database or
edited. If
/Returned Value the value is blank, assume you can exit and stop processing. This received
value will
be replaced by the return value for display.
MATH01 Math Numeric OYes Will hold the numeric equivalent for the value passed in. Both numeric and
alpha-
Return Value numeric values will have numeric equivalents.
DS20 String Returned Value OYes Will hold the alpha-numeric value to be saved to the database.
Datebase
EV01 Suppress Error Message I Yes Will hold a one byte flag indicating if error message should be suppressed or
not.
DTAI Error Message ID OYes Will hold the error message while performing the edit.
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
cCallType | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
cNumericFlag | NUMT | char | OPT | NONE |
Determines whether a test result value will be numeric or alphanumeric.
Valid values are:
1 Indicates that the result value is numeric and
| ||||
cDecimalNum | CDEC | char | OPT | NONE |
A value that designates the number of decimals in the currency, amount, or quantity fields the system displays. For example, U.S. Dollars
| ||||
szSystemCode | SY | char | OPT | NONE |
A user defined code (98/SY) that identifies a system. Valid values include:
01
Address Book
03B
Accounts Receivable
04
Accounts
| ||||
szRecordTypeCode | RT | char | OPT | NONE |
A code that identifies the table that contains user defined codes. The table is also referred to as a UDC type. | ||||
mnNumericValue | MATH01 | MATH_NUMERIC | OPT | NONE |
- - - Good Performance Low Value. | ||||
szErrorMessageID | DTAI | char | OPT | NONE |
A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or
| ||||
cSuppressErrorMessage | SUPPS | char | OPT | NONE |
A flag indicating whether or not runtime error messaging will occur when an error message is issued from a business function.
0 = allow
| ||||
cDataOrigin | EV02 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
szStringValue | AMIN | char | OPT | NONE |
The lowest value for a passing test result. | ||||
szStoreStringValue | AMIN | char | OPT | NONE |
The lowest value for a passing test result. | ||||
mnCodeLength | MATH01 | MATH_NUMERIC | OPT | NONE |
- - - Good Performance Low Value. |
None |
F0004 User Defined Code Types | ||||
F0005 User Defined Codes |