LINK
 Link the current master and detail records.

Format
 Link using LINK-NAME [/Qualifiers ... ]
 LINK-NAMEName tag for this link file. This is the name specified in OPENLINK.
 NOTE
 The OPENLINK, GETLINK, LINK and DELINK statements are available to support UserBase format data files. If you are using RMS data files, you should not need to use these statements. Use the RMS key structure instead.

Qualifiers
/Fail=LABELLabel to which to branch if the statement fails.
If LABEL is %EXIT, exit the routine or loop.
If in a loop, and LABEL is %CONTINUE, continue the loop. If not in a loop, and LABEL is %CONTINUE, an error message displays.
 /Succeed=LABELLabel to which to branch if the statement succeeds.
If LABEL is %EXIT, exit the routine or loop. If in a loop, and LABEL is %CONTINUE, continue the loop. If not in a loop, and LABEL is %CONTINUE, an error message displays.
 /NofailDo not signal an error. Instead, set the
internal variable %FAIL.

Example
 Openlink EMPLOYEES(LINK) &
 for HOURS as HOURSLINK /Write
 ! Open the Link file with
 ! write access.
 Gosub PROCESSING
 Getlink lrec using HOURSLINK
 Perform DISPLAY
 ! Get the link specified
 ! and display the HOURS record
 Menu ACTION
 ! Ask what to do with it
 If %ITEM = "DELETE" then
 Delink using HOURSLINK
 ! "Unlink" it if required.
 End_if
 If %ITEM = "DUPLICATE" then
 Link using HOURSLINK
 ! Link it again if required
 ! (one HOURS record, two links)
 End_if