Holaaa:
Estoy renegando con la Epson TM-T900FA, ya pude hacer un X y un Z. Pero ahora quiero recuperar desde la impresora el puesto de venta y no logro hacerlo. Mando un comando OBTENER ID que en el campo 5 tiene el puesto de venta y no logro nada.
Código COBOL:
WORKING-STORAGE SECTION.
01 LINEA-OBTENER-ID pic xx value X"0005".
01 LINEA-EXTRA pic xx value X"0000".
01 xsucursal pic x(500).
01 redefines xsucursal.
02 wsucursal pic 99999.
02 pic x(495).
01 variables-nuevas.
02 BufferLen pic s9(9) comp-5.
02 campo pic s9(9) comp-5.
PROCEDURE DIVISION.
*...... Obtener el punto de venta ..................................
move "OpenPort" to Epson
call Epson with stdcall using by reference version.
move "Purge" to Epson
call Epson with stdcall using by reference version.
move 2 to BufferLen
move "AddDataField" to Epson
call Epson with stdcall using by reference LINEA-OBTENER-ID
by value BufferLen
move 2 to BufferLen
move "AddDataField" to Epson
call Epson with stdcall using by reference LINEA-EXTRA
by value BufferLen.
move "SendCommand" to Epson
call Epson with stdcall using by reference version.
move "GetExtraField" to Epson
move 5 to campo
move 5 to BufferLen
call Epson with stdcall using by value campo
by reference xsucursal
by value BufferLen.
move wsucursal to suc-default.
invoke pow-self "DisplayMessage" using xsucursal.
move "ClosePort" to Epson
call Epson with stdcall using by reference version.
*...... /Obtener el punto de venta ..................................
Si alguien tiene una idea, bienvenida sea.
Saludos.
Fito...