Iomode

Use Iomode to assign a value to the different parameters associated with a sequential file opened by Openi, Openio, or Openo when doing an abbreviation.

These parameter are adxium, adxifs, and adxirs.

Syntax

 Iomode adxifs STRING_EXPRESSION Using [ABBR]Iomode adxifs STRING_EXPRESSION Using [ABBR]Iomode adxium INTEGER_EXPRESSION Using [ABBR]

Examples

 # Read a file with CR+LF separator in ascii format# convert it in a file with LF separators in UTF8 formatSubprog CONVERT (FILE_IN, FILE_OUT)Value Char FILE_IN(), FILE_OUT()Local Char LINE(250)# Open the filesOpeni FILE_IN Using [IN]Openo FILE_OUT,0 Using [OUT]# Set the parametersIomode adxium 50Using [IN] : # asciiIomode adxium 0 Using [OUT] : # UTF8Iomode adxifs ''Using [IN] : # no field separatorIomode adxifs ''Using [OUT] : # no field separatorIomode adxirs chr$(13)+chr$(10) Using [IN] : # CRLFIomode adxirs chr$(10)Using [OUT] : # LF# Copy loopRepeatRdseq LINE Using [IN]If fstat=0Wrseq LINE Using [OUT]EndifUntil fstat=0If LINE<>"" : Wrseq LINE Using [OUT] : Endif# Close filesOpeni Using [IN] Openo Using [OUT] End

Comments

When opening a file without an abbreviation, the setting of the parameters is done directly by assignment of adxifs, adxirs, and adxium. In this case, the use of Iomode is not necessary.

Errors

No associated errors.

See also

Openi, Openo, Openio, adxifs, adxirs, adxium.