A program creates a channel by executing the CHANNEL statement. This has the following general form.
channel(in=inport, out=outport)
This both creates a new channel and defines inport and outport to be references to this channel, with inport able to receive messages and outport able to send messages. The two ports must be of the same type. Optional IOSTAT= and ERR= specifiers can be used as in Fortran file input/output statements to detect error conditions. See Appendix A for a list of valid IOSTAT values.