Note:The VIN/Serial Number Extract utility uses the lease booking date and not the asset booking date to select which assets to extract. If you book an asset and do not place it on a lease, the utility will not select the asset to be extracted. If you add an asset to a lease after the extract has pulled the assets from that lease, the utility will not select the new asset for extract.
When using the utility for the first time, you can choose to run it in any of the following ways:
Create an empty file in the $udata directory on your LeasePak server.
Run the utility without creating any file in the $udata directory. For example, if today is October 15, 2009 and you run the utility today with no file in the $udata directory,
the utility would pull assets on leases booked prior to September 15, 2009.
The extracted information includes the following data for each asset with the indicated length for each field.
The extracted information includes the following data for each asset with the indicated length for each field.
Field | Starting Position | Length | Comments |
VIN | 1 | 17 | |
MODEL YEAR | 18 | 4 | Optional field - Model year of the vehicle |
EXPIRY DATE | (yyyymm)22 | 6 | Optional field |
FILLER | 28 | 1 | |
STATE ABBREVIATION | 29 | 2 | Optional field - State the vehicle is expected to be registered into |
TYPE (Constant) | 31 | 1 | "F" |
CUSTOMER DATA | 32 | 19 | Optional field- "NISSAN COMMERCIAL" |
POLK ASSIGNED CUST ID (Constant) | 51 | 7 | SYEDZOO |
Here is an example of a possible script that could be scheduled to run:
#!/bin/sh ENVNAME=$1 PWD_USER=$2 if [ "$ENVNAME" = "" ]; then echo "Error: $Usage $0 environment [user-passwd]" exit 1 fi if [ "$PWD_USER" = "" ]; then printf "Password: " read PWD_USER fi if [ "$PWD_USER" = "" ]; then echo "Password required" exit 1 fi if [ ! -d $top/env/$ENVNAME ]; then echo "$ENVNAME environment does not exist" exit 1 fi . $top/env/$ENVNAME/etc/.lpprofile $uexe/lpadriver.exe /util ### << EOF Y $PWD_USER Y NISSAN COMMERCIAL SYEDZ00 EOF exit 0
NOTE: the above script is only an example showing the input requirements for executing a LeasePak Utility. It is structured to operate in a LeasePak release instance installed per NetSol's recommendations and instructions. NetSol assumes that the script will be used through a directly connected terminal or through a NetSol-supported terminal emulation program. The client's own systems and circumstances could easily vary and necessitate deviation from this example.
This utility will extract data for all vehicle assets on active leases booked at least 30 days ago and not included in a prior extract. After logging on the LeasePak server, start the LeasePak Utilities. This utility runs from the command line the same as other LeasePak utilities. The interface is as follows:
Do you wish to continue (Y/N)? DoEnter 'Y' or 'y' to continue. However if you enter any other response including (blank), the system exits the utility and returns you back to the LeasePak Utilities main menu. Enter 'Y' or 'y', the program will display:
Client Password?Enter the correct LeasePak client string password to proceed. The program will display:
Do you wish to run for all portfolios (Y/N), <Return> to exit?Do one of the following: Enter 'Y' or 'y', if you wish to run for all portfolios. (Or enter 'N' if you wish to run for a particular portfolio. The program will proceed and display the message for particular portfolio input accordingly and proceeds accordingly). The program will display:
Enter up to 19 characters of custom data to be included with each record extracted:Enter any text up to 19 characters; the program displays
Enter a customer ID for the system receiving the extract, <Return> to exitEnter any text up to 7 characters.
The utility continues processing to generate the text file with fixed length fields containing the VINs of assets that fall in a particular portfolio or all portfolios. The record for each asset is maintained separately in the file.
This utility uses the values entered at the input prompts to process the following extract:
The program will select the VIN (id_s), model year (yr_s), and state (eq_st_s) for each asset record (req) where the following conditions apply:
Note: The program will determine the last extract date by retrieving the newest extracted file created from this utility that is in the $udata directory on the server. The program will only consider extract files previously created for the same portfolio selection as that which the utility is being run for this time. If the program finds the last extract date to be equal to today, the program will assume this is a re-run and therefore go to the next most recent extract file and use that date instead. If the program finds a date that is not valid date, it will assume the extract has not been run in the past and disagreed this condition.
The VIN/Serial Number Extract utility transforms the data in each extracted record to create a record formatted as follows:Starting Position | Length | Data | Transformation |
1 | 17 | id_s | Trim any leading spaces and then take the first 17 characters of id_s and truncate an additional data |
18 | 4 | yr_s | (no change) |
22 | 6 | Fill with spaces | |
28 | 1 | Fill with spaces | |
29 | 2 | eq_st_s | (no change) |
31 | 1 | (no change) | |
32 | 19 | Response to prompt 5 | Left justify and pad the right with spaces if needed |
51 | 7 | Response to prompt 6 | Left justify and pad the right with spaces if needed |
5N1AZ36A54C2519822004 MSFNISSAN COMMERCIAL SYEDZ00
1N4NG11C8SN0023792008 TXFNISSAN COMMERCIAL SYEDZ00
The utility will output a fixed length file and place it in the $udata directory. When it is generated for all portfolios, it is auto named as, vin_extract_YYYYMMDD.dat. If it is generated against a particular portfolio, it is auto named as, p#_vin_extract_YYYYMMDD.dat, where # is the portfolio number. For example, the name p2__vin_extract_YYYYMMDD.dat indicates that the fixed length file has been generated against portfolio # 2. YYYYMMDD represents the date the utility is run.
Completed file will be placed under $udata directory. User are responsible and have to clean up these flat files in the $udata directory by archiving them somewhere if desired or deleting them. However, the most recent file extract must always remain in the directory so that the utility can determine the last time it was ran. The case is similar to running the utility with an empty file in the $udata directory see heading, With an empty file). If you do not leave any file in the directory, the case is similar to running the utility with no file in the $udata directory (see heading, Without any file).
Note the following: