.; RSX-11M command file to generate PRM library and add PRM modules
.;
.;	Modify the RMSMAC library account 
.;	Install the SLP utility
.;
	.DISABLE LOWERCASE
	.ENABLE SUBSTITUTION
;
;	Generate/Modify the RMS/Pascal interface library
;
	.IFNINS LBR .SETF LBRINS
	.IFINS LBR .SETT LBRINS
	.IFF LBRINS INS $LBR
        .SETF INI
	.SETF PASERR
	.SETT PCLO
	.SETT PCRE
	.SETT PDEL
	.SETT PFRE
	.SETT POPE
	.SETT PRET
	.SETT PSTO
	.ASK LST Pascal listing(s)
	.ASK MAC Macro listing(s)
	.ASK PRM Regenerate all PRM Modules
	.IFT PRM .GOTO GENPRM
	.SETS TEMP "EXIT"
.MODNAM:.ASKS [4:7] MOD Module name or EXIT
	.IF MOD = TEMP .GOTO DONE
	.GOSUB COMPIL
	.GOTO MODNAM
.COMPIL:
	.IFNINS LBR .SETF LBRINS
	.IFINS LBR .SETT LBRINS
	.IFNINS SLP .SETF SLPINS
	.IFINS SLP .SETT SLPINS
	.IFF SLPINS INS $SLP
	SLP @'MOD'.SRC
	.IFF SLPINS REM SLP
	.IFT LST .SETS L ",'MOD'"
	.IFF LST .SETS L ""
	.IFT MAC .SETS SW "/S"
	.IFF MAC .SETS SW ""
	.SETF PASERR
	PAS 'MOD''L'='MOD''SW'
	.IF <EXSTAT> > 1 .SETT PASERR
	.IFT PASERR .GOTO ENDB
	.XQT PIP 'MOD'.PAS;*/DE
	.IFT LST .XQT PRI 'MOD'.LST
	.IFT MAC .SETS L ",'MOD'/-sp"
	.IFF MAC .SETS L ""
	MAC 'MOD''L'=[300,45]RMSMAC/ML,SY:'<UIC>''MOD'
	.WAIT PIP
	PIP 'MOD'.MAC;*/DE
	.IFF LBRINS INS $LBR
	LBR PRMPAS/RP='MOD'
	.IFF LBRINS REM LBR
	PIP 'MOD'.OBJ;*/DE
	.GOTO GOBAC
.ENDB:	.ASK XXX Pascal error, c/r to continue.
.GOBAC:	.RETURN

.GENPRM:
	PIP PRMPAS.OLB;0/DE
	LBR PRMPAS.OLB/CR
	.IFT INI .SETS MOD "RMSINI"
	.IFT INI .GOSUB COMPIL
	.IFT PCLO .SETS MOD "PRMCLO"
	.IFT PCLO .GOSUB COMPIL
	.IFT PDEL .SETS MOD "PRMDEL"
	.IFT PDEL .GOSUB COMPIL
	.IFT PFRE .SETS MOD "PRMFRE"
	.IFT PFRE .GOSUB COMPIL
	.IFT POPE .SETS MOD "PRMOPE"
	.IFT POPE .GOSUB COMPIL
	.IFT PRET .SETS MOD "PRMRET"
	.IFT PRET .GOSUB COMPIL
	.IFT PSTO .SETS MOD "PRMSTO"
	.IFT PSTO .GOSUB COMPIL
.DONE:
	.IFF LBRINS INS $LBR
	.IFF PASERR LBR PRMPAS/FU
	.IFF LBRINS REM LBR
