Update URL Records

When used in conjunction with 900-FIND-BEGRNG-URL-<FileName> and 900-FIND-NXTRNG-URL-<FileName> , the 900-STORE-URL-<FileName> API is used to update an existing URL record. First, find the URL, then set the new values, and then perform 900-STORE-URL-<FileName> .

When URL<Prefix>-DATE-USER = 1, the program can change the URL<Prefix>-CREATE-DATE , URL<Prefix>-CREATE-TIME , URL<Prefix>-MODIFY-DATE , and/or URL<Prefix>-MODIFY-TIME fields and the program supplied values will be written to the database. If URL<Prefix>-DATE-USER is not 1, then the URL<Prefix>-MODIFY-DATE and URL<Prefix>-MODIFY-TIME fields will be set to the current system date and time before the record is written to the database.

Programming Example

This code changes the value of the URL<Prefix>-TYPE field of the URL attachments associated with COMPANY 1000 from "H" to "P".

MOVE 1000 TO DB-COMPANY.

PERFORM 910-AUDIT-BEGIN.

PERFORM 840-FIND-COMSET1.

IF (COMPANY-FOUND)
    MOVE 0    TO URLCOM-URL-ORDER
    MOVE "H"  TO URLCOM-TYPE

    PERFORM 900-FIND-BEGRNG-URL-COMPANY

    PERFORM UNTIL (URLCOM-NOTFOUND)
        MOVE "P" TO URLCOM-TYPE
        PERFORM 900-STORE-URL-COMPANY
        ... note that the value of URLCOM-TYPE changed, so we need to reset it ...
        MOVE "H" TO URLCOM-TYPE
        PERFORM 900-FIND-NXTRNG-URL-COMPANY
        END-PERFORM
    END-PERFORM
END-IF.

PERFORM 920-AUDIT-END.