This is more general than Rexx, so, IBM-MAIN:
I've submitted an RCF on this, but I'm still curious:

In: z/OS 2.2.0
    z/OS TSO/E
    z/OS TSO/E REXX Reference
    TSO/E REXX commands
    EXECIO

14. Example of reading a member of a RECFM=U file and changing the first 
occurrence
    of the word 'TSOREXX ' within each record to 'TSOEREXX' before rewriting 
the record.

Contains a couple unterminated comments and a logic error:

It doesn't do what it says; it truncates the record at the target position 
rather than
replacing.  But when I fix that error, I find, for both RECFM=U and RECFM=VB:

o A replacing string longer than the replaced string  results in an I/O error.
  I guess that's to be expected.

o It's OK for the replacing string to be the same length as the replaced
  string, or shorter.

The "shorter" case intrigues me.  Does it shuffle the remaining records in
the block and write a shorter block?  Is this done by the Rexx function
library or by QSAM?  And how does it fill in the longer inter-block gap
without either overwriting the next block or leaving residual data?  Does
it rewrite all remaining blocks in the track then do a formatting write to
the end-of-track?

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to