1 / 7

ACTUALIZACI ÓN SECUENCIAL

ACTUALIZACI ÓN SECUENCIAL. SICI-3009 Prof. Nelliud D. Torres. REQUISITOS. Tanto las transacciones como el archivo maestro deben tener los records en orden secuencial por el mismo campo clave. Los tipo de transacciones que podemos hacer es; ADD, DELETE y MODIFY

azure
Télécharger la présentation

ACTUALIZACI ÓN SECUENCIAL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ACTUALIZACIÓN SECUENCIAL SICI-3009 Prof. Nelliud D. Torres

  2. REQUISITOS • Tanto las transacciones como el archivo maestro deben tener los records en orden secuencial por el mismo campo clave. • Los tipo de transacciones que podemos hacer es; ADD, DELETE y MODIFY • Para cada transacción tenemos tres posibilidades.

  3. Transacciones Archivo Maestro Programa de Actualizar Archivo Maestro Actualizado Reporte de Errores BLOCK DIAGRAM

  4. MASTER NUM-PIEZA PIC X(5). DESCRIPCION PIC x(30). PRECIO-UNITARIO PIC 9(5)V99. CANT-INVENTARIO 9(5), TRANSACTION FILE T-NUM-PIEZA PIC X(5). T-TIPO-TRANS PIC X. * T-CANT-INVENT PIC 9(5). * A = Add (añadir una pieza nueva) M = Modify (Actualizar la cantidad) D = Delete (eliminar pieza del inventario) DESCRIPCIÓN DE ARCHIVOS

  5. ADD IF T > M 1. Mover el record del Old Master File al New Master File. 2. Leer un nuevo record del Old Master File. IF T < M 1. Escribir el New Master File con los datos dados en la transacción. 2. Leer la próxima transacción. IF T = M 1. Error, el record ya existe. 2. Mover el record del Old Master File al New Master File. 3. Leer próximo record del Old master file y del Transaction file.

  6. MODIFY IF T > M 1. Mover el record del Old Master File al New Master File. 2. Leer un nuevo record del Old Master File. IF T < M 1. Error – Record not found. 2. Leer la próxima transacción. IF T = M 1. Calcular la cantidad en inventario. 2. Mover el record del Old Master File al New Master File. 3. Leer próximo record del Old master file y del Transaction file.

  7. DELETE IF T > M 1. Mover el record del Old Master File al New Master File. 2. Leer un nuevo record del Old Master File. IF T < M 1. Error – Record not foud. 2. Leer la próxima transacción. IF T = M 1. Leer un record del Old master file y del Transaction file. 2. No se va a escribir nada, con eso se elimina el record indicado.

More Related