The following examples show all of the ways to use the DEFINE command:
Example 1—initialize a tableBASE library
Initialize a tableBASE library identified by the DDNAME PRODLIB.
DEFINE NEWLIB=PRODLIB;
Example 2—define a new table
Define a new table, named TABLE02, on tableBASE library PRODLIB. The table is to be in ascending sequence by key and will be searched using a Binary search. Two generations of the table are to be kept to provide a backup, and the table will contain approximately 300 rows when full. Each row will be 120 characters long and the 18 character key starts in position 5.
DEFINE LIB=PRODLIB TBL=TABLE02 ORG=S
MTHD=B MAXGEN=2 ISZ=120 KSZ=18
KLOC=5 EST=300 UCOMMENT=’New Table’;
Example 3—create an Alternate Index
Create an Alternate Index definition called EMPNAME for the Data Table EMPNUM. The Alternate Index will use a 40 byte key starting in position 18. The Alternate Index will describe a Sequential table searched with a Binary search.
DEFINE ALT=EMPNAME BASENAME=EMPNUM
KSZ=40 KLOC=18 ORG=S MTHD=B;