createMember
Creates a new member.
int createMember(int RAMid, char instanceID[256], char memberID[256], char name[64],
char parentID[256], int* lrecl, char recFM[4], void** params,
void*** customReturn, char error[256]);
Variable | Function | Description |
---|---|---|
int RAMid | Input | Tells CARMA which RAM should be worked on. This
ID was obtained after running getRAMList or getRAMList2 . |
char instanceID[256] | Input | The instance containing the member being created. |
char memberID[256] | Output | The ID of the member that is being created. |
char name[64] | Input/Output | ID of the member being created. |
char parentID[256] | Input | ID of parent container. (If no parent exists, space must be filled.) |
int* lrecl | Output | The number of columns in the data set and array. |
char recFM[4] | Output | Contains the data set'record format (FB, VB, etc.). |
void** params | Input | Pointer to an array of custom parameters (see Handling custom parameters and return values). |
void*** customReturn | Output | Used to reference an array of custom return values (see Handling custom parameters and return values). |
char error[256] | Output | If an error occurs, this should be filled with a description of the error. |
To account for specific RAM naming conventions, a client calls
create by requesting a certain name. The RAM can then provide a unique memberID
, lrecl
, recFM
and
an appropriate displayable name back to the client.
If the client requests the name "bob," for example, the
RAM might return a memberID
of "BOB" as well as
a displayable name of "BOB". If the member "bob" already
exists, it might return "BOB2", or instead return an error
saying it can not create the requested member.
parentID
is the memberID
for the parent of
the member being created. If the member being created does not have
a parent (it is directly under the repository instance), parentID
should
be left blank (all spaces).
A RAM does not have to create a member when createMember is called,
but can just provide the proper memberID
, lrecl
, recFM
,
and displayable name to the client. It is the client's responsibility
to make a call to putMember
with the new memberID
in
order to create a concrete member. RAMs should support adding a member
with no records (even if they have to create a single blank record
for the member).