Apache - help with carriage controls to SYS$OUTPUT (159 Views)
Reply
JRY
Occasional Visitor
JRY
Posts: 4
Registered: ‎04-01-2010
Message 1 of 6 (159 Views)
Accepted Solution

Apache - help with carriage controls to SYS$OUTPUT

I'm getting embedded carriage controls on my binary file during multitple (max 32k) writes to SYS$OUTPUT. I'm working in C and the function apache$$setsockopt() is supposed to resolve this issue. I was previously using Apache$fixbg.

Anyone have any examples to share to do this in my C code? and any ideas on how to link to this function? I also tried apache$set_ccl by calling it from my code via a logical but not working.

Thank you

Honored Contributor
Craig A Berry
Posts: 495
Registered: ‎05-06-2003
Message 2 of 6 (159 Views)

Re: Apache - help with carriage controls to SYS$OUTPUT

Don't have an example, but the release notes here:

<>

tell you what image to link against, how to call the function, and what privileges or rights identifiers you need.

A snippet of your code showing what you're passing to apache$$setsockopt and what you're doing to verify that the call was successful (or not) might help folks diagnose why it's not working for you.
JRY
Occasional Visitor
JRY
Posts: 4
Registered: ‎04-01-2010
Message 3 of 6 (159 Views)

Re: Apache - help with carriage controls to SYS$OUTPUT

Yes, I've referenced that documentation and I see the function prototype but I'm still unclear exactly how to link in my makefile my obj from my c program to the Apache executable APACHE_APR_SHRP.EXE that contains the function APACHE$$SETSOCKOPT.
Honored Contributor
Hoff
Posts: 4,948
Registered: ‎01-29-2006
Message 4 of 6 (159 Views)

Re: Apache - help with carriage controls to SYS$OUTPUT

Do you have a source code reproducer or diagnostics or such?

Tried that reproducer with Mac OS X or Mac OS X Server and with another (newer, different) Apache server?

As for linking with Apache (and if I'm interpreting the "not working" phrase correctly), create a linker options file (called, say, YourOptionsFileName.OPT) with the following lines of text:

APACHE$APR_SHR/SHARE
APACHE$APR_SHRP/SHARE

and add a YourOptionsFileName/OPTION parameter onto the LINK command, and you're probably good to go.
JRY
Occasional Visitor
JRY
Posts: 4
Registered: ‎04-01-2010
Message 5 of 6 (159 Views)

Re: Apache - help with carriage controls to SYS$OUTPUT

I think that did the trick and got me on the road to figure out the rest. My output is no longer corrupted.

Thank you for your assistance!
JRY
Occasional Visitor
JRY
Posts: 4
Registered: ‎04-01-2010
Message 6 of 6 (159 Views)

Re: Apache - help with carriage controls to SYS$OUTPUT

Closing Thread
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.