GPDLEG (label1, label2, option) |
Purpose
Use GPDLEG to delete all elements from the open structure between the two specified labels. There are two methods that you can use to search for the labels: the graPHIGS API method and the ISO PHIGS method. Specify the method using the search and deletion option field.
graPHIGS API method: If the option parameter is 1=START_AT_CURRENT_ELEMENT_NEITHER_DELETED, 2=START_AT_CURRENT_ELEMENT_BOTH_DELETED, 3=START_AT_CURRENT_ELEMENT_FIRST_DELETED, 4=START_AT_CURRENT_ELEMENT_SECOND_DELETED , then starting from the current position of the element pointer, the graPHIGS API searches for label identifier 1. The system then searches for label identifier 2, starting from the position of the label now found.
ISO PHIGS method: If the option parameter is 5=START_AT_NEXT_ELEMENT_NEITHER_DELETED, 6=START_AT_NEXT_ELEMENT_BOTH_DELETED, 7=START_AT_NEXT_ELEMENT_FIRST_DELETED, 8=START_AT_NEXT_ELEMENT_SECOND_DELETED , then starting from the element immediately after the current position of the element pointer, the graPHIGS API searches for label identifier 1. The system then searches for label identifier 2, starting from the label element immediately after the label now found.
Regardless of the method used to find the labels, if the system reaches the end of the structure before both labels are found, the graPHIGS API issues an error and the current element pointer remains at the original position before this subroutine was called.
For the deletion process, the application can control whether or not the specified label elements are also deleted. When the option parameter is 1=START_AT_CURRENT_ELEMENT_NEITHER_DELETED (when using the graPHIGS API method) or 5=START_AT_NEXT_ELEMENT_NEITHER_DELETED (when using the ISO PHIGS method) neither of the two labels are deleted.
When the option parameter is 2=START_AT_CURRENT_ELEMENT_BOTH_DELETED (graPHIGS API) or 6=START_AT_NEXT_ELEMENT_BOTH_DELETED (ISO PHIGS) then both of the labels are deleted.
When option is 3=START_AT_CURRENT_ELEMENT_FIRST_DELETED (graPHIGS API) or 7=START_AT_NEXT_ELEMENT_FIRST_DELETED (ISO PHIGS), only the first label is deleted.
When option 4=START_AT_CURRENT_ELEMENT_SECOND_DELETED (graPHIGS API) or 8=START_AT_NEXT_ELEMENT_SECOND_DELETED (ISO PHIGS), only the second label is deleted.
After deletion, the element pointer is positioned at the element immediately preceding the deleted elements.
Parameters
Error Codes
Related Subroutines
RCP code
201338371 (X'0C002E03')