RE: Text File from Informix Database
Posted in 1999
You can also try modifying your select statement used in your unload statement. =20 example: SELECT field1 || "|" || field2 || "|" || field3 || "|"=20 Of course there are drawbacks. If any of the fields contain a null = value it will return a null expression. To get around that you can update the = null fields with a single space ( " " ) or use a union statement. example: SELECT field1 || "|" || field2 || "|" || field3 FROM some_table WHERE a.first IS NOT NULL UNION SELECT field1 || "|" || " " || "|" || field3 FROM some_table WHERE field2 IS NULL -----Original Message----- From: Alex Daman [mailto:alex_damanakis@EXE.com.au] Sent: Tuesday, April 27, 1999 11:05 PM To: informix-list@iiug.org Subject: Re: Text File from Informix Database Hi Paulo, I find the ACE Report tool very handy for jobs like this. If your = system has it, then it will be part of you isql tools. Its basically a quick report writer that allows you to use SQL and some = 4GL logic to produce a file. Very handy and powerful. Alex Paulo Rogerio wrote in message <7g549i$jis$1@news.xmission.com>... > >S=E3o Paulo - Brazil - April 26 , 1999. > >Dear Friends, > >Can you help me ?????? > >How can I get a text file ( unload or output) from a Informix Database = with >the blank spaces that belong to the end of fields. >My problem is I have a Cobol program that will read this file, so I = need >fixed length fields. > >For Example: > >In a text file created by an Informix Database, the fields appear : > >1234|Adam Smith|single|04/01/1961 >1235|Joan Norton Maguire|married|08/10/1970 > >I need: > >1234|Adam Smith |single |04/01/1961 >1235|Joan Norton Maguire |married |08/10/1970 > >The Informix version is 5.10. The command used is "unload". > >If you have some suggestion I would aprecciate ............. > > >Thank you very much > >Sincerely, > > >Paulo Rog=E9rio >