The third row defines a section type, which defines a LINK section type, and the type id is MATID. However, LINK180 does not have keyopt(3), it only has keyopt(2) and keyopt(12) according to Ansys documentation I linked below.
It is used to change some element related properties. The second row is to change the key option of the link element. What it does is to change your beam element type to 'LINK180'. The first row of command means defines an element type (ET). If you insert a command snippet to a part in Mechanical, in the comments of that snippet, you can see that MATID is the 'material number used for this body'.
Hopefully, this response is not too late.