The sdflev function enables the user to position on an operand array belonging to a structure description (see "Format of the standardized transfer area"). All functions that access data in the standardized transfer area always refer to the current operand array.
When the sdfinit function is called, the system positions on the operand array of the highest level, in other words on the operand array whose operand was defined in the syntax file with the SDF-A statement ADD-OPERAND ...,RESULT-OPERAND-LEVEL=1.
The sdflev function always refers to the current operand array. This can be the operand array of a structure description, if the sdflev function has already been called beforehand.
The structure description can also be an element in a list (the operand type check with sdftyp returns ’list’ as the operand type). In this case, the user must specify both the position of the list in the current operand array and the position of the structure description in the list.If the structure description is not an element in a list, the user needs to specify only the position of the structure description in the operand array.
To return to the operand array of the highest level, enter 0 for the position.
Since the function has an optional parameter, there are 2 different formats.
Format 1:
int sdflev (char *area, int pos);
Format 2:
int sdflevls (char *area, int pos, int lst);
Description of the parameters
char *area | Pointer to the buffer in which the standardized transfer area |
int pos | Position of the structure description in the current operand array |
int lst | Relevant only if the structure description is an element in a list; |
Result
The function returns an integer as its result (see "Description of the C functions").