Page 1¶
Software Utility Program¶
flowchart TD
A(Input File(s)) --> B(File extract program)
B --> C(File or report)
C --> D(Split file)
D --> B
B --> E(File descriptions)
F(VDU) --> B
G(Mode file) --> B
ND 10516 FILE HANDLER¶
INTRODUCTION¶
This program can be used to retrieve and reformat data records from large data file(s), to generate test files, to produce a report or a smaller file that can be used in further data processing.
The user can specify extraction criteria and various output records and report layouts by interacting with the program or by running a mode file.
The program has extensive HELP functions.
A split file option exists whereby data records not satisfying the selection can be placed on a secondary output file.
The program can do simultaneous sorting and output selecting and reporting.
These facilities make the program very useful in many data processing situations where otherwise special programming tasks were necessary.
FEATURES¶
- This is a utility program which can extract records from one or several input files onto another file or output device.
- It may also be used as a random generator, or as a simple report generator.
- By using the split option, records not satisfying given extract selection criteria can be placed on a second output file, thus providing a complete file split possibility.
- The user may define the output record layout differently from the input record.
- It is also possible to sort the output file.
- The program will ask for all necessary parameters. If you answer with a question mark (?), the program will explain the parameter.
- After the last data input field has been answered, the program starts execution.
- The input parameters can be saved on a file, enabling you to run the job again as a MODE or BATCH job by starting it from your terminal or from another program.
10516-A1–6000–683
Page 2¶
Product Description¶
The ND 10516 File Handler runs on ND 16-bit computers. The product executes as a user program or as a reentrant subsystem under SINTRAN III/VS Operating System, requiring approximately 20 pages of disk space. The normal workset is between 3–5 pages. Several active users can retrieve data from the same input file simultaneously.
The program can be run in dialogue mode (predefined form), or by executing the mode file which you can let the File Handler program store for you the first time you define the parameters, or write in NOTIS-WP or PED.
When starting the File Handler program, a picture comes up on the screen with the questions listed below:
Save-command-file¶
All your input can be saved on this file. In this way, specification given for an extract/report/random generation run may be reused as a MODE– or BATCH-job. The mode/batch file may be edited.
Input file¶
The input file(s) may be any unsorted sequential SINTRAN file with fixed or variable record length, created by ACCESS (NOTIS-QL, PED, NOTIS-WP or any programming language (FORTRAN, COBOL, RPG II or BASIC).
Syntax example for the input-file specification:
- file-1: all records will be read
- file-1 10: 10 records will be read
- file-1 10 . 20 file-2: record 10 to 20 on file-1, and all records on file-2 will be read.
If you want to use the program as a random generator, just answer with CR.
Input/Output file record type¶
Record type may be either T(ext), F(ixxed) or V(COBOL's variable records).
Record length¶
Number of bytes in each record of the file (if fixed record length).
Output file¶
The output file may be any sequential SINTRAN file. If no output file is specified, the terminal is used as output device.
Split-file¶
Records not selected will be written on the SPLIT-FILE. If the split-file is omitted, the records not selected will be bypassed.
Input description¶
| Syntax | |
|---|---|
| item name, start position, length, type, number of digits after decimal point, 'item leader text' |
Example:
SALESMAN 1,10 A DISTRICT 11,10 A PROD-NAME 21,15 A PROD-NR 21,15 I UNITS 51,5.2 B AMOUNT 76,9.2 B
Type may be A (alphanumeric/alphabetic), N (numeric display), I (integer), D (double integer), B (packed decimal) and R (real).
Only items which are to be used later need be specified. It is possible to have the input description on a separate file. Then you write COPY
Output description¶
| Syntax | |
|---|---|
| item name, start position, length, type |
Example:
DISTRICT 1,10 A SALESMAN 11,10 A
The output description is only used if the output record is to be different from the input record. Types are the same as for the input description.
If you want to use the program as a report generator, do not use this output-record description. All parameters necessary to make the report will be asked for later.
If you want to use the program as a random generator, describe the output record here.
Extract specification¶
The extract specification determines which records are to be written to the output file.
If you want all records to be written to the output file, do not give any input.
An extract expression may use:
- = equal to
- > greater than
- < less than
- All may be preceded by NOT
- AND
- OR
- Parentheses nesting
Examples¶
PROD-NR NOT = 10023
(DISTRICT = 'Indiana' AND SALESMAN = 'ALESMAN') AND AMOUNT > 10.00
A text string shorter than the item length will cause the specified item to be scanned for the presence of the given string.
If you want to use the program as random generator, answer with RANDOM.
Random start¶
Write any number. If you want the same output in another run, use the same number.
Number of records¶
Number of generated records.
Sort order¶
The output file may be sorted in any sequence by writing the names of the items (the names used in input description) followed by ASCENDING or DESCENDING.
Example:
DISTRICT ASCENDING SALESMAN ASC
Do you want a report¶
If you answer: y, the File Handler will ask for all parameters necessary to make the report.
Main heading¶
If you want a new page each time certain items change values (break condition) write the name of the item (the name used in the input record description) before the main heading which starts and ends with double quotes.
Example:
"Total sales for all salesmen"
Page shift after break condition may be suppressed by writing NP (no page shift) after the item name.
Example:
SALESMAN NP DISTRICT "Sales per Salesman and District"
Report contents¶
List the items which are to be in the report. If you want the break and total sum for an item, write SUM after the item name.
Example:
PROD-NO PROD-NAME UNITS SUM AMOUNT SUM
If a break condition is specified in MAIN HEADING and SUM is specified in the Report contents, a sub-total will be printed each time the break condition is true. It is possible to have the item list on a separate file. Then you only write COPY file-name instead of the Report contents.
Number of lines per page¶
Default is 67.
Prerequisites¶
The program can be run on any NORD-10/ND-100 computer with the SINTRAN III/VS operating system. On a NORD-10 the commercial instruction set must be installed in order to run the program.
References¶
File Handler User’s Manual
ND-60.175