1.Functional Description
1.1Purpose
This function will read the Rating External Function Cache and call the CZAR.DLL to rate the requested load. After rating, the Rating External Function
Cache will be updated with the calculated charges.
1.2Setup Notes and Prerequisites
1.Czar32.dll Should be in the directory.
2.The Czar should be installed in the C drive.
1.3Special Logic
2.Technical Specifications
2.1Parameters:
Data Item Data Structure DescriptionI/ORequiredNotes
DTAIError Message IDO
EV01Suppress Error MessageI0-Send error messages 1-Suppress error messages
JOBSJob NumberIYesThis is the primary index to the input caches.
RTNMRate NameIThis is the rate name, to be used as the CZAR tariff name.
PPDJShipment DateIYesThe date of the shipment or load.
ADDOOrigin Postal CodeIYesThe origin postal code.
ADDZDestination postal CodeIYesThis is the destination postal code.
FRCGShipment ChargesOTotal Shipment Charges
FRCGMinimum ChargeOThe minimum charge if one applies.
FRCGDeficit Weight ChargeOThe deficit weight charge if one applies.
WGTSShipment Weight BilledOThe total weight that was billed. This will include any deficit weight.
CTY1Origin City NameIThe Origin city name
ADDSOrigin StateIThe Origin's state code
CTY1Destination City NameIThe Destination city name
ADDSDestination StateIThe Destination state code
FRTPRate TypeIThe Rate Type.
2.2Related Tables
Table Table Description
2.3Related Business Functions
Source NameFunction Name
N4900930CZAR Interface
2.4Processing
Initialize CZAR
2.Load Czar32.dll
Initialize InitializeCzar function
If failed, return message id '102K' and exit.
Initialize CZAR header fields:
Record code: 01
Multiple/Single Mode: S
Error/File Mode: E
Complete/Partial Mode: 1
Tariff Name: Rate name from the input data structure
Intrastate Switch: N
Shipment Date:Shipment date from the input data structure, edited with '-'. Mm-dd-ccyy
Origin Zip Code: Origin Zip Code from input data structure
Origin City: Origin City name from input data structure
Destination City: Destination City name from input data structure
Number of Detail Rec: 0 (To be updated again after the detail records have been written and counted.)
Billed Weight: 0 (To be updated by the CZAR interface)
Minimum Charge: 0 (To be updated by the CZAR interface)
Deficit Charge: 0 (To be updated by the CZAR interface)
Total Charge: 0 (To be updated by the CZAR interface)
Single Shipment: N
Use Discounts: N
Return Point Names: N
Carriage Return:
Line Feed:
Initialize CZAR Detail fields.
Count of detail records = 0
Array Index = 0
Perform a loop through the Cache D4900190RE, create one detail record for each cache.
Increment the Count of Detail Records
Initialize data in the detail structure array for the current array index:
Record Code: 02
Class:External Freight Key from the Cache D4900190RE
Weight:Shipment Weight from the Cache D4900190RE
Rate:0 (To be updated by the CZAR interface)
Copy the Count of Detail Records into the Header.
Call the CZAR shipment rating function.
Check for error Code in the Header field.
If an error code is returned
If suppress error messages is not '1', Send the CZAR message text with message id '102L'
Return message id '098F'
Exit
Copy the header information from the CZAR interface to the Input Data Structure:
Minimum Charge: Value from header structure
Initialize the Cache Cursor = 0
Perform a loop through the Cache D4900190RE,
If Rate Type from the input data structure is '1'
Else, if Rate Type from the input data structure is not '1'
Note, the freight rate is defined with 4 decimals and CZAR returns a charge with 2 decimals.
Increment array index.
Terminate CZAR.
^
D4900940 - Internal Call to Czar.dll Interface
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
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 | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
mnTransportationJobNumber | JOBS | MATH_NUMERIC | OPT | NONE |
The job number (work station ID) which executed the particular job. | ||||
szRateName | RTNM | char | OPT | NONE |
The name of the rate which is used to define and calculate a freight charge. | ||||
jdDatePromisedPickJu | PPDJ | JDEDATE | OPT | NONE |
The promised shipment date for a sales order. This date represents the day that the item can be shipped from the warehouse. | ||||
szPostalCodeOrigin | ADDO | char | OPT | NONE |
The origin postal code of a shipment. | ||||
szPostalCodeDestination | ADDZ | char | OPT | NONE |
The United States ZIP code or the postal code that specifies where a letter is to be routed. Attach this code to the address for delivery in
| ||||
mnShipmentCharge | FRCG | MATH_NUMERIC | OPT | NONE |
The unit or flat amount of a freight charge. | ||||
mnMinimumCharge | FRCG | MATH_NUMERIC | OPT | NONE |
The unit or flat amount of a freight charge. | ||||
mnDeficitWeightCharge | FRCG | MATH_NUMERIC | OPT | NONE |
The unit or flat amount of a freight charge. | ||||
mnShipmentWeightBilled | WGTS | MATH_NUMERIC | OPT | NONE |
The shipment weight is qualified by a Weight Qualifier (WGQ) that identifies the type of weight. | ||||
szOriginCity | CTY1 | char | OPT | NONE |
A name that indicates the city associated with the address. | ||||
szOriginState | ADDS | char | OPT | NONE |
A user defined code (00/S) that specifies the state or province. This code is usually a postal service abbreviation. | ||||
szDestinationCity | CTY1 | char | OPT | NONE |
A name that indicates the city associated with the address. | ||||
szDestinationState | ADDS | char | OPT | NONE |
A user defined code (00/S) that specifies the state or province. This code is usually a postal service abbreviation. | ||||
cRateTyp | FRTP | char | OPT | NONE |
The type of rate specified in a table. This could be a fixed amount or percentage, for example. |
B4900193 Cache Process Transportation Rating Cache |
None |