.; P1:filename P2:D=ddt
.ENABLE SUBSTITUTION
.SETT FCSUSE
.SETS GSASUB "LB:[1,1]RMS/LB:GSA3-[1,1]RMS/LB-[1,1]C/LB-[1,1]CX/LB"
.;				CX for VSDA,VRCS,EMST,USTP for RRMST.TSK
.;				not needed for ordinary RMS TSKs
.SETS DEBUG ""
.IF P2 = "D" .SETS DEBUG "-LB:[1,1]DDT/DA"
.OPEN TEMP.ODL
.ENABLE DATA
	.ROOT	'<UIC>''P1'-pfroot-RMSROT
pfroot:	.fctr	'GSASUB''DEBUG'
RMSROT:	.FCTR	LB:[1,1]RMSLIB/LB:R0AUTL:R0IMPA:RMSSYM-RMSEXC
RMSEXC:	.FCTR	LB:[1,1]RMSLIB/LB:R0EXSY
	.END
.DISABLE DATA
.CLOSE
.OPEN TEMPTKB.CMD
.DATA 'P1'/CP,'P1'/CR/MA/-SP,'P1'=TEMP/MP
.DATA LIBR=RMSRES:RO
.IFT FCSUSE .DATA LIBR=FCSRES:RO
.DATA UNITS=12
.DATA ASG=TI:5:6
.sets tsknam "..."+p1[1:3]
.DATA TASK='tsknam'
.DATA //
.CLOSE
.IFNINS CRF... INS $CRF
TKB @TEMPTKB
.if <exstat> = <succes> .goto ok
.OPEN TI:
.DATA ['P0'] 'P1' 'P2' ****** FAILED ****** '<EXSTAT>' 
.close
.EXIT '<EXSTAT>'
.ok:
PIP TEMPTKB.CMD;*/DE/NM
PIP TEMP.ODL;*/DE/NM
.WAIT CRF...
