Languages and Scripting
Showing results for 
Search instead for 
Do you mean 

Apache - help with carriage controls to SYS$OUTPUT

SOLVED
Go to Solution
JRY
Occasional Visitor

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

1 ACCEPTED SOLUTIONS
Honored Contributor Honored Contributor

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.
5 REPLIES
Honored Contributor Honored Contributor

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

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

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

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!
Highlighted
JRY
Occasional Visitor

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

Closing Thread