To limit the number of records CODE-1 Plus processes, use the following methods:
-
Skip a portion of the file before any records are selected.
-
Enter a fraction to select a portion of the records, evenly spaced throughout the file.
-
Specify the maximum number of records to process. CODE-1 Plus will start at the beginning of the file and process every record until the maximum number is reached.
You can use these fields in conjunction with each other. For example, you could enter a number of records to skip, and a maximum number of records to read if you wanted to process the middle of the file, but not the beginning or the end.
Fractional Record Selection
The fractional record selection feature enables you to sample records throughout the file, from beginning to end, without processing consecutive records. To determine the number to enter in this 7-byte field, divide the number of records you want to process by the number of records in the file. This will give you a decimal number. Drop the decimal, and enter the first 7 digits of the number. For example, you have a file with 102986 records, and you want to process 2000 records. You would divide 2000 by 102986 and get .0194201153. Dropping the decimal, you would enter 0194201 in the fractional record selection field. This will ensure that the 2,000 records processed are evenly distributed throughout the file.
Position |
Field Name |
Description |
---|---|---|
1-6 |
Keyword |
Required. FILEDF is the only acceptable entry. |
8-15 |
File Name |
Required. Specify the name of the input or output file:
|
17 |
Record Format |
Required. Specify a code to indicate the format of the input and output file records:
NOTE: Under UNIX and Windows, variable means ACUCOBOL-GT variable format files. Output files can also be variable in UNIX and Windows. NOTE: Not valid for file C1BMSTA. |
19-22 |
Record Length |
Required, except for z/OS. The length, in bytes, of the records in the file. For variable-length records, this is the maximum record length. Maximum is 32,760. No default. NOTE: If you need to enter a 5-digit number, use columns 18-22. |
24-28 |
Block Size |
Required, except for z/OS and UNIX. Specify the size, in bytes, of the blocks in the file. No default. NOTE: Not valid for file C1BMSTA. |
35 |
Label Type |
Optional. Specify a code to indicate whether the records on the file have standard or omitted labels:
NOTE: Not valid for file C1BMSTA. |
39-46 |
Exit Routine Name |
Optional. Name of the input exit routine that should be called when CODE-1 Plus is ready to read a record from this file, or the name of the output exit routine that should be called when CODE-1 Plus is ready to write a record to the file. Name must be entered left-justified. No default. NOTE: Not valid for file C1BMSTA. |
50-56 |
Number of Records to Skip |
Optional. Number of records CODE-1 Plus should skip before selecting the first record. No default. NOTE: Not valid for file C1BMSTA. |
58-64 |
Fractional Record Selection |
Optional. Number indicating the fraction of records in the file that should be processed. CODE-1 Plus assumes a decimal point before the first digit. No default. NOTE: A number greater than 5000000 selects the entire file. NOTE: Not valid for file C1BMSTA. |
66-72 |
Maximum Number of Records |
Optional. Maximum number of records CODE-1 Plus should read from or write to this file. No default. NOTE: Not valid for file C1BMSTA. |