WRITE IFILE Examples
Example 1:
|
|
|
|
|
Logical file: |
DATAFILE |
|
Method: |
Index (KEY1 is a previously defined character string variable) |
|
Variables: |
VAR1, VAR2 and BALANCE |
|
List controls: |
*ZF zero-fills the numeric variable BALANCE |
|
Partial write: |
No semi-colon specified (writes End Of Record (EOR) mark) |
Example 2:
|
|
|
|
|
Logical file: |
MYFILE |
|
Method: |
Index (KEY2 is a previously defined character string variable) |
|
Variables: |
FIELD1 and FIELD2 |
|
List controls: |
*LL enabled for FIELD1 only (*PL disables it after FIELD1) |
|
Partial write: |
Semi-colon specifies partial WRITE (no EOR) |
Example 3:
|
|
|
|
|
Logical file: |
MYFILE |
|
Method: |
Index (the key is constructed using the contents of FIELD1 and FIELD2) |
|
Variables: |
FIELD1 and FIELD2 |
|
List controls: |
none |
|
Partial write: |
none |
![]() |