addlines
FIELD
,
START
,
END
,
BUMP
,
COPIES

The addlines statement adds a specified number of records to the end of a database.


Parameters

This statement has five parameters:

field – the name of the field you wish to increment as the new records are added to the database. This parameter must either be a numeric integer field, date type field, or it may be a variable if you don’t want to store the incrementing values in the database.

start – is the beginning sequence number or date value.

end – is the ending sequence number or date value.

bump – is the increment value for your sequence. The bump value must be a positive integer if the field is an integer field. For a date field the bump value may also be one of the following:

If the bump parameter is omitted, it is assumed to be 1.

copies – is the number of records generated for each sequence number. If this parameter is omitted, it is assumed to be 1.


Description

This statement adds a predetermined number of records to the end of any database. The new records may be sequenced with incrementing integer or date values in a specified field.

This example shows how a procedure can add 100 records to a database and sequence those new records from 1200 to 1299 in a numeric integer field called CheckNum.

addlines CheckNum,1200,1299

This example shows how a procedure can add 31 records to a database and sequence those new records from October 1 to October 31 in a date field called EntryDate (Panorama will assume the year based on the computers system date).

addlines EntryDate,date("oct 1"),date("oct 31")

This procedure will add one record for each month to a database and sequence those new records from a start date to an end date that the user specifies. The date field sequenced is called Date. This time the bump value is “Month” , indicating that the value should be incremented by one month for each record.

local  Start,End
gettext  "Enter Start date, ex: 1/1/95",Start
Start = date( Start) /* converts to a date value */
gettext  "Enter End date, ex: 12/1/95",End
End = date( End)  /* convert to a date value */
addlines Date,Start,End,"Month"

This example adds 20 records to a database and sequences those new records from 1 to 10 in a field called In/Out, but makes two records for each sequence value by setting copies to 2. Notice also that the end value is a simple formula 1+9. The resulting sequence will be 11223344 …

addlines «In/Out»,1,1+9,1,2

This example adds 10 records to a database, however no field will be sequenced because a variable is used as the first parameter.

local  Useless
addlines Useless,1,1+9

You can also specify “” for the field name if you don’t want any field sequenced.

addlines "",1,1+9

See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0, but now the bump and copies parameters are optional, and allows "" for the field name if you don't want any field sequenced.