You are here: Available Utilities > A > ARCSPLIT > Using with DAL Scripts

Using ARCSPLIT with DAL Scripts

You can use DAL scripts to when you split or back up an archive. The ARCSPLIT utility makes available to the DAL script all of the APPIDX column values you specify. This script can only return Yes or No. If anything else is returned, the system defaults to No.

All field names specified in the script file must include the word ARCSPLIT, such as ARCSPLIT.KEY1. This is required in case multiple index files are in use.

Note Refer to the DAL Reference for information on the DAL functions you can use to create the scripts.

Assume the following form sets are stored in the archive, the INI options are set as shown below, and the DAL scripts COMPANY.DAL and COMBINED.DAL exist in the DefLib directory.

KeyID

Key1

Key2

Date archived

AA

Sampco

LB1

03/01/1999

BB

Sampco

LB2

03/01/1999

CC

FSI

GL

03/02/1999

DD

FSI

GF

03/02/1999

EE

MyCompany

GO

03/03/1999

Also assume these INI options are set:

< ArcRet >

  SplitAppIdx = arc1\AppIdx1.dbf

  SplitCARFile = arc1\Archive1.car

  SplitCatalog = arc1\Catalog1.

The COMPANY.DAL script looks like this:

If ARCSPLIT.Key1 = "FSI" then Return ("Yes");

   Else Return ("No");

End

The COMBINED.DAL script looks like this:

if (ARCSPLIT.KEY1 = "FSI " AND ARCSPLIT.KEY2 = "GL ") then

Return ("YES");

Else Return("NO");

End

Note Make sure the value you specify matches the field length defined in the DFD (Database Field Definition) file. In this example, the field length of KEY1 is four characters and the search value should be “FSI “ (with a space between I and the ending quotation mark) instead of “FSI”.

Based on these assumptions, this table shows the results if you enter the following commands to run the ARCSPLIT utility:

If you enter

The result is

ARCSPLIT /sd=19990301 /ed=19990301 /ini=fsiuser.ini

Records AA and BB are written to the archive files (ARCHIVE.CAR, APPIDX1.DBF, CATALOG1.DBF, APPIDX1.MDX, and CATALOG1.MDX) in the arc1 directory. The records in the master archive are not changed.

ARCSPLIT /sd=19990301 /ed=19990301 /ini=fsiuser.ini

Records AA and BB are written to the archive files in the arc1 directory. The records in the master archive are not changed. The APPIDX1 and CATALOG1 files will be flat files.

ARCSPLIT /sd=19990301 /ed=19990301 /ini=fsiuser.ini /p

Records AA and BB are written to the archive files in the arc1 directory. These records are also deleted from the master archive.

ARCSPLIT
/dal=deflib\company.dal ini=fsiuser.ini

Records CC and DD are written to the archive files in the arc1 directory. The records in the master archive are not changed.

ARCSPLIT
/dal=deflib\combined.dal ini=fsiuser.ini

Record CC is written to the archive files in the arc1 directory. The records in the master archive are not changed.