1

I am using CGI DSPSTMF command to display stmf file on web browser. I am copying a spool file to a stmf file using CPYSPLF *STMF option. Once copied i am passing IFS location to DSPSTMF command but it is going to download automatically and when i open the download file i am getting all Junk data any idea why? Also, i noticed it is using CONTTYPES file in CGILIB and on my server it is empty. What should be the values in it and what should i do show correct data instead of junk. I tried to use different methods to copy the file to IFS like used cpytostmf instead of cpysplf but on IFS file looks correct not the download version.

1 Answers1

1

What CCSID is the resulting stream file tagged with? use WRKLNK and option 8=Display attributes

If 65535, that tells the system the data is binary and it won't try to translate the EBCDIC to ASCII.

The correct fix is to properly configure your IBM i so that the stream file is tagged with it's correct CCSID.

Do a WRKSYSVAL QCCSID ... if your system is still set to 65535, that's the start of your problem. But this isn't programming related, you can try posting to Server Fault but you might get better responses on the Midrange mailing list

Charles
  • 21,637
  • 1
  • 20
  • 44
  • I have taken care of CCSID and it is working now.. tough i am getting another error. Once DSPSTMF runs and when i try to reload the HTML, it still holds back the input field values from HTML as well as button values.. – Kathan Pandya Oct 16 '20 at 00:32
  • You should create a new question – Charles Oct 16 '20 at 00:54