Page 1 of 2
problem with output file
Posted:
Mon Jan 28, 2013 11:49 pm
by Dashimir
my output file starts wrong for some lines then it goes ok for all the others. When i chance the input file getting some lines from the boton and puting it on the top everything goes ok and i coudnt find why.
the output file is something like this
00000000000
00000000000
Jacinto Pinto Akinokudoi 661312684321
Jacinto Pinto Akinokudoi 661312684321
Jacinto Pinto Akinokudoi 661312684321
Jacinto Pinto Akinokudoi 661312684321
Jacinto Pinto Akinokudoi 661312684321
WHEN 'G'
MOVE NR-PROP-SDV-ENT TO NR-PROP-WS
MOVE NR-PROP-SDV-ENT TO LPARM01
PERFORM R-0666-00-CALL
MOVE LPARM01-D1 TO DV-WS
MOVE NR-PROP-DV TO CONVERSI-NP-WS-2
MOVE CONVERSI-NP-WS-2 TO CONVERSI-NP-WS-3
MOVE CONVERSI-NP-WS-3 TO CONVERSI-NUM-PROPOSTA-SIVPF
DISPLAY CONVERSI-NUM-SICOB
PERFORM R-1000-00-ACESSARTABELAS
MOVE CLIENTES-NOME-RAZAO TO NOME-DET
IF CLIENTES-CGCCPF IS NUMERIC
MOVE CLIENTES-CGCCPF TO CPF-CONV
ELSE
DISPLAY 'CLIENTES-CGCCPF NOT NUMERIC'
MOVE ZEROS TO CLIENTES-CGCCPF
END-IF
MOVE CPF-CONV TO CPF-DET
Re: problem with output file
Posted:
Tue Jan 29, 2013 1:34 am
by NicC
how does that code relate to that output and vice versa?
Re: problem with output file
Posted:
Tue Jan 29, 2013 4:43 pm
by Dashimir
DESCRICAO-COD-RETORNO-DET
WHEN 97 MOVE 'Estorno sem cobran a ou erro duplicida
'de' TO DESCRICAO-COD-RETORNO-DET
WHEN 98 MOVE 'Estorno com cobran a no próximo m s' TO
DESCRICAO-COD-RETORNO-DET
WHEN 99 MOVE 'Estorno comandado pela Caixa.' TO
DESCRICAO-COD-RETORNO-DET
END-EVALUATE
WRITE REG-SAIDA FROM REG-DETALHE
WHEN 'Z'
PERFORM R-9999-00-FINALIZAR
END-EVALUATE.
[code][/code]
Re: problem with output file
Posted:
Tue Jan 29, 2013 5:09 pm
by prino
You're completely clueless, aren't you?
If you're working for one of those companies in that part of the world, maybe you should ask them to give you some proper training, like telling you how to use IBM's Debug Tool, so that you can execute your program statement by statement.
Re: problem with output file
Posted:
Tue Jan 29, 2013 5:19 pm
by Robert Sample
Dashimir, if you think -- as your post title suggests -- that you are having trouble with your output file, WHY ARE YOU POSTING CODE? The first thing to do is to post the input file using the Code button, and then the output file, using the Code button, and explain why the output file your program produces is not what you expected. Until and unless you post that, nobody here can help you since we do not read minds and have no way of knowing what it is you are attempting to do.
Re: problem with output file
Posted:
Tue Jan 29, 2013 5:20 pm
by Dashimir
they just lught lol.
the first one come with conversi-num-sicob 000000 i dont know why but when i change the order of the input file everthing goes ok
EXEC SQL
SELECT NUM_SICOB
INTO :CONVERSI-NUM-SICOB
FROM SEGUROS.CONVERSAO_SICOB
WHERE NUM_PROPOSTA_SIVPF = :CONVERSI-NUM-PROPOSTA-SIVPF
END-EXEC.
Re: problem with output file
Posted:
Tue Jan 29, 2013 5:26 pm
by Dashimir
150 file dont know how to post it here correctly
Re: problem with output file
Posted:
Tue Jan 29, 2013 6:12 pm
by Robert Sample
You post that you have "problem with output file", then you post code. You are told to post the details of what your problem is, and you post SQL code.
You get one more chance, then this topic will be locked as completely a waste of time.
WHAT IS YOUR PROBLEM? Tell us in as simple language as you can what results you are getting and why you think they are not right. If you cannot do this, then we cannot help you.
If you are having trouble with SQL, why post in the COBOL section? If you are NOT having trouble with SQL, why post SQL code?
So far, in several posts, there is no clear statement that there even is a problem, much less what the problem is, much less where the problem lies (COBOL, SQL, file, code, data -- among other possibilities).
Re: problem with output file
Posted:
Tue Jan 29, 2013 6:27 pm
by Dashimir
it is hard to explains :S sorry.
the problem is that the first lines of the output file come with empty lines then all the others come ok. When i get 1 line on top of the input file everything goes ok ( my exemple there^^). The lines that weren't processed are processed after i change the first line in the input file with some other line there.
The problem fix when i change the order of the inputfile and i dont know why, i think i will just do that and pretend everything is ok.
Re: problem with output file
Posted:
Tue Jan 29, 2013 8:16 pm
by Robert Sample
The empty output lines are there because you have coded (or modified) the program incorrectly and the lines are being written by your code. Why, and how, the logic error exists are something that only you -- or someone working at your site -- can possibly pursue since we don't have access to the source code.