Arthur Silvestre Posted November 5, 2012 Report Share Posted November 5, 2012 Alguém já enfrentou esse erro ? eu utilizava esse recurso antigamente, porem já depois de algumas atualizações no compilador e tudo mais ele passa a dar o tal erro. A linha é essa: geraban3.prg(279) O Codigo é esse: sArq:=fcreate( "banco.tmp" ) sPathOrigem:="banco.tmp" ARQUI=rtrim(VDRIVE)+TNUMREMP+TMES+TANO+".TXT" tlin=00 slinha:= "A" slinha+= vremessa slinha+= vconveni slinha+= Transform(srasoemp ,"!!!!!!!!!!!!!!!!!!!!") slinha+= vcodiban slinha+= Transform(vnomeban ,"@S20") set date usa slinha+= transform(year(vdatager) ,"9999") slinha+= SUBST(DTOC(vdatager),1,2) slinha+= SUBST(DTOC(vdatager),4,2) set date briti * tlin,73 say "000002" numero sequencial nsa slinha+= vsequenc slinha+= "04" slinha+= "DEB/CRED AUTOMAT " fwrite( sArq, @sLinha,len( sLinha)) tlin=tlin+1 ttorefun=0.00 do while ! eof () if ! empty (dtaffun) .and. left (dtos (dtaffun), 6) <= tanocom + tmes .or. left (dtos (dtadfun), 6) > tanocom + tmes skip 1 loop endif if empty(cobcfun) skip 1 loop endif if empty(cobcfun) skip 1 loop endif select mov set order to 1 seek fun->matrfun+tmean+tcodired if eof() seek fun->matrfun+"0000"+tcodired if eof() select fun skip loop endif endif * select fun select red seek tcodired * tsalifun = mov->valrmov select fun slinha:= "E" slinha+= transform(fun->nomefun ,"@s25") slinha+=cobcfun slinha+=" " set date usa slinha+= Transform(year(vdatacre) ,"9999") slinha+= SUBST(DTOC(vdatacre),1,2) slinha+= SUBST(DTOC(vdatacre),4,2) set date briti valor1=str(tsalifun,16,2) valor2=subst(valor1,1,13) valor3=strzero(val(valor2),13,0) slinha+= valor3 slinha+= right(str(tsalifun),2,2) slinha+= "03" slinha+= "2" slinha+= "" fwrite( sArq, @sLinha,len( sLinha)) * tsalilot = round(tsalilot,2) + round(tsalifun,2) tfuncion = tfuncion + 1 tlin = tlin + 1 skip 1 enddo tot=tlin+1 slinha:= "Z" slinha+= Transform(STRZERO(tot,6,0) ,"999999") slinha+= "00000000000000000" tvalor1=str(tsalilot,18,2) tvalor2=subst(tvalor1,1,15) tvalor3=strzero(val(tvalor2),15,0) slinha+= tvalor3 slinha+= subst(str(tsalilot),12,2) slinha+= " " slinha+= " " tlin=tlin+1 slinha+= "" fwrite( sArq, @sLinha,len( sLinha)) setprc(0,0) set print to set devi to scree close all msgbeep() fclose( sArq ) fclose( ARQUI ) vTxt:= "banco.txt" frename("banco.tmp","&vTxt") SYSWAIT(0.5) oDlgAguarde2:end() IF !FILE("&vtxt") Msginfo("o Arquivo Banco.txt não foi gerado !!!","Atenção") Close Data Return .f. endif copy file &vTxt to &ARQUI MsgInfo("Arquivo "+ARQUI+" Criado com Sucesso !","Informação") ferase("&vtxt") Close data return.t. id=code>id=code>FWH.11.12 + xHarbour12.1 + Pelles C IDE E-mail:ArthurSilvestreSnt@hotmail.com Editado por - arthursilvestre on 05/11/2012 16:58:00 Quote Link to comment Share on other sites More sharing options...
Arthur Silvestre Posted November 5, 2012 Author Report Share Posted November 5, 2012 Alguém já enfrentou esse erro ? eu utilizava esse recurso antigamente, porem já depois de algumas atualizações no compilador e tudo mais ele passa a dar o tal erro. A linha é essa: geraban3.prg(279) O Codigo é esse: sArq:=fcreate( "banco.tmp" ) sPathOrigem:="banco.tmp" ARQUI=rtrim(VDRIVE)+TNUMREMP+TMES+TANO+".TXT" tlin=00 slinha:= "A" slinha+= vremessa slinha+= vconveni slinha+= Transform(srasoemp ,"!!!!!!!!!!!!!!!!!!!!") slinha+= vcodiban slinha+= Transform(vnomeban ,"@S20") set date usa slinha+= transform(year(vdatager) ,"9999") slinha+= SUBST(DTOC(vdatager),1,2) slinha+= SUBST(DTOC(vdatager),4,2) set date briti * tlin,73 say "000002" numero sequencial nsa slinha+= vsequenc slinha+= "04" slinha+= "DEB/CRED AUTOMAT " fwrite( sArq, @sLinha,len( sLinha)) tlin=tlin+1 ttorefun=0.00 do while ! eof () if ! empty (dtaffun) .and. left (dtos (dtaffun), 6) <= tanocom + tmes .or. left (dtos (dtadfun), 6) > tanocom + tmes skip 1 loop endif if empty(cobcfun) skip 1 loop endif if empty(cobcfun) skip 1 loop endif select mov set order to 1 seek fun->matrfun+tmean+tcodired if eof() seek fun->matrfun+"0000"+tcodired if eof() select fun skip loop endif endif * select fun select red seek tcodired * tsalifun = mov->valrmov select fun slinha:= "E" slinha+= transform(fun->nomefun ,"@s25") slinha+=cobcfun slinha+=" " set date usa slinha+= Transform(year(vdatacre) ,"9999") slinha+= SUBST(DTOC(vdatacre),1,2) slinha+= SUBST(DTOC(vdatacre),4,2) set date briti valor1=str(tsalifun,16,2) valor2=subst(valor1,1,13) valor3=strzero(val(valor2),13,0) slinha+= valor3 slinha+= right(str(tsalifun),2,2) slinha+= "03" slinha+= "2" slinha+= "" fwrite( sArq, @sLinha,len( sLinha)) * tsalilot = round(tsalilot,2) + round(tsalifun,2) tfuncion = tfuncion + 1 tlin = tlin + 1 skip 1 enddo tot=tlin+1 slinha:= "Z" slinha+= Transform(STRZERO(tot,6,0) ,"999999") slinha+= "00000000000000000" tvalor1=str(tsalilot,18,2) tvalor2=subst(tvalor1,1,15) tvalor3=strzero(val(tvalor2),15,0) slinha+= tvalor3 slinha+= subst(str(tsalilot),12,2) slinha+= " " slinha+= " " tlin=tlin+1 slinha+= "" fwrite( sArq, @sLinha,len( sLinha)) setprc(0,0) set print to set devi to scree close all msgbeep() fclose( sArq ) fclose( ARQUI ) vTxt:= "banco.txt" frename("banco.tmp","&vTxt") SYSWAIT(0.5) oDlgAguarde2:end() IF !FILE("&vtxt") Msginfo("o Arquivo Banco.txt não foi gerado !!!","Atenção") Close Data Return .f. endif copy file &vTxt to &ARQUI MsgInfo("Arquivo "+ARQUI+" Criado com Sucesso !","Informação") ferase("&vtxt") Close data return.t. id=code>id=code>FWH.11.12 + xHarbour12.1 + Pelles C IDE E-mail:ArthurSilvestreSnt@hotmail.com Editado por - arthursilvestre on 05/11/2012 16:58:00 Quote Link to comment Share on other sites More sharing options...
Arthur Silvestre Posted November 5, 2012 Author Report Share Posted November 5, 2012 ja foi resolvido >_> FWH.11.12 + xHarbour12.1 + Pelles C IDE E-mail:ArthurSilvestreSnt@hotmail.com Quote Link to comment Share on other sites More sharing options...
kapiaba Posted November 5, 2012 Report Share Posted November 5, 2012 citação:ja foi resolvido >_> FWH.11.12 + xHarbour12.1 + Pelles C IDE E-mail:ArthurSilvestreSnt@hotmail.com id=quote>id=quote>Não destes um FCLOSE() no arquivo de texto né??? kkkkkkkkkkkkkkkkkkkk João Santos - São Paulo. joao@pleno.com.br Fone: (11) 3106-2832 / 5150-7341 - TIM https://www.facebook.com/kapiaba FWH 2.7 - xHARBOUR WorkShop.Exe Quote Link to comment Share on other sites More sharing options...
Arthur Silvestre Posted November 5, 2012 Author Report Share Posted November 5, 2012 kkkkkkkkkkkkkkkkkkkkkk psiu pra ninguem escultar kkkkkkkkkkkkkkkkkkkkkkkkkkk FWH.11.12 + xHarbour12.1 + Pelles C IDE E-mail:ArthurSilvestreSnt@hotmail.com Quote Link to comment Share on other sites More sharing options...
AnaCatacombs Posted November 6, 2012 Report Share Posted November 6, 2012 Escutar. Quote Link to comment Share on other sites More sharing options...
Arthur Silvestre Posted November 6, 2012 Author Report Share Posted November 6, 2012 >_> FWH.11.12 + xHarbour12.1 + Pelles C IDE E-mail:ArthurSilvestreSnt@hotmail.com Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.