	cbl-semget section.
	    call "semget" using by value semkey numsems createarg
	    move return-code to cbl-semid.

	cbl-memget section.
	    call "shmget" using by value semkey bytecount createarg
	    move return-code to cbl-shmid

	    call "shmat" using	by value cbl-shmid
				by value zeroarg
				by value zeroarg

	    move return-code to retcode
	    set address of sharedaddress to address of retcode
            set address of sharedarea to sharedaddress.

	cbl-aquire-sem section.
	retry-op.
	    move h"ffff" to cbl-semop
	    call "semop" using	by value cbl-semid
				by reference cbl-semop-struct
			        by value onearg
	    if return-code = -1 and errno = eintr
		go to retry-op.

	cbl-release-sem section.
	        move h"0001" to cbl-semop
	        call "semop" using by value cbl-semid
			           by reference cbl-semop-struct
			           by value onearg

		if return-code = -1 
			display "Error in releasing semaphore".
