Skip to main content

Does anyone know a simple way to get the ip address of the server in myprog.acu when it's run via acuthin.exe. I know it's on the command line (acuthin.exe SERVER-IP myprog) so there must be some environment variable or some internal function call I can use to get it.  I want to use it make another C$RUN acuthin.exe call to another thin client alias.

Does anyone know a simple way to get the ip address of the server in myprog.acu when it's run via acuthin.exe. I know it's on the command line (acuthin.exe SERVER-IP myprog) so there must be some environment variable or some internal function call I can use to get it.  I want to use it make another C$RUN acuthin.exe call to another thin client alias.

Use the C$SOCKET routine with the AGS-GETHOSTADDR opcode:

01  server-address    pic x(15).
copy "socket.def"

call "C$SOCKET" using AGS-GETHOSTADDR, server-address

#ipaddress
#CSOCKET

Does anyone know a simple way to get the ip address of the server in myprog.acu when it's run via acuthin.exe. I know it's on the command line (acuthin.exe SERVER-IP myprog) so there must be some environment variable or some internal function call I can use to get it.  I want to use it make another C$RUN acuthin.exe call to another thin client alias.

Thanks chuck, I don't know why I didn't think of that myself :-)