Josber,
Do manual "Programers Guide":
An initial value must be assigned to identifier-2 prior to execution of the INSPECT statement.
O identifier-2 é o teu CONTA.
Experimenta inicializar o campo conta com 0 ou com 1.
e também :
If identifier-1, identifier-3 occupies the same storage area as identifier-2, the validity of the result of execution of the INSPECT statement is undefined.
O identifier-3 é o teu "CLIENTES". O identifier-1 é o teu WS-SQL
Tens que verificar como estão definidos os campos.
Cria um campo
01 CLISTR PIC X(08) VALUE "CLIENTES" e faz o inspect assim:
Código COBOL:
INITIALIZE CONTA.
INSPECT WS_SQL TALLYING CONTA FOR LEADING CLISTR BEFORE INITIAL "S"
Espero que ajude.
Rui