CSTORE

CSTORE commits the comment record to the database.

Using the API in a Program

Before storing a comment you should have used one of the following routines:

You can control the size of the comment by setting the D<Prefix>@C@EXTXSZ variable. A value of zero in this variable tells the API to trim trailing spaces.

If you will use the CAPPEND API after the CSTORE API, Lawson recommends that you set the size field variable.

Programming Example

This example finds a comment, retrieves the comment text, and stores the text in the database.

Note: The variable names in this example include the three-character database file prefix (<Prefix>). For example, if the program is using the file COMPANY, then the variable D<Prefix>@C@TYPE would be DCOM@C@TYPE.
        CALLP     U@@ATTACHIO('CCFNDBEG': DCOM@@HANDLE: 
                  %ADDR(DCOM@C@@PATH): %ADDR(DCOM@RECORD):  
                  %ADDR(DCOM@C@))  
        EVAL      RG6@DTLCMM = DCOM@C@EXTX              
        CALLP     U@@ATTACHIO('CSTORE': DCOM@@HANDLE:       
                  %ADDR(DCOM@C@@PATH): %ADDR(DCOM@RECORD):  
                  %ADDR(DCOM@C@))