|
Process Help EXPFLD - copy a file expanding the number of records |
Process Name |
Menu Path |
Link to Command Table |
EXPFLD |
Dataribbon |Data Tools | Data Tools | Expand File |
Introduction
Copies a file, while expanding the number of records so that a record is output for given increments of a start field until an end field value is reached.
How to use
A typical use is where there are properties defined over a range of sample numbers, and these are to be combined with other data entered for each sample. For example, suppose the file contains the following fields:-
BHID Fromno Tono Density
where the Density is defined for the range of sample numbers in Fromno and Tono. EXPFLD could be used to expand this into a new file containing the fields:-
BHID Sample Density
This file contains a record of the Density for each sample number, and as such may be combined with other files in this format.
Files, Fields and Parameters
Input Files
Name |
Description |
I/O Status |
Required |
Type |
IN |
Input file containing numeric explicit fields START and END defining the range. |
Input |
Yes |
Undefined |
Output Files
Name |
I/O Status |
Required |
Type |
Description |
OUT |
Output |
Yes |
Undefined |
Output file containing extra records between the given ranges, the actual value being held in field NEWFIELD. |
Fields
Name |
Description |
Source |
Required |
Type |
Default |
START |
Name of field giving the start of the range. |
IN |
Yes |
Numeric |
Undefined |
END |
Name of field giving the end of the range. |
IN |
Yes |
Numeric |
Undefined |
NEWFIELD |
Name of field in output file containing the value for the record within the range. |
OUT |
Yes |
Numeric |
Undefined |
Parameters
Name |
Description |
Required |
Default |
Range |
Values |
INCRMENT |
Increment to be applied to START within range. |
Yes | Undefined | Undefined | Undefined |
Notes
The records output are for values of *START, *START+@INCRMENT, *START+2*@INCRMENT etc until the value of *END for the input record is reached. This means that @INCRMENT must never be zero, or an infinite number of records lie between the values.
Example
!EXPFLD
|
&IN(COMDEN),&OUT(SAMDEN),*START(FROMNO), |
This is the example given at the start of this section.
Error and Warning Messages
Message |
Description |
Solution |
>>> WARNING - RECORD nnnnnn HAS START nnnnnn.nn GT END nnnnnn.nn <<< |
Warning; illegal record. The record is output unchanged. |
|
|
|
|
>>> FIELD DOES NOT EXIST <<< |
Either the *START or the *END field does not exist in the input file. Fatal; the process is exited. |
|
|
|
|
>>> FIELD NOT NUMERIC <<< |
Either the *START or the *END field was alphanumeric. Fatal; the process is exited. |
|
|
|
|