Hola,

He encontrado la solución al problema. La remito por si nunca alguien se 
encuentra con la misma situación.

Al final lo que he hecho ha sido crear un archivo con la misma definición 
de campos que el fichero original, el nombre y longitud y orden de los 
campos tiene que ser el mismo pero con el tipo de campo alfanumérico. 
Luego le hago un CPYF del fichero original al destino con las opciones 
*MAP y *DROP en el parámetro FMTOPT y el mismo comando me hacer la 
conversión :-)

Saludos y gracias de todos modos,



Sergi Sitjes
Director Sistemes d'Informació/IT Manager
GENEBRE GROUP
E-mail: [email protected]
Web:   http://www.genebre.es
Tel:  +34 93 298 80 02
Fax: +34 93 298 80 07



De:     Sergi Sitjes/GENEBRE
Para:   "forum.help400" <[email protected]>
Fecha:  29/09/2010 10:07
Asunto: Re: QRY vs. DBCS


Lorenzo, no parece que sea ese el problema, el trabajo ya se ejecuta con 
el CCSID 284 :-( El problema no es el típico de conversión de carácteres 
especiales tipo acentos, eñes y cosas así. El problema es que el campo es 
de doble byte y por eso no se pasa correctamente al PC, de hecho si hago 
un DSPPFM ya veo los carácteres extraños. Adjunto el ejemplo:
DSPPFM desde sesión 5250 (adjunto imagen, no sé si llegará al foro, pero 
es que al hacer copiar/pegar me cambia el contenido):


Contenido del fichero txt ya pasado al servidor Windows:
010; ‘  ‘; ‘ –   ‘ € € € € € € € € € €; ‘     ™  € € 
€;054001;20101109; “ •;20
010; ‘  ‘; ‘ –    € € € € € € € € € €; ‘     ™  € € 
€;050001;20101109; “ •;20
010; ‘  ‘; ‘ –   “ € € € € € € € € € €; ‘     ™  € € 
€;048001;20101109; “ •;20

Creo que la única opción es convertir los datos de DBCS a alfanumérico 
pero no sé si el QRY/400 tiene alguna función para hacer eso.

Gracias de nuevo,



Sergi Sitjes
Director Sistemes d'Informació/IT Manager
GENEBRE GROUP
E-mail: [email protected]
Web:   http://www.genebre.es
Tel:  +34 93 298 80 02
Fax: +34 93 298 80 07




De:     Lorenzo Martinez <[email protected]>
Para:   "forum.help400" <[email protected]>
Fecha:  28/09/2010 18:04
Asunto: Re: QRY vs. DBCS
Enviado por:    [email protected]



Hola, Sergi.

No se si será el caso, pero prueba a ver si tienes el CCSID de tu trabajo 
establecido en 65535 (sin conversión) con DSPJOB / Atributos de definición 
del trabajo/ última pantalla, y en dicho caso, antes de ejecutar el QRY 
cambiátelo a algún valor "significativo", p.ej. 284 (CHGJOB CCSID(284)). A 
mí me ha solucionado algún problemilla de acceso desde un sistema "normal" 
a otro Unicode via SQL remoto. Cuando termines el QRY y el FTP vuelve a 
dejar el CCSID como estaba.

Un saludo.



El 28/09/2010 17:01, [email protected] escribió: 
Hola, 

Tengo un problema que no soy capaz de solucionar. Estoy haciendo una QRY 
que me genera un fichero que luego tengo que enviar por ftp a un servidor 
Windows. El problema es que el fichero sobre el que hago la consulta tiene 
campos de tipo DBCS y cuando los paso por ftp me los convierte a símbolos 
"extraños". He probado de definir campos que hacen un SBSTR sobre el campo 
de tipo DBCS a ver si así me los convertía a alfanuméricos "normales" pero 
no ha funcionado. Alguna idea? 

Gracias, 



Sergi Sitjes
Director Sistemes d'Informació/IT Manager
GENEBRE GROUP
E-mail: [email protected]
Web:   http://www.genebre.es
Tel:  +34 93 298 80 02
Fax: +34 93 298 80 07


La información que contiene este correo electrónico es confidencial y 
compete exclusivamente al destinatario. Si Vd. ha recibido esta 
comunicación por error, por favor, notifíquelo inmediatamente al remitente 
y borre el mensaje junto con sus ficheros anexos sin leerlo, copiarlo, 
grabarlo, distribuirlo o divulgarlo o hacer cualquier otro uso de la 
información sin el consentimiento de Genebre S.A. El correo electrónico 
vía Internet no permite asegurar la confidencialidad o correcta recepción 
de los mensajes, por lo que Genebre no asume responsabilidad alguna por 
los daños causados.

The information contained in this communication is confidential, may be 
privileged and is intended for the exclusive use of the above named 
addressee. If you receive this communication in error, please notify the 
sender immediately and delete it, and all its attached documents. If you 
are not the intended recipient, you are expressly prohibited from reading, 
copying, distributing, disseminating or, in any other way, using any of 
the information without the Genebre S.A. consent. Please note that 
Internet e-mail guarantees neither the confidentiality nor the proper 
receipt of the message sent, so that Genebre shall not be liable for any 
damages caused. 


____________________________________________________
Únete a Recursos AS400, nuestra Comunidad ( http://bit.ly/db68dd )
Forum.Help400 © Publicaciones Help400, S.L.
____________________________________________________
Únete a Recursos AS400, nuestra Comunidad ( http://bit.ly/db68dd )
Forum.Help400 © Publicaciones Help400, S.L.



La información que contiene este correo electrónico es confidencial y 
compete exclusivamente al destinatario. Si Vd. ha recibido esta 
comunicación por error, por favor, notifíquelo inmediatamente al remitente 
y borre el mensaje junto con sus ficheros anexos sin leerlo, copiarlo, 
grabarlo, distribuirlo o divulgarlo o hacer cualquier otro uso de la 
información sin el consentimiento de Genebre S.A. El correo electrónico 
vía Internet no permite asegurar la confidencialidad o correcta recepción 
de los mensajes, por lo que Genebre no asume responsabilidad alguna por 
los daños causados.

The information contained in this communication is confidential, may be 
privileged and is intended for the exclusive use of the above named 
addressee. If you receive this communication in error, please notify the 
sender immediately and delete it, and all its attached documents. If you 
are not the intended recipient, you are expressly prohibited from reading, 
copying, distributing, disseminating or, in any other way, using any of 
the information without the Genebre S.A. consent. Please note that 
Internet e-mail guarantees neither the confidentiality nor the proper 
receipt of the message sent, so that Genebre shall not be liable for any 
damages caused.


La información que contiene este correo electrónico es confidencial y 
compete exclusivamente al destinatario. Si Vd. ha recibido esta 
comunicación por error, por favor, notifíquelo inmediatamente al remitente 
y borre el mensaje junto con sus ficheros anexos sin leerlo, copiarlo, 
grabarlo, distribuirlo o divulgarlo o hacer cualquier otro uso de la 
información sin el consentimiento de Genebre S.A. El correo electrónico 
vía Internet no permite asegurar la confidencialidad o correcta recepción 
de los mensajes, por lo que Genebre no asume responsabilidad alguna por 
los daños causados.

The information contained in this communication is confidential, may be 
privileged and is intended for the exclusive use of the above named 
addressee. If you receive this communication in error, please notify the 
sender immediately and delete it, and all its attached documents. If you 
are not the intended recipient, you are expressly prohibited from reading, 
copying, distributing, disseminating or, in any other way, using any of 
the information without the Genebre S.A. consent. Please note that 
Internet e-mail guarantees neither the confidentiality nor the proper 
receipt of the message sent, so that Genebre shall not be liable for any 
damages caused.

<<image/gif>>

<<image/gif>>

<<image/gif>>

<<image/gif>>

____________________________________________________
Únete a Recursos AS400, nuestra Comunidad ( http://bit.ly/db68dd )
Forum.Help400 © Publicaciones Help400, S.L.

Responder a