Galera é o seguinte, vejam o exemplo abaixo: DEFINE TEMP-TABLE ArqExterno FIELD Data AS DATE FORMAT "99/99/9999" FIELD Valor AS DECIMAL DEFINE cVariavel as char. DEFINE DataAux as date. DEFINE ValorAux as decimal. INPUT FROM value(diretorio). repeat: import UNFORMATTED cVariavel. if cVariavel <> "" then DO: ASSIGN DataAux = DATE(ENTRY(1, cVariavel, ";")) ValorAux = DECIMAL(ENTRY(2, cVariavel, ";")) NO-ERROR. IF ERROR-STATUS:ERROR THEN DO: MESSAGE "Deu erro" VIEW-AS ALERT-BOX INFO BUTTONS OK. LEAVE. END. ELSE DO: CREATE ArqExterno. ASSIGN ArqExterno.Data = DATE(ENTRY(1, cVariavel, ";")) ArqExterno.Valor = DEC(ENTRY(2, cVariavel, ";")) ArqExterno.cNomeIndice = ENTRY(3, cVariavel, ";") ArqExterno.cTipoIndice = ENTRY(4, cVariavel, ";") ArqExterno.cTipoFator = ENTRY(5, cVariavel, ";"). END. END. END. INPUT CLOSE. Blz, até aí tudo bem eu intercpto o erro e mando a msg que quero. Minha duvida é: 1) Como posso ao intercptar o erro, saber qual tipo de erro se refere, ou seja, se refere-se a um erro "x" informarei que o problema é no campo data, se for a um erro "y", informarei que é no campo valor... e assim sucessivamente. 2) como posso saber se o conteúdo não está vindo no formado desejado,por exemplo: a) Primeiro campo:no arquivo está 10/12 ou 10/2010, no entanto, so posso receber se estiver como: "dd/mm/aaaa"? b) Segundo campo: no arquivo está 10,30, no entanto, so posso receber se estiver como: 0000000,0? Grato, Edson
Tenta assim: Código: ASSIGN DataAux = DATE(ENTRY(1, cVariavel, ";")) ValorAux = DECIMAL(ENTRY(2, cVariavel, ";")) NO-ERROR. if DataAux = ? then do: message "DataAux invalida." view-as alert-box info button ok. leave. end. else if ValorAux > 0 then do: Message "ValorAux invalido." view-as alert-box info button ok. leave end.