900-COPY-URL and 900-COPY-RNG-URL
The 900-COPY-URL-<FileName> API copies a URL from one base file record to a different base file record. The 900-COPY-RNG-URL-<FileName> API copies all of the URLs from one base file record to a different base file record. For both APIs, the target base file record must be in the same file as the source base file record. If you want to copy URL records from a record in one file to a record in a different file, use 900-CREATE-URL-<FileName> and 900-STORE-URL-<FileName> to create the URL records in the new file.
The base record that is current when 900-FIND-BEGRNG-URL-<FileName> is called is used as the source or "from" base record until either all of the URLs have been retrieved (for example, URLCOM-NOTFOUND DCOM@NOTFOUND is true) or 900-FIND-BEGRNG-URL-<FileName> is called again.
The base record that is current when 900-COPY-URL-<FileName> or 900-COPY-RNG-URL-<FileName> is called is used as the target or "to" base record.
When URL<Prefix>-DATE-USER
= 1, the URL<Prefix>-CREATE-DATE
, URL<Prefix>-CREATE-TIME
, URL<Prefix>-MODIFY-DATE
, and/or URL<Prefix>-MODIFY-TIME
fields in the new URL records will use the values from those fields in the URLs being copied. If URL<Prefix>-DATE-USER
is not 1, then those fields will be set to the current system date or time as appropriate.
Programming Example
This code uses 900-COPY-RNG-URL to copy the URLs associated with COMPANY 1000 to COMPANY 2000. In this example, the new URL records will use the system date and time.
|
This code uses 900-COPY-URL to copy the URLs associated with COMPANY 1000 that were created in 2012 to COMPANY 2000. Because we only copying some of the URLs, we must use 900-COPY-URL to copy the individual URLs.
|