On Wednesday, 06/01/2011 at 10:50 EDT, Sergio Lima 
<sergiovm...@hotmail.com> wrote:

> We want write a REXX EXEC , that do a Update in place.
> Another words, I need, read the record 1 from the file, and then rewrite 
the 
> same record.
> Is possible?

Yes.  There are a few programming considerations:
1.  If the file is RECFM F, you can change any record you want.
2.  If the file is RECFM V, you can change any record you want.
3.  If you change the LRECL of a record in a RECFM V file, that record 
will become the last record in the file.
4.  If other virtual machines have the disk accessed while you're doing 
this, then you can use filemode number 6 to cause the records to be 
physically rewritten to the same disk location.
5.  Update-in-place using fm6 exposes the file to corruption if the system 
or CMS dies in the middle of a write.

For more information, please read these (sub)sections of Ch. 9 (CMS File 
System) of the CMS Application Development Guide for Assembler
- Replacing Records
- EDF Data Integrity
- Extending the file

Alan Altmark

z/VM and Linux on System z Consultant
IBM System Lab Services and Training 
ibm.com/systems/services/labservices 
office: 607.429.3323
mobile; 607.321.7556
alan_altm...@us.ibm.com
IBM Endicott

Reply via email to