COPY TEXT
FUNCTION
This command copies text field records from one data file to another.
SYNTAX
COPY TEXT FROM link-name-1 USING key-file-access-1 TEXT text-id-1 TO link-name-2 USING key-file-access-2 TEXT text-id-2 [MISSING KEY PROCESS IS procedure] [BUSY PROCESS IS procedure] [RETRY IS retry-code-string] [ERROR PROCESS IS procedure] [DUPLICATE KEY PROCESS IS procedure]
key-file-access:
KEY [SORT numeric-value] IS record-access | record-range
retry-code-string
C Continue with next command I Ignore. N Do END PROCESS, continue with next command S Skip busy record Y Use standard busy processing- link-name
- the link where the data file is specified.
- key-file-access
- the method used to access the key file.
- text-id
- a string data name, variable, constant, or expression that specifies a one-character text ID.
- procedure
- the name of a procedure to perform.
- retry-code-string
- specifies the action to take if the command needs to be retried.
NOTES
- The link-name-1 parameter specifies the source link and the link-name-2 parameter specifies the destination link. The key-file-access-1 parameter specifies how text records from the source file are treated and the key-file-access-2 parameter specifies how they are treated when placed in the destination file. The text-id-1 parameter specifies which text is selected and the text-id-2 parameter specifies how it will be named in the destination file.
- The text-id-1 parameter can be specified as ALL. In this case, all text for the specified key to be copied to text-id-2 is selected.
- ERROR PROCESS and BUSY PROCESS apply to link-name-1 and link-name-2.
- MISSING KEY PROCESS applies to link-name-1, the source link.
- DUPLICATE PROCESS applies to link-name-2, the destination link. If no DUPLICATE PROCESS procedure is specified and the text key exists in the destination link, the text will be deleted before the copy begins.
- To copy text within the same link, the destination link must be opened by the LINK ALIAS command.
- The BUSY PROCESS procedure is executed before the RETRY option is evaluated.
SEE ALSO
Description of the TEXT option of the READ command.
From the Script-IV Language Reference, version 8.9.1. Open this page in the PDF