37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
{
|
|
Esta funcion se utiliza para desplegar mensajes de errores en todos
|
|
los sistemas de Ray-O-Vac Dominicana.
|
|
Esta funcion busca el mensaje deseado en la tabla "msgtable" y lo
|
|
despliega en la linea de mensajes
|
|
}
|
|
DATABASE smarmotech
|
|
|
|
FUNCTION msg(numero_msg)
|
|
DEFINE numero_msg SMALLINT
|
|
DEFINE descripcion CHAR (60)
|
|
SELECT desc_msg INTO descripcion FROM msgtable
|
|
WHERE cod_msg = numero_msg
|
|
|
|
IF status = NOTFOUND THEN
|
|
LET numero_msg = 22
|
|
SELECT desc_msg INTO descripcion FROM msgtable
|
|
WHERE cod_msg = numero_msg
|
|
ERROR descripcion ATTRIBUTE(BOLD)
|
|
ELSE
|
|
ERROR descripcion ATTRIBUTE(BOLD)
|
|
LET numero_msg = 0
|
|
END IF
|
|
END FUNCTION
|
|
FUNCTION integridad()
|
|
DEFINE numero_msg,bandera SMALLINT
|
|
IF sqlca.sqlcode < 0 THEN
|
|
LET numero_msg = sqlca.sqlcode
|
|
CALL msg(numero_msg)
|
|
DISPLAY numero_msg AT 23,70
|
|
LET bandera = 1
|
|
LET STATUS = 0
|
|
SLEEP 2
|
|
RETURN
|
|
END IF
|
|
END FUNCTION
|