Cobol - Indexar decendentemente

 
Vista:

Indexar decendentemente

Publicado por JP (4 intervenciones) el 22/10/2002 04:09:37
Hola todos.
Gracias por las respuestas a mis preguntas anteriores, me sirvieron de mucho.
Ahora tengo otra duda, en archivos indexados cobol siempre ordena en forma acendente?, porque necesito indexar algo pero en forma decendente. Esto se puede hacer? y como?
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Indexar decendentemente

Publicado por Diego Romero (16 intervenciones) el 22/10/2002 13:05:56
Suponiendo un campo indice NOMBRE.
Ascendiente:
MOVE ' ' TO NOMBRE.
START ARCHIVO KEY NOT < NOMBRE.
LEER.
READ ARCHIVO NEXT AT END GO CERRAR
....
GO LEER.
Descendente:
MOVE HIGH-VALUES TO NOMBRE
START ARCHIVO KEY <= NOMBRE.
LEER.
READ ARCHIVO PREVIOUS AT END GO CERRAR
....
GO LEER.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar