WRITE AFILE Examples


Example 1:

 

  

WRITE

DATAFILE;VAR1,VAR2,*ZF,BALANCE

 

Logical file:

DATAFILE

Method:

Associative Access Method (AAM - key datan automatically extracted)

Variables:

VAR1, VAR2 and BALANCE

List controls:

*ZF turned on only for BALANCE

Partial write:

No semi-colon specified (writes End Of Record (EOR) mark)

 

Example 2:

 

  

WRITE

MYFILE;*LL,FIELD1,*PL,FIELD2;

 

Logical file:

MYFILE

Method:

Associative Access Method (AAM - key datan automatically extracted)

Variables:

FIELD1 and FIELD2

List controls:

*LL enabled for FIELD1 only (*PL disables it after FIELD1)

Partial write:

Semi-colon specified for partial WRITE (no EOR)

 

 



PL/B Language Reference WRITAB Example WRITE FILE Examples