Assuming you have the TCP/IP HOSTS Table set up, you can use alias names instead of IP addresses when creating a remote output queue. If you do NOT have the HOSTS Table set up, then a proper IP address would be required.
Remember to start the LPD server on your system or you won't be able to receive spool files from remote systems. They'll just sit there in the "SND" state indefinitely with no apparent errors, except of course that they don't get sent.
To create a simple, straight-forward remote output queue (OUTQ) to another IBM i system, the following command may be used:
CRTOUTQ OUTQ(QGPL/LOCALOUTQ) RMTSYS(MYRMTSYS) RMTPRTQ('QGPL/REALOUTQ') AUTOSTRWTR(1) CNNTYPE(*IP) TRANSFORM(*NO) SEPPAGE(*NO)
The OUTQ parameter contains the name of the local output queue being created.
The RMTSYS parameter contains the IP or HOSTS Table name of the remote system/location.
The RMTPRTQ parameter contains a CL-style qualified name. This is a real output queue that exists on the remote system. It is NOT case-sensitive, however IBM recommends that the qualified outq name should be specified in all uppercase.
AUTSTRWTR(1) indicates that the writer should be started. if the writer is not started, the spooled data will remain on the local system and is not sent to the remote system until a STRRMTWTR command is issued.
The CNNTYPE(*IP) is used when you are using a TCP/IP network vs IBM's SNA networking.
TRANFORM(*NO) means you are sending this to a non-ASCII printer. *NO is normally required for IBM i to IBM i systems. If you forget this parameter, your remote spool files will look interesting.
SEPPAGE(*NO) means don't print a separator page. I think just about every output queue created since 1988 uses *NO for this parameter.