skip to main content

Library Routines : REG_SET_VALUE_EX, DISPLAY_REG_SET_VALUE_EX

REG_SET_VALUE_EX, DISPLAY_REG_SET_VALUE_EX
The REG_SET_VALUE_EX library routine sets the data and type of a specified value under a registry key.
To perform this action on the Windows client machine in an Application Server architecture, use DISPLAY_REG_SET_VALUE_EX instead of REG_SET_VALUE_EX.
Syntax:
 CALL "REG_SET_VALUE_EX" USING openKey
Parameters:
This handle is returned by the REG_CREATE_KEY, REG_CREATE_KEY_EX, REG_OPEN_KEY or REG_OPEN_KEY_EX library routine, or it can be one of the following predefined keys, defined in isreg.def:
Return code:
returnCode can be any signed numeric data item and provides additional information:
Operation failed. Click here for a list of error codes.
Examples:
Example - Set a registry value
working-storage section.
01 subkey-handle    usage unsigned-long.
77 status-code      pic 9(3).
01 data-type        usage unsigned-long.
01 data-size        usage unsigned-long.
01 value-name       pic x(40).
01 value-data       pic x(40).
procedure division.
   move reg_sz to data-type
   move "new-iscobol-value" to value-data
   inspect value-data replacing trailing spaces by low-value
   move 1 to data-size
   inspect value-data tallying data-size 
           for characters before initial x"00"  
   call "reg_set_value_ex" using subkey-handle  
        giving status-code.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left