Está en la página 1de 3

Procedure división.

Perform Abrir-ficheros

Perform Leer-alumnos

Perform Leer-Fech-listado

Perform Escribir-cabeceras

Perform Porcesar-alumnos

Until procesar-alumnos

Perform escribir-totales

Perform cerrar-ficheros

Stop RUN

Procesar-alumnos

Perfrom buscar-colegios

Perform mover-datos.linea-detalle

Perfor calula-media

***

SPECIAL-NAMES.

DECIMAL-POINT is comma

C01 is salto-pag

C12 is salto-fin-pag.

Escribir-Cabeceras.

ADD 1 to ct-pag

Move ct-pag to pagina of línea-1

Wirte Linea from Linea-1 AFTER PAGE

Write línea from línea-2 after 1 lines

--- en working
01 NK-MEDIA PIC 99V9

01 ct-pag pic 9(3) value zero.

01 ct-linea pic 99.

01 ac-notas-alumno pic 99.

01 ct-notas-alumno pic 99.

01 ct-asig-1 pic 9(5) value Zero.

01 ac-notas-1 pic 9(6) value Zero.

Buscar –código:

Move colegio of reg.alumnos to cod-codigo of reg-colegio [Capte la atención de los lectores


mediante una cita importante extraída
Read colegios
del documento o utilice este espacio para
If fs-fs-colegios_ok resaltar un punto clave. Para colocar el
cuadro de texto en cualquier lugar de la
Move nmb-collegio of reg-alumno to codcolegio of página, solo tiene que arrastrarlo.]
Move colegio-nt

Else

Display ‘error al leer colegios

Move 37 to return-code

Etp rok‘

colegio,nth

move-datos-linea-detalle.

Move zero t oct-asig-alum

move nif of reg-alumnnos to nif of detalle

move nombre of nombre to nif of detalle

move apellidos of reg-alumnos

if nota1 of reg-alumnos = zero


move ‘NP’ to nota1-R of detalle

else

move nota1 of reg-alumnos to nota1 of detalle

add 1 to ct-asig-alumn ct-asiG-1

ADD NOTA1 OF DETALLE

ADD NOTA1 OF REG-ALUMNOS

TO AC-NOTAS-ALUMNO AC-NOTAS-1

END-IF

IF CT-ASIG-ALUMNO >ZERO

COMPUTE WK-MEDIA ROUNDED

= AC-NOTAS-ALUMNO

/ CT-ASIG-ALUMNO

MOVE WK-MEDIA TO MEDIA OF DETALLE

ELSE

MOVE ‘NP’ TO MEDIA-r

END-IF

ANTES DE ESCRIBIR DEBO CONTROLAR EN QUE NUM DE LINEA VOY A ESCRIBIR.

DEBO INCREMENTAR

También podría gustarte