KITING

PURPOSE    OPERATION   COMMAND LINES   OPTIONS    RELATED PROGRAMS


Author: Dan Mares, dmares @ maresware . com
Portions Copyright 1998-2016 by Dan Mares and Mares and Company, LLC
Phone: 678-427-3275
Last updated: August 5, 2010

All programs are command line programs.
MUST be run within a command window as administrator.


top

KITING PURPOSE

Determines the number of day difference between 2 dates located in two different fields in a fixed length record. This operation is helpful to determine any delay in dates. Perhaps the difference between a due date and a received date, or a date of payment, and date of final credit.

The records must be of a fixed length, and the date fields must begin in a fixed location. However, the date formats can be any of six (6) date formats used in the U.S. (European or military: 12 Nov 2002 ) dates are not currently supported.


top

OPERATION

This program will take a fixed length record and analyze two fields containing dates.

It calculates the difference of 2 date fields and then appends a 7 digit (signed) number to the end of the record representing the difference in days between the two dates. If the -p (for pipe) option is used, it also adds an ending pipe to the record for those needing a pipe delimeted file.

The dates can be in different years and it will still give the proper day difference.

If you use a -c option for CYCLE, the program will assume that the date fields specified are cycles, and give you difference in cycles not days. Cycles are of the format: YYWW, where WW is the week of the year (01-52). Currently, cycles of the form YYYYWW are not supported.

Format of the dates in the record can be any of the following, and do not have to be consistent throughout the record or file. The only thing that must be consistent is the displacement to where the dates begin.

A sample file might look like:

abcd851015lkjsddfkj851205;lkdsfj
alkj84-10-15lkkjjjj12-05-85lkjkj
aslk831012lkjkljlkj120184klkjkl

Notice the dates are in a number of different formats, but each begins at displacement 4 and 19 respectively.

The output might look like this. Excuse my calculation errors.

    

    |              |
abcd851015lkjsddfkj851205;lkdsfj  +   50
alkj84-10-15lkkjjjj12-05-85lkjkj  +  420
aslk831012lkjkljlkj1201284klkjk   +  385

The acceptable date formats are any of the following:

YYMMDD    YY?MM?DD MMDDYY    MM?DD?YY, and YYYYMMDD

also 4 digit years into the year 2000

YYYYMMDD YYYY?MM?MM  MMDDYYYY  MM?DD?YYYY

where the ? can be any separator you choose. It just cannot be a number, and the dates must have six numbers in them. So 1 is not an acceptable date, but 01 is. In the YYYYMMDD format the year must be 4 digits and the MMDD must have leading 0s if necessary. The fields cannot be reversed.

Date formats can be mixed within the file or within the record, but each must begin at the designated displacement. The program can differentiate year 2000 dates as long as they follow the conventions mentioned above.

OPERATIONAL CHALLENGES (bug)

In tests with date fields of 6 digits, MMDDYY where regular data immediately follows the YY (i.e. MMDDYY94) and that data is a number (i.e. 94), the program may get confused and think the date format is made up of a 4 digit year (i.e. MMDDYYYY). This incorrect assumption may lead to erroneous output.

To fix this problem, you can do one of two things.

1st: If the date is consistant to a 6 digit field, MMDDYY, then use the -l (ell) option, and force it to -l 6. or/

2nd. Reformat the input record so that there is a space at the end of the date field. (this is always the preferred format of the date field. This way the program has no choice but to accept the 6 digit field. A space before and after the date will always help the program determine where the field begins and ends.


top

KITING COMMAND LINES

Note: as of 2002, the 16 bit version may have different (old) command line options. It is no longer being updated to accept the -i and -o options. Check the internal help screens with the 16 bit version.

C:> kiting -i input -o output -[options [Aarddcl1]]

C:> kiting  -i kite.in  -o kite.out   -r 30  -d 5  -d 15 
C:> kiting  -i cycle.in -o cycle.out  -r 30  -d 5  -d 15  -c
C:> kiting  -i kite.in  -o kite.out   -r 30  -d 5  -d 15 
C:> kiting  -i cycle.in -o cycle.out  -r 30  -d 5  -d 15  -p
C:> kiting  -i cycle.in -o cycle.out  -r 30  -d 5  -d 15  -p "|"

Item 1: kiting
Item 2: Input file name.
Item 3: Output file name.
Item 4: Options[-ioArddc][Pp[x]]


top

OPTIONS

-i inputfile:  input filename

-o outputfile:  outputfilename

-r #:   # == record length (required)

-d #:  displacement to first date/cycle field (required)

-d #:  displacement to second date/cycle field (required)

-c:  to indicate cycle calculation instead of days

-l #:  force length of date fields to # number of characters. (-l 6)

-[Pp][delimeter value] #:  Use the -p option to add an end of record delimeter. Usually a pipe. and if no delimeter value is explicitely added after the -p, then the pipe ( | ) is defaulted. If you need another delimeter, like a comma, you must add it absolutely, like: -p ,

-A:  create/append an accounting file

-1 logfile:  logfile to put accounting information to. Similar to -A, except user can designate specific filename


top

RELATED PROGRAMS

NONE:

top