public class Util
{
public static Boolean ExisteFile(String Ruta_File)
{
boolean existe = false;
try
{
File archivo = new File(Ruta_File);
existe = archivo.exists();
}
catch(Exception e)
{
existe = false;
}
return new Boolean(existe);
}
}
ESQL function:
Code:
CREATE FUNCTION fnIsFileExists(IN fileName CHARACTER)
RETURNS BOOLEAN
LANGUAGE JAVA
EXTERNAL NAME "xyz.com.pe.Util.ExisteFile";
ESQL call function:
Code:
DECLARE val BOOLEAN FALSE;
SET val = fnIsFileExists('/xcom_rep/GAHR/entrada/14/EMPTCC.TXT');
SET Environment.DEBUG.val = val;
If someone has had a similar error, please give me a hand (I've compared Java and ESQL data types using "ESQL-to-Java data-type mapping table" information).
(*) Additional Info:
IIB ver: IBM Integration Bus 9.0.0.1
MQ ver: MQ 7.0
SO: AIX 5.3
Java ver: 7.0
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum