Appendix E. REXX SAA Level 2 Architecture

This topic is an extract from the VM/ESA Version 1, Release 2.1 Performance Report (GC24-5673).  It gives details about the introduction of REXX SAA Level 2, and more specifically, on the File I/O functions.  The information is however limited to only a few methods.  We therefore provide our own view on the subject in Appendix F. "Host versus Personal Computers".

Previous to REXX SAA Level 2, applications had to rely on VM/ESA services such as CMS EXECIO to do I/O.  Applications can now use REXX stream I/O and be consistent with REXX applications on other SAA platforms.

A CMS path length comparison was made between three I/O methods.  Code fragments for reading records follows (the write tests were similar):

  1. CSL (was opened with intent to read):
      call csl 'DMSOPEN cslrc cslrsn fileid fileidL intent intentL token'
      call csl 'DMSREAD cslrc cslrsn token NumR RL Buf BufL BytR'
      call csl 'DMSCLOSE cslrc cslrsn token commit commitL'
    
  2. EXECIO (the first has an implicit open and reads the first record; FINIS closes the file) :
      'EXECIO 1 DISKR' fileid '(VAR X'
      'EXECIO 1 DISKR' fileid '(VAR X'
      'FINIS' fileid
    
  3. Stream I/O:
      parse value stream(fileid,'c','open read') with ok handle
      y = linein(handle)
      y= stream(handle,'C','CLOSE')
    

The following table summarizes the path lengths measured:

 +------------------------------------------------------------------+
 !Path length comparison between CSL, EXECIO, and Stream I/O.       !
 +-------------------------------+-------+----------+---------------+
 !Function                       !  CSL  !  EXECIO  !  Stream I/O   !
 +-------------------------------+-------+----------+---------------+
 !OPEN (read)                    ! 15134 !  * 6921  !    28341      !
 !READ                           ! 13520 !    5460  !     4131      !
 !CLOSE                          ! 12399 !    2885  !     5096      !
 !OPEN (write)                   ! 14934 !  * 8306  !    28228      !
 !WRITE                          ! 12234 !    5751  !     4559      !
 !CLOSE                          ! 14324 !    4810  !     7028      !
 !                               !       !          !               !
 !TOTAL                          ! 82545 !   34133  !    77383      !
 +-------------------------------+-------+----------+---------------+
 !Note * This OPEN includes the reading/writing of the first record.!
 +------------------------------------------------------------------+

Stream I/O was slightly faster than CSL in the above scenario (77383 versus 82545). If more records were read or written, the stream I/O advantage would increase because each read was 69% faster with stream I/O and each write was 62% faster.

Stream I/O was slower than EXECIO (77383 versus 34133).  If enough records were read or written, stream I/O could be faster because, for each read, stream I/O was 24% faster than EXECIO and each write was 20% faster.  However, if there are multiple records, EXECIO does have the capability to read or write multiple records using a stem variable; this would give the advantage back to EXECIO.