Functional Description
Purpose
Address Book file (F0101). The records can be retrieved in either Parent/Child or Child/Parent order
depending on a sent parameter. As the last record in the sequence has been processed an output
parameter of "Last Record" will be set to a one.
Setup Notes and Prerequisites
This business function works in conjunction with B0100028.
applications this would be on either the close, cancel, OK, and select button that is on the form
which first called this server. The same would follow in UBE when getting ready to terminate the
process.
See source node for parameter and other special details.
Special Logic
has been set to a "1".
The input parameters are as follows:
* Addressnumber - The calling program is responsible for sending the address number of the
current level in this field. This program will return the Parent/Child Address Number.
* Organizationtypestructur - The calling program is responsible for sending the structure
type of the address being inquired on in this field.
* Modeprocessing - The valid values for this field are ' ', '1', '2', and '3'. ' ' is the
default and will direct this program to return the information in Parent/Child order. A '1'
will return the information in Child/Parent order. '2' will take the address number entered and
display the entire tree structure(s) that the address number entered is included in (Future
Enhancement). A '3' would allow the calling program to terminate the parent/child server
without having to call the server as many times as it takes to reach the last record (a stop
processing flag) (Future Enhancement).
* MaxLevel - This parameter will be used to determine how many levels are to be retrieved.
Valid values are 1 through 25.
* Duplicates - This parameter determines whether duplicate address numbers will be allowed
to be output. ' ' will allow duplicate address number to be output, '1' will suppress duplicate
address numbers
* WorkField - This REQUIRED parameter is used for internal use to this parent/child function
only. It is important that any program that uses this server must create a Math Numeric Work
Field (recommended Data item is 'GENLNG') and store this field on the form if calling this
routine from ER. This work field should be initialized to zero before calling this function and
should be returned back on eace recurring call.
* Effective Date - This parameter is used to determine if records will be processed based on
the effective date sent in. If NO value is sent then ALL records will be read regardless of
the effective date on the records. This is different than how it worked on the AS400 parent/child
server where a blank effective date, caused the parent/child server to default in and use the
current date. This was changed so that the maintenance programs have a way of viewing
all of the records. Therefore it is important to note that it is the responsibility of the
calling program (UBE, FDA, and/or business function) to send in the current date in this field.
current level in this field. This program will return the Parent/Child Address Number.
* OutputLevel - This parameter will represent the current level of the Address book record
being returned. The calling program may use this parameter for totaling and display purposes.
* LastRecord - As the last record in the sequence has been processed an output parameter of
"Last Record" will be set to a one.
* Datafielderrorcode - This parameter will be filled with the value of '1' if an unexpected
has been encountered
==> First Call to B0100008 (ParentChildServer) ==>
Server
* This is designed this way to maximize speed by keeping I/O to be native to the server. Once
running on the server the idea is to build the entire parent/child structure at one time and
then send all information back to the client as one large string.
* The maximum number of records that can be sent is defined in the header file B0100028.H which
is determined by the capacity of the network and the potential size of the string being
created.
* Processing of the records is done by reading all of the records for the given level before
proceeding to the next level. This is done to save on the number of times that the file pointer
would need to be repositioned and to take advantage of caching records selected with one SQL
statement.
* Once all of the records have been read or until the maximum number of records to processed
for a given call has been reached then this function saves off all of the processed records as one
string to be passed back to B0100008.C Process returns to B0100008 <=== (ParentChildServer)
* Function then parses string for first child to send back to caller <=== to caller ===>
(ParentChildServer)
* Second call and so on.... Call to B0100008 to process the next record in the saved string to
return back. <=== to caller
maximum number of records to process is reached. If the entire tree has been processed then a
'1' is returned in the cLastRecord flag. If the maximum number is reached and has been processed
to the caller then the process continues to get another string of address book numbers by
calling B0100028.C
Technical Specifications
Parameters
Related Tables
Related Business Functions
Processing
D0100008 - A/B Server - Parent/Child Processing
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnAddressnumber | AN8 | MATH_NUMERIC | NONE | NONE |
A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or
| ||||
szOrganizationtypestructur | OSTP | char | NONE | NONE |
A user defined code (01/TS) that identifies a type of organizational structure that has its own hierarchy in the Address Book system (for
| ||||
cModeprocessing | MODE | char | NONE | NONE |
The processing mode used in Purchase Order Consolidator to signify when specific orders are being processed. | ||||
mnMaxLevel | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
cDuplicates | DUPL | char | NONE | NONE |
A code that determines if and how duplex output printing is used. Valid values are:
N No duplex printing; print on only one side of the
| ||||
mnOutputLevel | LVL | MATH_NUMERIC | NONE | NONE |
Level of Detail in the Description of a section. Level 1 indicates the quarter quarter array consists of approximately 40 acres or 1/16th of a
| ||||
cLastRecord | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cDatafielderrorcode | ERR | char | NONE | NONE |
The Data Field Error Code field is simply a generic data field to pass an error condition flag. This field is one of the fields that make up the
| ||||
idWorkField | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
jdDateeffective | EFTB | JDEDATE | NONE | NONE |
The date that an address, item, transaction, or table record becomes active. The meaning of this field differs, depending on the program.
|
B0100028 AB - Server - Called From Parent/Child |
F0150 Address Organization Structure Master |