1. Fernando Leal
  2. PowerBuilder
  3. Wednesday, 8 April 2020 19:59 PM UTC

Write a file in Appenon 2019.
I am generating a file and the same one from the application generates 290 rows but when I execute the function outside the normal system circuit it generates 540 rows.
I can't find the reason why this function in a way generates certain information.
The parameters and the information to be generated in it on both sides where it is executed.

 

string ls_texto
ls_texto = strHeader + C_FL + strImage

uo_archivo iarc_convert
boolean ib_audit_registrar = true
string is_audit_archivo_camino = 'C:\Sistema\Produc\Imagen\Etiqueta\PCX'
string is_audit_archivo_nom = as_etiq //'Etiq2'
string is_audit_archivo_extension = 'grf'
string is_audit_archivo_col_sep = ' - '

iarc_convert = create uo_archivo
iarc_convert.is_archivo_camino = is_audit_archivo_camino
iarc_convert.is_archivo_extension = is_audit_archivo_extension


if iarc_convert.abrir_escritura(as_etiq, 1) < 0 then // Agregar filas al final
return -1
end if

 


iarc_convert.escribir_Ex(ls_texto)


iarc_convert.cerrar()

if IsValid(iarc_convert) then
destroy iarc_convert
end if

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 8 April 2020 20:25 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Fernando;

   The actual file processing code seems to be located in the "uo_archivo" object class. You will have to study the PowerScript code in there for how the actual FileWriteEx() command is being used.

Regards ... Chris

Comment
  1. Fernando Leal
  2. Wednesday, 8 April 2020 20:33 PM UTC
Hi Chris, yes is the same function.



if FileWriteEx (il_archivo_manejador, as_texto) <= 0 then

error_mostrar ('Se Produjo un Error de Escritura en el Archivo ' + is_archivo_nom)

return -1

end if



return 0





En the botton I called the function



String ls_imagen

String ls_etiq



ls_imagen = "C:\Sistema\Produc\Imagen\Etiqueta\2_Alim_America.bmp"

ls_etiq = 'Etiq2'



uf_bmp_to_grf(ls_imagen,ls_etiq)





In the windows process in the system

ls_imagen_directorio = trim(is_etiqueta_imagen_directorio+ '\'+ls_etiqueta_producto_imagen)

uf_bmp_to_grf(ls_imagen_directorio,'etiq2' )



thanks and regards,



Fernando.

  1. Helpful
There are no comments made yet.
Fernando Leal Accepted Answer Pending Moderation
  1. Wednesday, 8 April 2020 20:17 PM UTC
  2. PowerBuilder
  3. # 1

The files it generates contain 27 kb and when I run the function outside the system it generates 44kb files.

Comment
  1. Fernando Leal
  2. Wednesday, 8 April 2020 20:52 PM UTC
I found the problem I was using the same image for the 3 conversion processes and the image changes in each one. This was my mistake.



thanks
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 8 April 2020 21:13 PM UTC
I am super glad that you found your file size issue Fernando .. thanks for letting us know! :-)
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.