Page 1 of 1

Error Writing to IFS from Universal Display

Posted: Fri Jul 26, 2019 11:06 am
by dougmatthews47
Hello,

I have a Universal Display file that writes to the screen just fine when called from js using window.open().
However, when I want to write it to the IFS I get an error that I cant trace down.
Apache returns an Internal Server Error.

The log shows the following...(I X'ed out the IP)

[Fri Jul 26 08:44:54.555992 2019] [core:error] [pid 9932:tid 000023FA] [client xxx.xxx.xxx.xxx:59688] ZSRV_MSG0947: End of script output before headers: File name is PUI0006000.PGM, referer: http://iBM:8080/profoundui/auth/genie?skin=TMWBetaTest3

When I call the Universal display file from a command line. It writes to the IFS just fine.
I am thinking it is a security issue, but cant trace it down.

Any help or areas to look at would greatly be appreciated.

Re: Error Writing to IFS from Universal Display

Posted: Fri Jul 26, 2019 12:09 pm
by Scott Klement
Usually this means that you never write a display for some reason.

I would suggest:

1) Look at the job log, check for errors, make sure the program is actually being called.

2) Use the debugger (RDi, STRDBG, etc) to trace through the program, see why it isn't writing the display.

Re: Error Writing to IFS from Universal Display

Posted: Fri Jul 26, 2019 12:19 pm
by dougmatthews47
Thanks for the reply however,

I am now able to write to the IFS... It was a security issue on the folder I was writing to.

Apache is still returning an internal Server Error. Any Ideas on why?
What is PUI0006000.PGM doing?

ZSRV_MSG0947: End of script output before headers: File name is PUI0006000.PGM,

Is there an option, setting, exit program config I am missing somewhere?

Thanks

Re: Error Writing to IFS from Universal Display

Posted: Fri Jul 26, 2019 12:35 pm
by Scott Klement
The error is that you're not writing anything for the HTTP server to return.

If your output is going to the IFS, that makes perfect sense... it's going to the IFS and not to the HTTP server.

Can you explain what your goal is for this program? Is it to work like a web service where data is written out via HTTP? Or is it to create a file in the IFS? Perhaps if I understood better, I could provide better answers.

Re: Error Writing to IFS from Universal Display

Posted: Mon Jul 29, 2019 9:52 am
by dougmatthews47
One program I am writing to the IFS and in another program I am writing out to the HTTP server.

How do I send the data to the Universal Display file without the HTTP server sending back an error
when I have the Destination going to the IFS?

Do I just call the rpg program from a command line using parms instead of a http call to the apache server?

Right now I am using a window.open(url); from a Genie screen.

Thanks

Re: Error Writing to IFS from Universal Display

Posted: Mon Jul 29, 2019 10:54 am
by Scott Klement
If it doesn't return data for HTTP, you don't want to call it as a web service. So, yes... just call it the "normal" way you'd call an RPG program, e.g. from the command line. (or via the CALL command from CL, a prototype from RPG, etc... its just a regular program.)