Previous Topic: IPL CommandNext Topic: SET Command


LINK Command

The CP LINK command lets you link to another user’s disks in various modes. These link access modes are shown below:

R

Primary read-only access. You can establish a read-only link only if no one else is linked to the disk in write mode. Otherwise, no link is established.

RR

Primary read-only access or alternate read-only access. You can only establish a read-only link, no matter what other links users have to the disk.

W

Primary write access. You can establish a write link only if no other user is linked to the disk. Otherwise, no link is established.

WR

Primary write access or alternate read-only access. You can establish a write link only if no other user is linked to the disk. Otherwise, this user is linked as read-only.

M

Primary multiple access. You can establish a write link unless some other user already is linked in write mode. Otherwise, no link is done.

MR

Primary multiple access or alternate read access. You can establish a write link unless some other user already is linked in write mode. If some other user is already linked MR, a read-only link is done.

MW

Primary multiple access or alternate write access. A user is established as a write link in all cases.

We suggest you limit the LINK command since it is not advisable to have more than one user updating a file at the same time.

Through command limiting, you can control who can link to your disk and the type of access mode that is valid for that user. The rule below lets TLCPJM link in primary write access mode or alternate read-only access mode to TLCAMS 191 disk. All other users whose logon ID begins with TLC can link to this disk in read-only or alternate read-only access mode:

$KEY(LINK)
 TLCAMS 191 - W* UID(TLCPJM) ALLOW
 TLCAMS 191 - R* UID(TLC) ALLOW
 DOC - - R* UID(-) ALLOW
 TLCAMS 191 - MW UID(-) PREVENT
 DOC - - MW UID(-) PREVENT

The third rule entry specifies that all users can access any DOC disk in read-only access mode or alternate read-only mode. The last two entries prevent anyone from linking multiple write to the TLCAMS 191 and any DOC disks.

Do not be confused. The LINK command only allows the link. If you have installed CMS protection, you still need to write access rules to allow users to update or read files on your disk.