	PROGRAM PSECT
C
C
C	INPUT : PSECT.LIS FROM SEARCH OF LINK MAP
C	OUTPUT: PSECT.LIS READY TO APPEND TO OPTION FILE FOR SHAREABLE
C		LIBRARY IMAGE LINKING (ASSUMING THAT ONE WISHES THE
C		TREATMENT OF COMMON BLOCKS TO BE COPY-ON-REFERENCE)
C
C
	CHARACTER LINE*135, WORD*30
	OPEN(7,FILE='PSECT.LIS',FORM='FORMATTED',CARRIAGECONTROL='LIST',
	1	STATUS='OLD')
	OPEN(8,FILE='PSECT.LIS',FORM='FORMATTED',CARRIAGECONTROL='LIST',
	2	STATUS='NEW')
C
 10	READ(7,1001,END=999) LINE
	CALL SUBSTG(LINE,' ',' ',WORD)
	N=NBLEN(WORD)
	WRITE(8,1002) WORD(1:N)
	GO TO 10
C
 999	CLOSE(7)
	CLOSE(8)
	STOP
 1001	FORMAT(A)
 1002   FORMAT( 'PSECT_ATTR=',A,', GBL, NOSHR, NOEXE,  RD,  WRT')
	END
