Character String Variables (DISK I/O)


 

All Character String Variables (under normal I/O operation) are read or written as follows. This may be modified with the list controls defined later in this chapter.

 

Input

  1. The information is read from the disk starting at the file's current position (based on the type of READ instruction).

  2. Data is moved into the variable beginning with the first physical position of the variable and continuing through the Physical Length.

  3. The Form Pointer is set to one and the Length Pointer is set to the last character transferred unless the *LL control is used. If the *LL control is used with a READ instruction, the Form Pointer is set to one (1) and the Length Pointer is set to the last non-blank character transferred.

  4. If the End Of Record (EOR) is reached before the variable is full, the Length Pointer indicates to the last character transferred and the remainder of the variable is blank filled.

  5. If the EOR is reached before the variable list is exhausted, the remaining character string variables is blank filled and set to null (both Form Pointer and Length Pointer set to 0).

  6. ARRAY variables that have no index specified are treated as multiple fields and all elements are processed before proceeding to the next item in the list.

 

Output

  1. The contents from the first physical character through the Length Pointer are transferred to disk with any positions following the Length Pointer through the Physical Length being blank filled, unless the *LL control is used. If *LL is used, only the contents between the Form Pointer and the Length Pointer are written, with no blank filling.

  2. The first character is written at the current position within the file.

  3. ARRAY variables that have no index specified are treated as multiple fields and all elements are written before proceeding to the next item in the list.

 

 

See Also: Numeric Variables, Disk I/O Instructions

 



PL/B Language Reference File and Record Locking Numeric Variables (DISK I/0)