crput - Add/Modify a Change Request
This API call adds a new change request to the VC/m database or modifies details of an existing change request. All the fields are validated. The update is not performed if any validation errors are detected. All auditable changes (e.g. addition /removal of objects from a change request) are logged in the VC/m audit trail.
If user-defined callouts are set up, these will be called as appropriate. The following calls are invoked during validation:
and the following call is invoked after the update is complete:
Usage:
| set ok=$$crput^%vcapi(userid,.chref,chtype,chname,chouser,chodate,chstatus,.chdesc,.obvs,.chcomm,.err,[msg]) | 
Inputs:
userid | 
                           VC/m user ID (derived from host operating system if null) | 
chref | 
                           Change request code (or null for auto number allocation) | 
chtype | 
                           Change request type. Must exist in change request type file | 
chname | 
                           Change request name | 
chouser | 
                           Owner User ID (defaults to User ID) | 
chodate | 
                           Planned completion date (ccyymmdd format) | 
chstatus | 
                           Change request status (must be valid for change request type) | 
chdesc(1..n) | 
                           Change request description lines | 
obvs | 
                           If obvs not null, key to work file ^%vcsel(obvs,obv) containing list of objects attached to change request
                            | 
                        
obvs(obv) | 
                           If obvs is null, array of objects (object/variant.version) attached to change request | 
chcomm(1..n) | 
                           Change request comment lines | 
msg | 
                           0 = Do not display audit trail messages on screen (default)
                              			   1 = Display audit trail messages  | 
                        
Outputs:
$$cradd | 
                           1 = Operation succeeded
                              			   0 = Operation failed  | 
                        
err | 
                           Error message if operation failed | 
chref | 
                           Allocated change request code if auto-allocation | 
Error messages:
vc1001 - Invalid change request type
                            | 
                           Null change request type is not permitted | 
vc1002 - Invalid change request type
                            | 
                           Change request type is not on file | 
vc1003 - Invalid change request type
                            | 
                           Change request type is flagged as deleted | 
vc1004 - Invalid Owner user id
                            | 
                           The owner user ID is not a valid VC/m user | 
vc1005 - Invalid Owner user id
                            | 
                           The user ID is flagged as deleted | 
vc1006 - Invalid change request status
                            | 
                           The change request status does not exist for the specified change request type | 
vc1007 - Invalid change request number
                            | 
                           A change request code must be from 1 to 10 alphanumeric characters | 
vc1008 - Change request name is mandatory
                            | 
                           |
vc1009 - Invalid planned completion date
                            | 
                           |
vc1010 - Invalid Object xxx/xxx.nnn
                            | 
                           Object name error | 
vc1011 - Invalid Object xxx/xxx.nnn
                            | 
                           Variant name error | 
vc1012 - Invalid Object xxx/xxx.nnn
                            | 
                           Version name error | 
vc1013 - Object xxx/xxx.nnn does not exist
                            | 
                           |
vc1014 - Cannot auto-allocate change request of this type
                            | 
                           Change request type does not allow auto-allocation of change request code. The change request code was specified as null or the change request type table may be locked | 
vc1015 - Change request is locked
                            | 
                           Another user or process is currently updating the same change request |