|
Hello Peter, Investigation shows that different DSM sessions are used for displaying the output from *USER state programs and *SYSTEM state programs. QZHBCGI (or QTMHCGI if you are still using that but you shouldn't be because IBM have been telling you not to use it since VRM430) is a *SYSTEM state service program. SHWSTDOUTC is by default a *USER state program. Therefore SHWSTDOUTC displays the user domain output which is why it does not display the output from QtmhWrStdout. The solution is to patch SHWSTDOUTC and make it *SYSTEM state then it will display the output you need. Check the MI400-L archives, buy Leif's book, or STFW for information on how to do this. This situation means you need two versions of the SHWSTDOUTC program in order to display normal STDOUT and QtmhWrStdout STDOUT. I am looking for the locations of these two separate spaces. If I find anything I'll probably post the information to the MI list. The reason the first character of each line disappears is because you are appending an ASCII CRLF (x'0d0a') after each line. Notice that the first line (containing the Content-Type tag) prints correctly? EBCIDIC x'0a' is an odd character that could be many things depending on the device and the version of the EBCDIC table. You should be appending an EBCDIC CRLF (x'0d25') to each line and if sending the output to a browser then convert the whole line. The required changes to your Wrt() function are: Change the CRLF constant: d CRLF s 2a inz(x'0D25') Move the following two lines: c eval %subst(Data:DataLen+1:2) = CRLF c add 2 DataLen after this line: c eval %subst(Data:1:DataLen) = WrtData Now the data is written to the screen correctly. Using a system state version of SHWSTDOUTC will prove that. Regards, Simon Coulter. -------------------------------------------------------------------- FlyByNight Software AS/400 Technical Specialists http://www.flybynight.com.au/ Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 /"\ Fax: +61 3 9419 0175 mailto: shc@flybynight.com.au \ / X ASCII Ribbon campaign against HTML E-Mail / \ --------------------------------------------------------------------
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.