Files
MBS/PROYECTO/otrodir/busca1.err
T

59 lines
1.4 KiB
Plaintext

DATABASE rayovac
GLOBALS
|
| Database not found or no system permission.
| See error number -329.
|
| The database "rayovac" cannot be found or opened. If the database
| exists, check the database permissions on the database. In
| addition, check the system permissions on the database directory
| and its ascendant directories.
| See error number -4305.
DEFINE codigos RECORD LIKE irtb00002.*
DEFINE codigos1 RECORD LIKE intb00001.*
END GLOBALS
MAIN
CALL busca()
END MAIN
FUNCTION busca()
DECLARE busca_ir CURSOR FOR
SELECT *FROM irtb00002
ORDER BY 1,2,3,4
START REPORT saca TO "reporte"
FOREACH busca_ir INTO codigos.*
SELECT * INTO codigos1.* FROM intb00001
WHERE @cod_n = codigos.cod_n and
@cod_grupo = codigos.cod_grupo and
@cod_tipo = codigos.cod_tipo and
@cod_sec = codigos.cod_sec
IF status = notfound THEN
OUTPUT TO REPORT saca(codigos.*,codigos1.*)
END IF
END FOREACH
FINISH REPORT saca
END FUNCTION
REPORT saca(x,z)
DEFINE x record like irtb00002.*
DEFINE z RECORD LIKE intb00001.*
DEFINE descripcion CHAR(30)
format
page header
print column 1,
"REPORTE DE CODIGOS QUE ESTAN EN IRTB00002 Y NO ESTAN EN INTB0001"
print column 1, today
print column 1, time
skip 1 line
print column 1, "ARTICULOS..."
SKIP 1 LINE
ON EVERY ROW
PRINT COLUMN 1, x.cod_n using "&","-",x.cod_grupo using "&","-",
x.cod_tipo using "&&","-",x.cod_sec using "&&&"," ",z.descrip_esp
END REPORT