If by “text” file you mean a non-DB2 file, I don’t know how to do that directly.
Any SELECT statement can output to a DB2 file by wrapping it with an INSERT statement. But you have to define the DB2 file. It can then be copied anywhere as a “text” file.
If you want to output any SELECT statement into a fixed length, single long record file (which I do a lot to create free form log files) you will still wrap the SELECT with an INSERT but you will have to CONCAT the fields into the one long string field. You’ll also have to CAST numeric fields to STRING. It’s still a DB2 file but with 1 long field per record. Although a little tedious, it’s easy to do.
Does this help?
Otra forma seria generar el archivo en el servidor y descargar la información via Trasnferencia de Archvios de estar utilizando Client Access.