Re: REPORT TO PIPE problem???
Posted in 1996
} } I'm doing a START REPORT TO ch_pipe, where ch_pipe is a CHAR(200). } Informix is chopping off the pipe after 100 characters. } } The ch_pipe variable actually holds a mailx mail-pipe command with a } subject followed by a list of users I'm mailing to. After the 100th } character, the line is chopped right in the middle of a user-id and } I'm getting invalid user, returned mail, etc. } } I'm experiencing this with 4.11 and 6.04. } } I tracked it down to a 100 character 4GL limitation which is undocumented } in the manuals. I traced through the C code that c4gl generates and found } that they call a openoutput() routine to start a pipe or open an output } file. This is in the fglrepgo.o file in the lib4gl.a library. } } I disassembled the file and found that the first thing it does is pop } 100 characters off the 4GL stack. So here's my problem. } } Might not be a "bug", but it's a limit to be aware of. Probably should be } documented... } } I suppose my workaround is to output the report to a file, then do a RUN } command to mail it. Anyone know of limitations with the length of RUN } commands before I start? } __________________________________________________________________________ } Joel Schumacher JCPenney Co. - UNIX Network Systems } jschumac@uns-dv1.jcpenney.com 12700 Park Central Pl } (214) 591-7543 Dallas TX 75251 } Joel, Another approach might be to run your 4gl report from within a shell script, and then let that same script file take care of the mailing. The advantages of this approach are: The script file can control the output of your report. - You can save previous copies of the report output. - You can delete previous copies of the report output. - You can save a copy of the current report output file. - You can delete the current report output file after mailing. - You can run the report from a cron. - You can run the report from the command line - You can mail the report output to a list of addresses. - You could have the script file generate the mail list at run time, either using UNIX commands (sed,awk,grep,etc...) or database query. Note: If you plan on running from cron, you must make sure that the script file sets and exports ALL the environment variables needed by the 4gl report (INFORMIXDIR, DBPATH, DBDATE, SQLEXEC, etc...) before it tries to run the report. -- Regards, Walter S. Tyszka (wstyszka@ingr.com) * Standard disclaimers apply *