struct rmsmsg
{int	rms_sts;
 char	*rms_msg;
};
static struct rmsmsg panic[] = {
1,	"SU$SUC OPERATION SUCCEEDED",
2,	"SU$DUP INSERTED RECORD HAS DUPLICATE KEY",
3,	"SU$IDX ERROR UPDATING INDEX",
4,	"SU$RRV ",
5,	"SU$BOF ",
20,	"SU$RLK ",
-1824,	"ER$XTR EXTRANEOUS FIELD DETECTED DURING PARSE",
-1808,	"ER$XAB NOT A VALID XAB(@XAB=ODD,STV=@XAB)",
-1792,	"ER$WPL ERROR WHILE WRITING PROLOGUE(STV=SYS ERR CODE)",
-1784,	"ER$WLK DEVICE IS WRITE-LOCKED",
-1776,	"ER$WER FILE WRITE ERROR(STV=SYS ERR CODE)",
-1768,	"ER$WCD WILD CARD ENCOUNTERED DURING FNA/DNA STRING PARSE",
-1760,	"ER$VOL INVALID VOLUME NUMBER(STV=@XAB)",
-1744,	"ER$VER ERROR IN VERSION NUMBER",
-1728,	"ER$USZ INVALID USER BUFFER SIZE(USZ=0)",
-1720,	"ER$UIN FAL REJECTED SOME FIELD (STV TELLS WHICH)",
-1712,	"ER$UBF INVALID USER BUFFER ADDR(0,OR BLK-IO NOT WORD ALIGNED)",
-1696,	"ER$TYP ERROR IN FILE TYPE EXTENSION",
-1680,	"ER$TRE INDEX TREE ERROR",
-1664,	"ER$SYS SYSTEM DIRECTIVE ERROR(STV=SYS ERR CODE)",
-1656,	"ER$SUP OPERATION UNSUPPORTED OVER NETWORK",
-1648,	"ER$STK THIS ERROR CODE NO LONGER USED",
-1632,	"ER$SIZ 'SIZ' FIELD INVALID(STV=@XAB)",
-1616,	"ER$SHR UNRECOGNIZABLEIN FAB SHR FIELD",
-1600,	"ER$SEQ PRIMARY KEY OUT OF SEQUENCE(RAC=RB$SEQ FOR $PUT)",
-1592,	"ER$RVU RRV UPDATE ERROR ON INSERT",
-1584,	"ER$RTB RECORD TOO BIG FOR USER'S BUFFER(STV=ACTUAL REC SIZE)",
-1568,	"ER$RSZ BAD RECORD SIZE(RSZ>MRS, OR NOT=MRS IF FIXED LENGTH RECS",
-1564,	"ER$RST INVALID RESULTANT STRING ADDRESS",
-1560,	"ER$RSS INVALID RESULTANT STRING SIZE",
-1556,	"ER$RSL NO RESULTANT STRING IN RESULTANT STRING AREA",
-1552,	"ER$RSA THIS ERROR CODE NO LONGER USED",
-1536,	"ER$RRV INVALID RRV RECORD ENCOUNTERED",
-1520,	"ER$RPL ERROR WHILE READING PROLOGUE(STV=SYS ERR CODE)",
-1504,	"ER$ROP INVALID RECORD OPTIONS",
-1488,	"ER$RNL RECORD NOT LOCKED",
-1472,	"ER$RNF RECORD NOT FOUND(STV=0/ER$IDX)",
-1456,	"ER$RMV RSX-F11ACP REMOVE FUNCTION FAILED(STV=SYS ERR CODE)",
-1440,	"ER$RLK TARGET BUCKET LOCKED BY ANOTHER ACCESSOR",
-1424,	"ER$RFM INVALID RECORD FORMAT",
-1408,	"ER$RFA BAD RFA VALUE",
-1392,	"ER$REX RECORD ALREADY EXISTS",
-1376,	"ER$RER FILE READ ERROR(STV=SYS ERR CODE)",
-1360,	"ER$RBF INVALID RECORD BUFFER ADDR(NOT WORD-ALIGNED IF BLK-IO)",
-1344,	"ER$RAT ILLEGAL RECORD ATTRIBUTES",
-1328,	"ER$RAC ILLEGAL RAC VALUE",
-1312,	"ER$RAB NOT A VALID RAB",
-1296,	"ER$PRV PRIVILEGE VIOLATION(OS DENIES ACCESS)",
-1280,	"ER$PRM BAD FILE DATE FIELD RETRIEVED(STV=@XAB)",
-1264,	"ER$POS 'POS' FIELD INVALID(POS GT MRS,STV=@XAB)",
-1256,	"ER$PLV FILE PROLOGUE VERSION LEVEL UNSUPPORTED",
-1248,	"ER$PLG ERROR IN FILE'S PROLOGUE(RECONSTRUCT FILE)",
-1232,	"ER$ORG INVALID FILE ORGANIZATION VALUE",
-1216,	"ER$ORD XAB'S NOT IN CORRECT ORDER",
-1200,	"ER$OPN RSTS/E OPEN FUNCTION FAILED(STV=SYS ERR CODE)",
-1184,	"ER$NPK INDEXED FILE-NO PRIMARY KEY DEFINED",
-1176,	"ER$NOD ERROR IN NODE NAME (OR IMBALANCED NODES FOR $RENAME)",
-1172,	"ER$NMF NO MORE FILES MATCHING WILD-CARD SPECIFICATION",
-1168,	"ER$NID THIS ERROR CODE NO LONGER IN USE",
-1160,	"ER$NET LINK OR NETWORK ABORTED",
-1152,	"ER$NEF NOT POSITIONED TO EOF(SEQ. FILES ONLY)",
-1136,	"ER$NAM 'NAM' BLOCK ADDRESS ZERO OR ODD",
-1128,	"ER$NAE UNMAPPABLE NETWORK ACCESS ERROR",
-1120,	"ER$MRS ILLEGAL FAB MRS VALUE",
-1104,	"ER$MRN MRN VALUE=NEG/REL.KEY>MRN",
-1088,	"ER$MKD F11ACP COULD NOT MARK FILE FOR DELETION(STV=SYS ERR CODE)",
-1080,	"ER$MEM FNA, DNA, ESA, OR RSA STRING WRAPPED TO ZERO",
-1072,	"ER$MAP BUFFER MAPPING ERROR",
-1056,	"ER$LOC 'LOC' FIELD INVALID(STV=@XAB)",
-1052,	"ER$LIB OLD/INCONSISTENT LIBRARY CONFIGURATION(CRASH)",
-1048,	"ER$LEX LOGICAL EXTEND ERROR,PRIOR EXTEND STILL VALID(STV=@XAB)",
-1040,	"ER$LCH LOGICAL CHANNEL NUMBER TOO LARGE",
-1024,	"ER$LBY LOGICAL CHANNEL BUSY",
-1008,	"ER$LBL NOT ANSI LABELED TAPE",
-992,	"ER$LAN LOWEST-LEVEL-INDEX AREA NUMBER INVALID(STV=@XAB)",
-976,	"ER$KSZ KEY SIZE=0,OR TOO LARGE(IDX)/NOT=4(REL)",
-960,	"ER$KRF INVALID KEY-OF-REFERENCE($GET/$FIND)",
-944,	"ER$KEY INVALID KEY FIELD(KEY=0/NEG)",
-928,	"ER$KBF BAD KEY BUFFER ADDRESS(KBF=0)",
-912,	"ER$ISI INVALID ISI VALUE, OR UNCONNECTED RAB",
-896,	"ER$IRC ILLEGAL RECORD ENCOUNTERED(SEQ. FILES ONLY)",
-880,	"ER$IOP OPERATION ILLEGAL,OR INVALID FOR FILE ORG.",
-864,	"ER$INI THIS ERROR CODE NO LONGER USED",
-848,	"ER$IMX TOO MANY XABS OF A GIVEN TYPE(STV=@XAB)",
-832,	"ER$IFI INVALID IFI VALUE,OR UNOPENED FILE",
-816,	"ER$IDX INDEX NOT INITIALIZED(STV ONLY,STS=ER$RNF)",
-800,	"ER$IAN INDEX AREA NUMBER INVALID(STV=@XAB)",
-784,	"ER$FUL DEVICE/FILE FULL",
-776,	"ER$FSS SYSTEM ERROR DURING FNA/DNA STRING PARSE (STV=SYS ERR CODE)",
-768,	"ER$FOP INVALID FILE OPTIONS",
-752,	"ER$FNM ERROR IN FILE NAME",
-736,	"ER$FNF FILE NOT FOUND",
-720,	"ER$FND RSX-F11ACP 'FIND' FUNCTION FAILED(STV=SYS ERR CODE)",
-712,	"ER$FNA ZERO FNA WITH NON-ZERO FNS",
-704,	"ER$FLK FILE IS LOCKED BY OTHER USER",
-688,	"ER$FLG INVALID FLAG-BITS COMBINATION(STV=@XAB)",
-672,	"ER$FEX FILE ALREADY  EXISTS",
-664,	"ER$FAL REMOTE NODE DOES NOT SUPPORT OPERATION",
-656,	"ER$FAC RECORD OPERATION NOT SUPPORTED IN FAB FAC",
-640,	"ER$FAB NOT A VALID FAB",
-624,	"ER$EXT FILE EXTEND FAILURE(STV=SYS ERR CODE)",
-616,	"ER$EXP FILE EXPIRATION DATE NOT YET REACHED",
-608,	"ER$ESS EXPANDED STRING AREA TOO SHORT",
-604,	"ER$ESL NO EXPANDED STRING IN EXPANDED STRING AREA",
-600,	"ER$ESA EXPANDED STRING ADDRESS IS ZERO",
-592,	"ER$EOF END-OF-FILE",
-576,	"ER$ENV OPERATION NOT SELECTED IN 'ORG$' MACRO OR TASK-BUILD (E.G., DAP SUPPORT",
-560,	"ER$ENT RSX-F11ACP ENTER FUNCTION FAILED(STV=SYS ERR CODE)",
-544,	"ER$DUP DUPLICATE KEY DETECTED, XB$DUP ATTRIBUTE NOT SET",
-528,	"ER$DTP 'DTP' FIELD INVALID(STV=@XAB)",
-520,	"ER$DPE DEVICE POSITIONING ERROR(STV=SYS ERR CODE)",
-512,	"ER$DNR DEVICE NOT READY",
-496,	"ER$DNF DIRECTORY NOT FOUND",
-488,	"ER$DNA ZERO DNA WITH NON-ZERO DNS",
-480,	"ER$DME DYNAMIC MEMORY EXHAUSTED",
-464,	"ER$DIR ERROR IN DIRECTORY NAME",
-456,	"ER$DFW ERROR OCCURRED ON DEFERRED WRITE (STV=SYS ERR CODE)",
-448,	"ER$DEV BAD DEVICE, OR INAPPROPRIATE DEVICE TYPE",
-432,	"ER$DEL RFA-ACCESSED RECORD WAS DELETED",
-416,	"ER$DAN DATA AREA NUMBER INVALID(STV=@XAB)",
-400,	"ER$DAC F11ACP DEACCESS ERROR DURING 'CLOSE' (STV=SYS ERR CODE)",
-384,	"ER$CUR NO CURRENT RECORD(OPERATION NOT PRECEDED BY GET/FIND)",
-368,	"ER$CRE COULD NOT CREATE FILE(STV=SYS ERR CODE)",
-360,	"ER$CPB CALL PARAMETER BLOCK HAS INVALID ARGUMENT COUNT OR ZERO OR ODD ADDRESS",
-352,	"ER$COD INVALID OR UNSUPPORTED 'COD' FIELD(STV=@XAB)",
-336,	"ER$CLS RSTS/E CLOSE FUNCTION FAILED(STV=SYS ERR CODE)",
-320,	"ER$CHK BUCKET HEADER CORRUPTED",
-304,	"ER$CHG $UPDATE-KEY CHANGE WITHOUT HAVING ATTRIBUTE OF XB$CHG SET",
-288,	"ER$CCR CAN'T CONNECT RAB",
-272,	"ER$BUG INTERNAL RMS ERROR CONDITION DETECTED",
-256,	"ER$BPS PRIVATE POOL SIZE NOT MULTIPLE OF '4'",
-240,	"ER$BPA PRIVATE POOL ADDRESS ZERO OR NOT WORD-ALIGNED",
-232,	"ER$BOF BEGINNING OF FILE DETECTED($SPACE)",
-224,	"ER$BLN THIS ERROR CODE NO LONGER IN USE",
-208,	"ER$BKZ BUCKET SIZE TOO LARGE(STV=@XAB)",
-192,	"ER$BKS BUCKET SIZE TOO LARGE(FAB)",
-176,	"ER$ATW ATTRIBUTE WRITE ERROR(STV=SYS ERR CODE)",
-168,	"ER$FID INVALID FILE-ID",
-160,	"ER$ATR ATTRIBUTE READ ERROR(STV=SYS ERR CODE)",
-144,	"ER$AST INVALID OPERATION AT AST LEVEL",
-128,	"ER$AOP ALLOCATION OPTIONS ERROR(STV=@XAB)",
-112,	"ER$ANI NOT ANSI 'D' FORMAT",
-96,	"ER$ALQ IMPROPER ALLOCATION QUANTITY",
-80,	"ER$ALN ALIGNMENT OPTIONS ERROR(STV=@XAB)",
-64,	"ER$AID BAD AREA ID(STV=@XAB)",
-48,	"ER$ACT CURRENT RMS ACTIVITY PRECLUDES OPERATION",
-32,	"ER$ACC F11ACP ACCESS ERROR (STV) OR FILE IMPROPERLY CLOSED OR CREATED",
-16,	"ER$ABO THIS ERROR CODE NO LONGER IN USE",
0,	"THE END OF ALL KNOWN RMS STATUS MEANINGS"
};

char	*
rmserr(sts)			/* return string from rms error status */
	int	sts;
	{struct	rmsmsg	*p;
	 for	(p=panic; p->rms_sts;	p++)
		{if	(p->rms_sts == sts)
			{return(p->rms_msg);
			}
		 ;
		}
	 ;
	 return("UN$WOT UNKNOWN RMS STATUS");
	}

main(argc,argv)
int	argc;
char	**argv;
	{int	sts;
	 if	(argc!=2)	helpless();
	 sscanf(argv[1],"%o",&sts);
	 printf("%oo %d. %s\n",sts,sts,rmserr(sts));
	}

helpless()
	{printf("usage MCR>ERR nnnnnn\n");
	 printf("  nnnnnn is an octal RMS status value\n");
	 printf("  will return the error message of this status\n");
	 exit();
	}
