TraceTrackCacheHandler - Trace and Track Cache Handler
This function manipulates the cache used by the TraceTrack function.
The TraceTrack business function uses this handler function to populate the Trace/Track cache with
records according to the parameters passed into Trace/Track. Once populated, applications or other
business functions may use this handler function, to manipulate the Trace/Track cache, for example the
records contained within the cache can be read and displayed in a grid.
The actions performed by this handler function are dictated by the value of the cCacheActionCode
passed in with this business function's data structure D3003600. Valid choices for cCacheActionCode are as
follows:
'1' - add - Add the record given in D3003600 to the cache (see notes below).
'2' - get first - Select the first record from the cache that matches the criteria given in D3003600.
The selected record is returned via D3003600.
'3' - get next - Select the next record from the cache that matches the criteria specified in the
Get-First call (using cCacheActionCode value of '2', see notes below). The selected record is returned
via D3003600.
'4' - terminate selection - Clear up the structures involved in Get-First/Get-Next. Note. This action
need only be performed if a Get-First is performed without all the subsequent matching records being
read from the cache with enough Get-Next's.
'5' - update - Overwrite the record that matches the criteria given in D3003600 with the full record
specified in D3003600.
'6' - delete - Delete the record from the cache that matches the criteria given in D3003600.
'9' - terminate - Clear the cache and cleanup structures.
Notes:
Error conditions are signaled to the calling application or function with a non-zero value of
cCacheErrorCode in D3003600.
Selections performed against the cache records may use either the primary key (mnUniqueKeyID only) or
the secondary key (mnLevel, mnItemNum, szBranchPlant, szLot, mnDocumentNum, szDocumentType,
szTransactionUnitOfMeasure, jdTransactionDate, cFromToFlag, mnF4111UKID and szLocation). To use the primary key
in a selection, set the data structure field cCacheIndexToUse to '1' or to use the secondary key set
the field cCacheIndexToUse to '2'.
To perform a full read of the cache the following steps must be peformed:
Define a GENLNG variable and set its initial value to zero. This variable will hold the data pointer
to the cache cursor handle returned from the "get-first" call. The returned value must be passed back
to the cache handler with subsequent "get-next" calls.
Define an EV01 variable and set its initial value to zero. This variable will hold the error code
returned from the cache handler.
Peform a "get-first" call to the cache handler: cCacheActionCode <- '2', cReturnCacheCursorHandle <-
'1', idCacheCursorHandle <-> GENLNG variable, cCacheErrorCode -> EV01 variable.
Do while EV01 variable = 0
Process cache record
Perform a "get-next" call to the cache handler: cCacheActionCode <- '3', cReturnCacheCursorHandle <-
'0', idCacheCursorHandle <-> GENLNG variable, cCacheErrorCode -> EV01 variable.
Enddo
Clear the cache with a "terminate-cache" call to the cache handler: cCacheActionCode <- '9'
When the cache handler adds a record to the cache, a static integer variable is incremented and the
value of this variable is assigned to the mnUniqueKeyID field within the cache record.
As a convenience, the cache record contains two fields for the "level" within a trace or track. The
trace/track function assigns a numeric value to the mnLevel field. The value of this field is converted
to a string by the cache handler and this converted value is assigned to the szLevelofIndention
field. This allows users of the cache record to access the "level" of a cache record by using either the
string or numeric values, depending on the intended usage.
D3003600 - Trace/Track Cache Handler
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnUniqueKeyID | UKID | MATH_NUMERIC | OPT | NONE |
This field is a unique number used to identify a record in a file. | ||||
mnLevel | RLLV | MATH_NUMERIC | OPT | NONE |
Used in FASTR Organizational Structure reports to indicate how many levels will be printed. Up to 99 levels below the selected Bus. Unit
| ||||
szLevelofIndention | INDL | char | OPT | NONE |
A number indicating the level of a child in the relationship to its parent in a hierarchy. | ||||
mnItemNum | ITM | MATH_NUMERIC | OPT | NONE |
An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item
| ||||
szBranchPlant | MCU | char | OPT | NONE |
An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit
| ||||
szLot | LOT | char | OPT | NONE |
A lot is a quantity of items that you want to group together because they have similar characteristics. | ||||
mnDocumentNum | DOC | MATH_NUMERIC | OPT | NONE |
A number that identifies the original document, such as a voucher, invoice, or journal entry. On entry forms, you can assign the document
| ||||
szDocumentType | DCT | char | OPT | NONE |
A user defined code (00/DT) that identifies the origin and purpose of the transaction. PeopleSoft reserves several prefixes for document
| ||||
szTransactionUnitOfMeasure | TRUM | char | OPT | NONE |
The unit of measure you used when you entered this transaction into the system. | ||||
jdTransactionDate | TRDJ | JDEDATE | OPT | NONE |
The date that an order was entered into the system. This date determines which effective level the system uses for inventory pricing. | ||||
cFromToFlag | FRTO | char | OPT | NONE |
A code that indicates whether a line in a transaction is a From line or a To line. This field allows you to combine multiple existing products or
| ||||
mnF4111UKID | UKID | MATH_NUMERIC | OPT | NONE |
This field is a unique number used to identify a record in a file. | ||||
szLocation | LOCN | char | OPT | NONE |
The storage location from which goods will be moved. | ||||
mnTransactionQuantity | TRQT | MATH_NUMERIC | OPT | NONE |
A value that represents the available quantity, which might consist of the on-hand balance minus commitments, reservations, and
| ||||
mnSupplierNum | AN8 | MATH_NUMERIC | OPT | NONE |
A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or
| ||||
szSupplierName | ALPH | char | OPT | NONE |
The text that names or describes an address. This 40-character alphabetic field appears on a number of forms and reports. You can enter
| ||||
szTransactionReference | TREF | char | OPT | NONE |
A reference number that provides an audit trail for specific transactions. | ||||
szTransactionExplanation | TREX | char | OPT | NONE |
Text that identifies the reason that a transaction occurred. | ||||
szLotGrade | LOTG | char | OPT | NONE |
A code that indicates the grade of a lot. The grade is used to indicate the quality of the lot. Examples include the following:
A1 Premium
| ||||
mnLotPotency | LOTP | MATH_NUMERIC | OPT | NONE |
A code that indicates the potency of the lot expressed as a percentage of active or useful material (for example, the percentage of alcohol
| ||||
szSupplierLot | RLOT | char | OPT | NONE |
The supplier's lot number for the item. | ||||
mnJobnumber | JOBS | MATH_NUMERIC | OPT | NONE |
The job number (work station ID) which executed the particular job. | ||||
szComputerID | CTID | char | OPT | NONE |
cCacheActionCode | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
cCacheIndexToUse | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
cCacheErrorCode | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
cReturnCacheCursorHandle | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
idCacheCursorHandle | GENLNG | ID | OPT | NONE |
General purpose ID variable. | ||||
cSuppressErrorMessages | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
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
|
None |
None |