From:	CSBVAX::MRGATE!/ADMD=/PRMD=BITNET/O=FHCRCVAX/PN=JOE/@US@SMTP 24-AUG-1988 16:58
To:	ARISIA::EVERHART
Subj:	status part 4 of 7


Received: from UWAVM.ACS.WASHINGTON.EDU by uwavm.acs.washington.edu ; Wed, 24 Aug 88 13:12:02 PDT
Received: from UWAVM.ACS.WASHINGTON.EDU by UWAVM.ACS.WASHINGTON.EDU (Mailer
 X1.24) with BSMTP id 7547; Wed, 24 Aug 88 13:11:58 PDT
P1-Message-Id: US**EDU;UWAVM.ACS.WASHINGTON.EDU:LUoULH7H
Date:         Wed, 24 Aug 88 13:06-0700
X400-Trace:   US**EDU; arrival Wed, 24 Aug 88 13:06-0700 action Relayed
X400-Trace:   US**EDU; arrival Wed, 24 Aug 88 13:11-0700 action Relayed
From:         Joe Meadows</ADMD=/PRMD=BITNET/O=FHCRCVAX/PN=JOE/@US>
Subject:      status part 4 of 7
To:           <Everhart%Arisia.decnet@GE-CRD.ARPA>
Message-Id:   <UWAVM.ACS.WASHINGTON.EDU:LUoULH7H*>
X-VMS-To: @SYS$LOGIN:GLENN.EVERHART

+-+-+-+ Beginning of part 4 +-+-+-+
X      };
X      break;
X    default:
X      switch (itmcod) {
X        case JPI$_USERNAME:
X        case JPI$_ACCOUNT:
X        case JPI$_MAXDETACH:
X        case JPI$_MAXJOBS:
X        case JPI$_SHRFILLM:
X          retval = 0;
X          break;
X        default:
X          retval = 2;
X          break;
X      };
X      break;
X  };
X  return(retval);
X}
X$EOD
X$ create/log JPICODES.H
X$DECK
X#define JPIMAXITEMCNT 83
X#define JPIMAXPCBCNT 48
X#define JPIMAXPHDCNT 23
X#define JPIMAXCTLCNT 12
X#define JPIMAXBUFFLEN 787
Xstruct JPICodes {
X  short int itemcode;
X  short int size;
X  short int avail;
X  short int offset;
X};
X#ifdef GLOBAL
Xglobaldef struct JPICodes JpiCodes[JPIMAXITEMCNT] = {
X  {0x200,4,2,0`009/* VIRTPEAK */},
X  {0x201,4,2,4`009/* WSPEAK */},
X  {0x202,12,0,8`009/* USERNAME */},
X  {0x203,8,0,20`009/* ACCOUNT */},
X  {0x204,8,2,28`009/* PROCPRIV */},
X  {0x205,4,2,36`009/* VOLUMES */},
X  {0x206,8,2,40`009/* LOGINTIM */},
X  {0x207,128,2,48`009/* IMAGNAME */},
X  {0x208,4,2,176`009/* SITESPEC */},
X  {0x209,4,2,180`009/* MSGMASK */},
X  {0x20a,39,2,184`009/* CLINAME */},
X  {0x20b,252,2,223`009/* TABLENAME */},
X  {0x20c,4,2,475`009/* CREPRC_FLAGS */},
X  {0x20d,4,2,479`009/* UAF_FLAGS */},
X  {0x20e,4,0,483`009/* MAXDETACH */},
X  {0x20f,4,0,487`009/* MAXJOBS */},
X  {0x210,4,0,491`009/* SHRFILLM */},
X  {0x300,4,0,495`009/* ASTACT */},
X  {0x301,4,0,499`009/* ASTEN */},
X  {0x302,4,0,503`009/* PRI */},
X  {0x303,4,0,507`009/* OWNER */},
X  {0x304,4,0,511`009/* UIC */},
X  {0x305,4,0,515`009/* STS */},
X  {0x306,4,0,519`009/* STATE */},
X  {0x307,4,0,523`009/* MEM */},
X  {0x308,4,0,527`009/* GRP */},
X  {0x309,4,0,531`009/* PRIB */},
X  {0x30a,4,0,535`009/* APTCNT */},
X  {0x30b,4,0,539`009/* TMBU */},
X  {0x30c,4,0,543`009/* GPGCNT */},
X  {0x30d,4,0,547`009/* PPGCNT */},
X  {0x30e,4,0,551`009/* ASTCNT */},
X  {0x30f,4,0,555`009/* BIOCNT */},
X  {0x310,4,0,559`009/* BIOLM */},
X  {0x311,4,0,563`009/* BYTCNT */},
X  {0x312,4,0,567`009/* DIOCNT */},
X  {0x313,4,0,571`009/* DIOLM */},
X  {0x314,4,0,575`009/* FILCNT */},
X  {0x315,4,0,579`009/* TQCNT */},
X  {0x316,4,0,583`009/* EFWM */},
X  {0x317,4,0,587`009/* EFCS */},
X  {0x318,4,0,591`009/* EFCU */},
X  {0x319,4,0,595`009/* PID */},
X  {0x31a,4,0,599`009/* BYTLM */},
X  {0x31b,4,0,603`009/* PRCCNT */},
X  {0x31c,16,0,607`009/* PRCNAM */},
X  {0x31d,8,0,623`009/* TERMINAL */},
X  {0x31e,4,0,631`009/* JOBPRCCNT */},
X  {0x31f,4,0,635`009/* ENQCNT */},
X  {0x320,4,0,639`009/* ENQLM */},
X  {0x321,4,0,643`009/* SWPFILLOC */},
X  {0x322,4,0,647`009/* MODE */},
X  {0x323,4,0,651`009/* JOBTYPE */},
X  {0x324,4,0,655`009/* PROC_INDEX */},
X  {0x325,4,0,659`009/* MASTER_PID */},
X  {0x400,8,1,663`009/* CURPRIV */},
X  {0x401,4,1,671`009/* WSAUTH */},
X  {0x402,4,1,675`009/* WSQUOTA */},
X  {0x403,4,1,679`009/* DFWSCNT */},
X  {0x404,4,1,683`009/* FREP0VA */},
X  {0x405,4,1,687`009/* FREP1VA */},
X  {0x406,4,1,691`009/* DFPFC */},
X  {0x407,4,1,695`009/* CPUTIM */},
X  {0x408,4,0,699`009/* PRCLM */},
X  {0x409,4,1,703`009/* ASTLM */},
X  {0x40a,4,1,707`009/* PAGEFLTS */},
X  {0x40b,4,1,711`009/* DIRIO */},
X  {0x40c,4,1,715`009/* BUFIO */},
X  {0x40d,4,1,719`009/* CPULIM */},
X  {0x40e,4,0,723`009/* PGFLQUOTA */},
X  {0x40f,4,0,727`009/* FILLM */},
X  {0x410,4,0,731`009/* TQLM */},
X  {0x411,4,1,735`009/* WSSIZE */},
X  {0x412,8,1,739`009/* AUTHPRIV */},
X  {0x413,8,1,747`009/* IMAGPRIV */},
X  {0x414,4,0,755`009/* PAGFILCNT */},
X  {0x415,4,1,759`009/* FREPTECNT */},
X  {0x416,4,1,763`009/* WSEXTENT */},
X  {0x417,4,1,767`009/* WSAUTHEXT */},
X  {0x418,4,1,771`009/* AUTHPRI */},
X  {0x419,4,1,775`009/* PAGFILLOC */},
X  {0x41a,4,1,779`009/* IMAGECOUNT */},
X  {0x41b,4,1,783`009/* PHDFLAGS */},
X};
X#else
Xglobalref struct JPICodes JpiCodes[];
X#endif
X$EOD
X$ create/log KEYWORDS.DAT
X$DECK
X! jpi items
XACCOUNT,init$jpi,JPI$_ACCOUNT,cvt$text
XAPTCNT,init$jpi,JPI$_APTCNT,cvt$numeric
XASTACT,init$jpi,JPI$_ASTACT,cvt$access_mode
XASTCNT,init$jpi,JPI$_ASTCNT,cvt$numeric
XASTEN,init$jpi,JPI$_ASTEN,cvt$access_mode
XASTLM,init$jpi,JPI$_ASTLM,cvt$numeric
XAUTHPRI,init$jpi,JPI$_AUTHPRI,cvt$numeric
XAUTHPRIV,init$jpi,JPI$_AUTHPRIV,cvt$privilege
XBIOCNT,init$jpi,JPI$_BIOCNT,cvt$numeric
XBIOLM,init$jpi,JPI$_BIOLM,cvt$numeric
XBUFIO,init$jpi,JPI$_BUFIO,cvt$numeric
XBYTCNT,init$jpi,JPI$_BYTCNT,cvt$numeric
XBYTLM,init$jpi,JPI$_BYTLM,cvt$numeric
XCLINAME,init$jpi,JPI$_CLINAME,cvt$text
XCPULIM,init$jpi,JPI$_CPULIM,cvt$cputim
XCPUTIM,init$jpi,JPI$_CPUTIM,cvt$cputim
XCREPRC_FLAGS,init$jpi,JPI$_CREPRC_FLAGS,cvt$creprc_flags
XCURPRIV,init$jpi,JPI$_CURPRIV,cvt$privilege
XDFPFC,init$jpi,JPI$_DFPFC,cvt$numeric
XDFWSCNT,init$jpi,JPI$_DFWSCNT,cvt$numeric
XDIOCNT,init$jpi,JPI$_DIOCNT,cvt$numeric
XDIOLM,init$jpi,JPI$_DIOLM,cvt$numeric
XDIRIO,init$jpi,JPI$_DIRIO,cvt$numeric
XEFCS,init$jpi,JPI$_EFCS,cvt$numeric_hex
XEFCU,init$jpi,JPI$_EFCU,cvt$numeric_hex
XEFWM,init$jpi,JPI$_EFWM,cvt$numeric_hex
XENQCNT,init$jpi,JPI$_ENQCNT,cvt$numeric
XENQLM,init$jpi,JPI$_ENQLM,cvt$numeric
XFILCNT,init$jpi,JPI$_FILCNT,cvt$numeric
XFILLM,init$jpi,JPI$_FILLM,cvt$numeric
XFREP0VA,init$jpi,JPI$_FREP0VA,cvt$numeric_hex
XFREP1VA,init$jpi,JPI$_FREP1VA,cvt$numeric_hex
XFREPTECNT,init$jpi,JPI$_FREPTECNT,cvt$numeric
XGPGCNT,init$jpi,JPI$_GPGCNT,cvt$numeric
XGRP,init$jpi,JPI$_GRP,cvt$numeric_oct
XIMAGECOUNT,init$jpi,JPI$_IMAGECOUNT,cvt$numeric
XIMAGNAME,init$jpi,JPI$_IMAGNAME,cvt$text
XIMAGPRIV,init$jpi,JPI$_IMAGPRIV,cvt$privilege
XJOBPRCCNT,init$jpi,JPI$_JOBPRCCNT,cvt$numeric
XJOBTYPE,init$jpi,JPI$_JOBTYPE,cvt$jobtype
XLOGINTIM,init$jpi,JPI$_LOGINTIM,cvt$time
XMASTER_PID,init$jpi,JPI$_MASTER_PID,cvt$numeric_hex
XMAXDETACH,init$jpi,JPI$_MAXDETACH,cvt$numeric
XMAXJOBS,init$jpi,JPI$_MAXJOBS,cvt$numeric
XMEM,init$jpi,JPI$_MEM,cvt$numeric_oct
XMODE,init$jpi,JPI$_MODE,cvt$mode
XMSGMASK,init$jpi,JPI$_MSGMASK,cvt$msgmsk
XOWNER,init$jpi,JPI$_OWNER,cvt$numeric_hex
XPAGEFLTS,init$jpi,JPI$_PAGEFLTS,cvt$numeric
XPAGFILCNT,init$jpi,JPI$_PAGFILCNT,cvt$numeric
XPAGFILLOC,init$jpi,JPI$_PAGFILLOC,cvt$numeric_hex
XPGFLQUOTA,init$jpi,JPI$_PGFLQUOTA,cvt$numeric
XPHDFLAGS,init$jpi,JPI$_PHDFLAGS,cvt$phdflags
XPID,init$jpi,JPI$_PID,cvt$numeric_hex
XPPGCNT,init$jpi,JPI$_PPGCNT,cvt$numeric
XPRCCNT,init$jpi,JPI$_PRCCNT,cvt$numeric
XPRCLM,init$jpi,JPI$_PRCLM,cvt$numeric
XPRCNAM,init$jpi,JPI$_PRCNAM,cvt$text
XPRI,init$jpi,JPI$_PRI,cvt$numeric
XPRIB,init$jpi,JPI$_PRIB,cvt$numeric
XPROC_INDEX,init$jpi,JPI$_PROC_INDEX,cvt$numeric
XPROCPRIV,init$jpi,JPI$_PROCPRIV,cvt$privilege
XSHRFILLM,init$jpi,JPI$_SHRFILLM,cvt$numeric
XSITESPEC,init$jpi,JPI$_SITESPEC,cvt$numeric_hex
XSTATE,init$state,JPI$_STATE,cvt$state
XSTS,init$jpi,JPI$_STS,cvt$sts
XSWPFILLOC,init$jpi,JPI$_SWPFILLOC,cvt$numeric_hex
XTABLENAME,init$jpi,JPI$_TABLENAME,cvt$text
XTERMINAL,init$jpi,JPI$_TERMINAL,cvt$text
XTMBU,init$jpi,JPI$_TMBU,cvt$numeric
XTQCNT,init$jpi,JPI$_TQCNT,cvt$numeric
XTQLM,init$jpi,JPI$_TQLM,cvt$numeric
XUAF_FLAGS,init$jpi,JPI$_UAF_FLAGS,cvt$uaf_flags
XUIC,init$jpi,JPI$_UIC,cvt$uic
XUSERNAME,init$jpi,JPI$_USERNAME,cvt$text
XVIRTPEAK,init$jpi,JPI$_VIRTPEAK,cvt$numeric
XVOLUMES,init$jpi,JPI$_VOLUMES,cvt$numeric
XWSAUTH,init$jpi,JPI$_WSAUTH,cvt$numeric
XWSAUTHEXT,init$jpi,JPI$_WSAUTHEXT,cvt$numeric
XWSEXTENT,init$jpi,JPI$_WSEXTENT,cvt$numeric
XWSPEAK,init$jpi,JPI$_WSPEAK,cvt$numeric
XWSQUOTA,init$jpi,JPI$_WSQUOTA,cvt$numeric
XWSSIZE,init$jpi,JPI$_WSSIZE,cvt$numeric
X! syi items
XBOOTTIME,init$syi,(SYI$_BOOTTIME<<16)+8,cvt$time
XCLUSTER_FSYSID,init$syi,(SYI$_CLUSTER_FSYSID<<16)+6,cvt$hex_6
XCLUSTER_FTIME,init$syi,(SYI$_CLUSTER_FTIME<<16)+8,cvt$time
XCPU,init$syi,(SYI$_CPU<<16)+4,cvt$numeric
XMAXPROCESSCNT,init$syi,(SYI$_MAXPROCESSCNT<<16)+4,cvt$numeric
XNODENAME,init$syi,(SYI$_NODENAME<<16)+15,cvt$nodename
XNODE_AREA,init$syi,(SYI$_NODE_AREA<<16)+4,cvt$numeric
XNODE_CSID,init$syi,(SYI$_NODE_CSID<<16)+4,cvt$numeric_hex
XNODE_HWTYPE,init$syi,(SYI$_NODE_HWTYPE<<16)+4,cvt$text
XNODE_HWVERS,init$syi,(SYI$_NODE_HWVERS<<16)+12,cvt$hex_12
XNODE_NUMBER,init$syi,(SYI$_NODE_NUMBER<<16)+4,cvt$numeric
XNODE_QUORUM,init$syi,(SYI$_NODE_QUORUM<<16)+2,cvt$numeric
XNODE_SWINCARN,init$syi,(SYI$_NODE_SWINCARN<<16)+8,cvt$hex_8
XNODE_SWTYPE,init$syi,(SYI$_NODE_SWTYPE<<16)+4,cvt$text
XNODE_SWVERS,init$syi,(SYI$_NODE_SWVERS<<16)+4,cvt$text
XNODE_SYSTEMID,init$syi,(SYI$_NODE_SYSTEMID<<16)+6,cvt$hex_6
XNODE_VOTES,init$syi,(SYI$_NODE_VOTES<<16)+2,cvt$numeric
XPHYSICALPAGES,init$syi,(SYI$_PHYSICALPAGES<<16)+4,cvt$numeric
XSCSNODE,init$syi,(SYI$_SCSNODE<<16)+4,cvt$numeric
XSCSSYSTEMID,init$syi,(SYI$_SCSSYSTEMID<<16)+4,cvt$numeric
XSCSSYSTEMIDH,init$syi,(SYI$_SCSSYSTEMIDH<<16)+4,cvt$numeric
XSID,init$syi,(SYI$_SID<<16)+4,cvt$numeric_hex
XVERSION,init$syi,(SYI$_VERSION<<16)+8,cvt$text
X! other weirdly stuff
XBJOBCNT,init$global,SYS$GW_BJOBCNT,cvt$global_word
XELAPSED,init$jpi,JPI$_LOGINTIM,cvt$elapsed_time
XIJOBCNT,init$global,SYS$GW_IJOBCNT,cvt$global_word
XIMAGE,init$jpi,JPI$_IMAGNAME,cvt$image
XIO,init$io,0,cvt$io
XIPID,init$jpi,JPI$_PID,cvt$epid_to_ipid
XNJOBCNT,init$global,SYS$GW_NJOBCNT,cvt$global_word
XPAGES,init$pages,0,cvt$pages
XPHYSICAL,init$jpi,JPI$_TERMINAL,cvt$physical_terminal
XPROCCNT,init$global,SCH$GW_PROCCNT,cvt$global_word
XTIME,init$dummy,0,cvt$current_time
XTYPE,init$type,0,cvt$type
XWHERE,init$jpi,JPI$_TERMINAL,cvt$where
XWHO,init$jpi,JPI$_USERNAME,cvt$who
XDEVICES,init$jpi,JPI$_PID,cvt$devices
XIDLETERMINAL,init$jpi,JPI$_TERMINAL,cvt$idleterminal
XIDLECPU,init$jpi,JPI$_CPUTIM,cvt$idlecpu
XUPTIME,init$syi,(SYI$_BOOTTIME<<16)+8,cvt$elapsed_time
XCLUSTER_MEMBERS,init$dummy,0,cvt$cluster_members
X$EOD
X$ create/log KEYWORDS.H
X$DECK
X/* KEYWORDS.H Created on 13-Jul-88 2:15 pm */
X
Xstruct ItemNode {
X  char *name;
X  int (*init_routine)();
X  int ini_data;
X  int (*frmt_routine)();
X};
X
X#ifdef GLOBAL
Xint /* declare all initialization routines */
X  init$dummy(),
X  init$global(),
X  init$io(),
X  init$jpi(),
X  init$pages(),
X  init$state(),
X  init$syi(),
X  init$type();
Xint /* declare all formatting routines */
X  cvt$access_mode(),
X  cvt$cluster_members(),
X  cvt$cputim(),
X  cvt$creprc_flags(),
X  cvt$current_time(),
X  cvt$devices(),
X  cvt$elapsed_time(),
X  cvt$epid_to_ipid(),
X  cvt$global_word(),
X  cvt$hex_12(),
X  cvt$hex_6(),
X  cvt$hex_8(),
X  cvt$idlecpu(),
X  cvt$idleterminal(),
X  cvt$image(),
X  cvt$io(),
X  cvt$jobtype(),
X  cvt$mode(),
X  cvt$msgmsk(),
X  cvt$nodename(),
X  cvt$numeric(),
X  cvt$numeric_hex(),
X  cvt$numeric_oct(),
X  cvt$pages(),
X  cvt$phdflags(),
X  cvt$physical_terminal(),
X  cvt$privilege(),
X  cvt$state(),
X  cvt$sts(),
X  cvt$text(),
X  cvt$time(),
X  cvt$type(),
X  cvt$uaf_flags(),
X  cvt$uic(),
X  cvt$where(),
X  cvt$who(),
X  format_literal();;
Xglobaldef int max_keywords = 125;
X
Xglobaldef struct ItemNode keywords[] = {
X    {"ACCOUNT", init$jpi, JPI$_ACCOUNT, cvt$text},
X    {"APTCNT", init$jpi, JPI$_APTCNT, cvt$numeric},
X    {"ASTACT", init$jpi, JPI$_ASTACT, cvt$access_mode},
X    {"ASTCNT", init$jpi, JPI$_ASTCNT, cvt$numeric},
X    {"ASTEN", init$jpi, JPI$_ASTEN, cvt$access_mode},
X    {"ASTLM", init$jpi, JPI$_ASTLM, cvt$numeric},
X    {"AUTHPRI", init$jpi, JPI$_AUTHPRI, cvt$numeric},
X    {"AUTHPRIV", init$jpi, JPI$_AUTHPRIV, cvt$privilege},
X    {"BIOCNT", init$jpi, JPI$_BIOCNT, cvt$numeric},
X    {"BIOLM", init$jpi, JPI$_BIOLM, cvt$numeric},
X    {"BJOBCNT", init$global, SYS$GW_BJOBCNT, cvt$global_word},
X    {"BOOTTIME", init$syi, (SYI$_BOOTTIME<<16)+8, cvt$time},
X    {"BUFIO", init$jpi, JPI$_BUFIO, cvt$numeric},
X    {"BYTCNT", init$jpi, JPI$_BYTCNT, cvt$numeric},
X    {"BYTLM", init$jpi, JPI$_BYTLM, cvt$numeric},
X    {"CLINAME", init$jpi, JPI$_CLINAME, cvt$text},
X    {"CLUSTER_FSYSID", init$syi, (SYI$_CLUSTER_FSYSID<<16)+6, cvt$hex_6},
X    {"CLUSTER_FTIME", init$syi, (SYI$_CLUSTER_FTIME<<16)+8, cvt$time},
X    {"CLUSTER_MEMBERS", init$dummy, 0, cvt$cluster_members},
X    {"CPU", init$syi, (SYI$_CPU<<16)+4, cvt$numeric},
X    {"CPULIM", init$jpi, JPI$_CPULIM, cvt$cputim},
X    {"CPUTIM", init$jpi, JPI$_CPUTIM, cvt$cputim},
X    {"CREPRC_FLAGS", init$jpi, JPI$_CREPRC_FLAGS, cvt$creprc_flags},
X    {"CURPRIV", init$jpi, JPI$_CURPRIV, cvt$privilege},
X    {"DEVICES", init$jpi, JPI$_PID, cvt$devices},
X    {"DFPFC", init$jpi, JPI$_DFPFC, cvt$numeric},
X    {"DFWSCNT", init$jpi, JPI$_DFWSCNT, cvt$numeric},
X    {"DIOCNT", init$jpi, JPI$_DIOCNT, cvt$numeric},
X    {"DIOLM", init$jpi, JPI$_DIOLM, cvt$numeric},
X    {"DIRIO", init$jpi, JPI$_DIRIO, cvt$numeric},
X    {"EFCS", init$jpi, JPI$_EFCS, cvt$numeric_hex},
X    {"EFCU", init$jpi, JPI$_EFCU, cvt$numeric_hex},
X    {"EFWM", init$jpi, JPI$_EFWM, cvt$numeric_hex},
X    {"ELAPSED", init$jpi, JPI$_LOGINTIM, cvt$elapsed_time},
X    {"ENQCNT", init$jpi, JPI$_ENQCNT, cvt$numeric},
X    {"ENQLM", init$jpi, JPI$_ENQLM, cvt$numeric},
X    {"FILCNT", init$jpi, JPI$_FILCNT, cvt$numeric},
X    {"FILLM", init$jpi, JPI$_FILLM, cvt$numeric},
X    {"FREP0VA", init$jpi, JPI$_FREP0VA, cvt$numeric_hex},
X    {"FREP1VA", init$jpi, JPI$_FREP1VA, cvt$numeric_hex},
X    {"FREPTECNT", init$jpi, JPI$_FREPTECNT, cvt$numeric},
X    {"GPGCNT", init$jpi, JPI$_GPGCNT, cvt$numeric},
X    {"GRP", init$jpi, JPI$_GRP, cvt$numeric_oct},
X    {"IDLECPU", init$jpi, JPI$_CPUTIM, cvt$idlecpu},
X    {"IDLETERMINAL", init$jpi, JPI$_TERMINAL, cvt$idleterminal},
X    {"IJOBCNT", init$global, SYS$GW_IJOBCNT, cvt$global_word},
X    {"IMAGE", init$jpi, JPI$_IMAGNAME, cvt$image},
X    {"IMAGECOUNT", init$jpi, JPI$_IMAGECOUNT, cvt$numeric},
X    {"IMAGNAME", init$jpi, JPI$_IMAGNAME, cvt$text},
X    {"IMAGPRIV", init$jpi, JPI$_IMAGPRIV, cvt$privilege},
X    {"IO", init$io, 0, cvt$io},
X    {"IPID", init$jpi, JPI$_PID, cvt$epid_to_ipid},
X    {"JOBPRCCNT", init$jpi, JPI$_JOBPRCCNT, cvt$numeric},
X    {"JOBTYPE", init$jpi, JPI$_JOBTYPE, cvt$jobtype},
X    {"LOGINTIM", init$jpi, JPI$_LOGINTIM, cvt$time},
X    {"MASTER_PID", init$jpi, JPI$_MASTER_PID, cvt$numeric_hex},
X    {"MAXDETACH", init$jpi, JPI$_MAXDETACH, cvt$numeric},
X    {"MAXJOBS", init$jpi, JPI$_MAXJOBS, cvt$numeric},
X    {"MAXPROCESSCNT", init$syi, (SYI$_MAXPROCESSCNT<<16)+4, cvt$numeric},
X    {"MEM", init$jpi, JPI$_MEM, cvt$numeric_oct},
X    {"MODE", init$jpi, JPI$_MODE, cvt$mode},
X    {"MSGMASK", init$jpi, JPI$_MSGMASK, cvt$msgmsk},
X    {"NJOBCNT", init$global, SYS$GW_NJOBCNT, cvt$global_word},
X    {"NODENAME", init$syi, (SYI$_NODENAME<<16)+15, cvt$nodename},
X    {"NODE_AREA", init$syi, (SYI$_NODE_AREA<<16)+4, cvt$numeric},
X    {"NODE_CSID", init$syi, (SYI$_NODE_CSID<<16)+4, cvt$numeric_hex},
X    {"NODE_HWTYPE", init$syi, (SYI$_NODE_HWTYPE<<16)+4, cvt$text},
X    {"NODE_HWVERS", init$syi, (SYI$_NODE_HWVERS<<16)+12, cvt$hex_12},
X    {"NODE_NUMBER", init$syi, (SYI$_NODE_NUMBER<<16)+4, cvt$numeric},
X    {"NODE_QUORUM", init$syi, (SYI$_NODE_QUORUM<<16)+2, cvt$numeric},
X    {"NODE_SWINCARN", init$syi, (SYI$_NODE_SWINCARN<<16)+8, cvt$hex_8},
X    {"NODE_SWTYPE", init$syi, (SYI$_NODE_SWTYPE<<16)+4, cvt$text},
X    {"NODE_SWVERS", init$syi, (SYI$_NODE_SWVERS<<16)+4, cvt$text},
X    {"NODE_SYSTEMID", init$syi, (SYI$_NODE_SYSTEMID<<16)+6, cvt$hex_6},
X    {"NODE_VOTES", init$syi, (SYI$_NODE_VOTES<<16)+2, cvt$numeric},
X    {"OWNER", init$jpi, JPI$_OWNER, cvt$numeric_hex},
X    {"PAGEFLTS", init$jpi, JPI$_PAGEFLTS, cvt$numeric},
X    {"PAGES", init$pages, 0, cvt$pages},
X    {"PAGFILCNT", init$jpi, JPI$_PAGFILCNT, cvt$numeric},
X    {"PAGFILLOC", init$jpi, JPI$_PAGFILLOC, cvt$numeric_hex},
X    {"PGFLQUOTA", init$jpi, JPI$_PGFLQUOTA, cvt$numeric},
X    {"PHDFLAGS", init$jpi, JPI$_PHDFLAGS, cvt$phdflags},
X    {"PHYSICAL", init$jpi, JPI$_TERMINAL, cvt$physical_terminal},
X    {"PHYSICALPAGES", init$syi, (SYI$_PHYSICALPAGES<<16)+4, cvt$numeric},
X    {"PID", init$jpi, JPI$_PID, cvt$numeric_hex},
X    {"PPGCNT", init$jpi, JPI$_PPGCNT, cvt$numeric},
X    {"PRCCNT", init$jpi, JPI$_PRCCNT, cvt$numeric},
X    {"PRCLM", init$jpi, JPI$_PRCLM, cvt$numeric},
X    {"PRCNAM", init$jpi, JPI$_PRCNAM, cvt$text},
X    {"PRI", init$jpi, JPI$_PRI, cvt$numeric},
X    {"PRIB", init$jpi, JPI$_PRIB, cvt$numeric},
X    {"PROCCNT", init$global, SCH$GW_PROCCNT, cvt$global_word},
X    {"PROCPRIV", init$jpi, JPI$_PROCPRIV, cvt$privilege},
X    {"PROC_INDEX", init$jpi, JPI$_PROC_INDEX, cvt$numeric},
X    {"SCSNODE", init$syi, (SYI$_SCSNODE<<16)+4, cvt$numeric},
X    {"SCSSYSTEMID", init$syi, (SYI$_SCSSYSTEMID<<16)+4, cvt$numeric},
X    {"SCSSYSTEMIDH", init$syi, (SYI$_SCSSYSTEMIDH<<16)+4, cvt$numeric},
X    {"SHRFILLM", init$jpi, JPI$_SHRFILLM, cvt$numeric},
X    {"SID", init$syi, (SYI$_SID<<16)+4, cvt$numeric_hex},
X    {"SITESPEC", init$jpi, JPI$_SITESPEC, cvt$numeric_hex},
X    {"STATE", init$state, JPI$_STATE, cvt$state},
X    {"STS", init$jpi, JPI$_STS, cvt$sts},
X    {"SWPFILLOC", init$jpi, JPI$_SWPFILLOC, cvt$numeric_hex},
X    {"TABLENAME", init$jpi, JPI$_TABLENAME, cvt$text},
X    {"TERMINAL", init$jpi, JPI$_TERMINAL, cvt$text},
X    {"TIME", init$dummy, 0, cvt$current_time},
X    {"TMBU", init$jpi, JPI$_TMBU, cvt$numeric},
X    {"TQCNT", init$jpi, JPI$_TQCNT, cvt$numeric},
X    {"TQLM", init$jpi, JPI$_TQLM, cvt$numeric},
X    {"TYPE", init$type, 0, cvt$type},
X    {"UAF_FLAGS", init$jpi, JPI$_UAF_FLAGS, cvt$uaf_flags},
X    {"UIC", init$jpi, JPI$_UIC, cvt$uic},
X    {"UPTIME", init$syi, (SYI$_BOOTTIME<<16)+8, cvt$elapsed_time},
X    {"USERNAME", init$jpi, JPI$_USERNAME, cvt$text},
X    {"VERSION", init$syi, (SYI$_VERSION<<16)+8, cvt$text},
X    {"VIRTPEAK", init$jpi, JPI$_VIRTPEAK, cvt$numeric},
X    {"VOLUMES", init$jpi, JPI$_VOLUMES, cvt$numeric},
X    {"WHERE", init$jpi, JPI$_TERMINAL, cvt$where},
X    {"WHO", init$jpi, JPI$_USERNAME, cvt$who},
X    {"WSAUTH", init$jpi, JPI$_WSAUTH, cvt$numeric},
X    {"WSAUTHEXT", init$jpi, JPI$_WSAUTHEXT, cvt$numeric},
X    {"WSEXTENT", init$jpi, JPI$_WSEXTENT, cvt$numeric},
X    {"WSPEAK", init$jpi, JPI$_WSPEAK, cvt$numeric},
X    {"WSQUOTA", init$jpi, JPI$_WSQUOTA, cvt$numeric},
X    {"WSSIZE", init$jpi, JPI$_WSSIZE, cvt$numeric},
X    {"", 0, 0, format_literal}  };
X
X#else
Xglobalref struct ItemNode keywords[];
Xglobalref int max_keywords;
X#endif
X$EOD
X$ create/log LINK.COM
X$DECK
X$ link status, window, c/option
X$ link server, build, cleanup, compare, decnet, format, get, init, parse, -
X`009readport, lookup_terminal, lookup_who, pseudo, rtpad, telnet, -
X`009globaldef, devices, terminal, epid_to_ipid, c/option, -
X`009sys$system:sys.stb/sel
X$EOD
X$ create/log LOOKUP_TERMINAL.C
X$DECK
X#include string
X#include rms
X#define DEFAULT "sys$system:.location"
X#define FILENAME "status_terminals"
X
Xlookup_terminal(in,out,maxout)
X  char in[], out[];
X  int maxout; /* specifies how long 'out' is, including trailing NULL */
X{
X  /* this does a 'database' lookup and returns the result,
X     if not found, it returns the input as the output, and
X     returns a result of 0 */
X  static struct FAB fab;
X  static struct RAB rab;
X  static struct XABKEY xab;
X  int status;
X
X  if (fab.fab$b_bid == 0) {
X    /* initialize the FAB and RAB, open the file for indexed accessed */
X    fab = cc$rms_fab;
X    fab.fab$l_dna = DEFAULT;
X    fab.fab$b_dns = sizeof DEFAULT - 1;
X    fab.fab$b_fac = FAB$M_GET;
X    fab.fab$l_fna = FILENAME;
X    fab.fab$b_fns = sizeof FILENAME -1;
X    fab.fab$b_shr = FAB$M_SHRGET;
X    fab.fab$b_acmodes = 1; /* disable anything less then exec mode logical */
X    fab.fab$l_xab = &xab;
X    xab = cc$rms_xabkey; /* find out how large the key is */
X    /* note, code assumes there is ONE key, with only ONE segment, and
X       that the key starts at the beginning of the record. Everything
X       after the key will be returned */
X
X    status = sys$open(&fab);
X    if (! (status & 1)) {
X      strncpy(out,in,maxout); /* can't open file? return the input */
X      return(0);
X    };
X
X    rab = cc$rms_rab;
X    rab.rab$l_fab = &fab;
X    rab.rab$b_rac = RAB$C_KEY;
X    rab.rab$l_rop = RAB$M_NLK; /* why lock the record? */
X
X    status = sys$connect(&rab);
X    if (! (status & 1)) {
X      strncpy(out,in,maxout); /* can't connect rab? return the input */
X      return(0);
X    };
X  }
X
X  /* set up the key and buffer address/lengths */
X  rab.rab$l_kbf = in;
X  rab.rab$b_ksz = strlen(in);
X  rab.rab$l_ubf = out;
X  rab.rab$w_usz = maxout;
X
X  status = sys$get(&rab);
X  if (! (status & 1)) {
X    strncpy(out,in,maxout); /* not found? return the input */
X    return(0);
X  };
X
X
X  /* add a NULL to the end of the string */
X  out[rab.rab$w_rsz] = '\0';
X
X  /* okay, lets remove the key portion of the string */
X  strcpy(out,&out[xab.xab$b_siz0]);
X
X  return(1);
X}
X$EOD
X$ create/log LOOKUP_WHO.C
X$DECK
X#include string
X#include rms
X#define DEFAULT "sys$system:.names"
X#define FILENAME "status_who"
X
Xlookup_who(in,out,maxout)
X  char in[], out[];
X  int maxout; /* specifies how long 'out' is, including trailing NULL */
X{
X  /* this does a 'database' lookup and returns the result,
X     if not found, it returns the input as the output, and
X     returns a result of 0 */
X  static struct FAB fab;
X  static struct RAB rab;
X  static struct XABKEY xab;
X  int status;
X
X  if (fab.fab$b_bid == 0) {
X    /* initialize the FAB and RAB, open the file for indexed accessed */
X    fab = cc$rms_fab;
X    fab.fab$l_dna = DEFAULT;
X    fab.fab$b_dns = sizeof DEFAULT - 1;
X    fab.fab$b_fac = FAB$M_GET;
X    fab.fab$l_fna = FILENAME;
X    fab.fab$b_fns = sizeof FILENAME -1;
X    fab.fab$b_shr = FAB$M_SHRGET;
X    fab.fab$b_acmodes = 1; /* disable anything less then exec mode logical */
X    fab.fab$l_xab = &xab;
X    xab = cc$rms_xabkey; /* find out how large the key is */
X    /* note, code assumes there is ONE key, with only ONE segment, and
X       that the key starts at the beginning of the record. Everything
X       after the key will be returned */
X
X    status = sys$open(&fab);
X    if (! (status & 1)) {
X      strncpy(out,in,maxout); /* can't open file? return the input */
X      return(0);
X    };
X
X    rab = cc$rms_rab;
X    rab.rab$l_fab = &fab;
X    rab.rab$b_rac = RAB$C_KEY;
X    rab.rab$l_rop = RAB$M_NLK; /* why lock the record? */
X
X    status = sys$connect(&rab);
X    if (! (status & 1)) {
X      strncpy(out,in,maxout); /* can't connect rab? return the input */
X      return(0);
X    };
X  }
X
X  /* set up the key and buffer address/lengths */
X  rab.rab$l_kbf = in;
X  rab.rab$b_ksz = strlen(in);
X  rab.rab$l_ubf = out;
X  rab.rab$w_usz = maxout;
X
X  status = sys$get(&rab);
X  if (! (status & 1)) {
X    strncpy(out,in,maxout); /* not found? return the input */
X    return(0);
X  };
X
X
X  /* add a NULL to the end of the string */
X  out[rab.rab$w_rsz] = '\0';
X
X  /* okay, lets remove the key portion of the string */
X  strcpy(out,&out[xab.xab$b_siz0]);
X
X  return(1);
X}
X$EOD
X$ create/log MAKEFILE.
X$DECK
XC_MOD = server build cleanup compare decnet format get init\
X`009parse readport lookup_terminal lookup_who pseudo rtpad telnet
X
XMACRO_MOD = devices terminal epid_to_ipid
X
Xall : status server
X
Xdebug : statusd serverd
X
Xstatus.exe : status.obj window.obj
X`009link $?, c/option
X
Xstatusd : status.obj window.obj
X`009link/debug $?, c/option
X
Xserver.exe : globaldef.obj $(C_MOD).obj $(MACRO_MOD).obj
X`009link $(C_MOD), globaldef, $(MACRO_MOD), c/option, \
X`009`009sys\$system:sys.stb/sel
X
Xserverd : $(C_MOD).obj $(MACRO_MOD).obj
X`009link/debug $(C_MOD), globaldef, $(MACRO_MOD), c/option, \
X`009`009sys\$system:sys.stb/sel
X
X.c.obj :
X`009cc/debug $*
X
X.mar.obj :
X`009macro/debug $*
X
Xstatus.obj : $*.c globals.h
X
X$(MACRO_MOD).obj : $*.mar
X
Xglobaldef.obj : $*.c globals.h server.h keywords.h jpicodes.h
X
X$(C_MOD).obj : $*.c globals.h server.h jpicodes.h
X
X# keywords.h is built by order_keywords, using keywords.dat
Xkeywords.h : keywords.dat order_keywords.exe
X`009run order_keywords
X
X# jpicodes.h is built by the program jpicodes
Xjpicodes.h : jpicodes.exe
X`009run jpicodes
X
X# order_keywords reads keywords.dat and creates keywords.h
Xorder_keywords.exe : order_keywords.obj
X`009link order_keywords,c/option
X
Xorder_keywords.obj : order_keywords.c
X
Xjpicodes.exe : jpicodes.obj
X`009link jpicodes,c/option
X
Xjpicodes.obj : jpicodes.c
X$EOD
X$ create/log MEM.MAR
X$DECK
X`009.entry`009memcpy,^m<r2,r3,r4,r5>
X
X`009movc3`00912(ap),8(ap),4(ap)
X`009ret
X
X`009.entry`009memset,^m<r2,r3,r4,r5>
X
X`009movc5`009#0,#0,8(ap),12(ap),4(ap)
X`009ret
X
X`009.entry`009memcmp,^m<r2,r3,r4,r5>
X
X`009cmpc3`00912(ap),4(ap),8(ap)
X`009beql`00910$
X`009blss`00920$
X`009movl`009#1,r0
X`009ret
X10$:`009clrl`009r0
X`009ret
X20$:`009movl`009#-1,r0
X`009ret
X
X`009.end
X$EOD
X$ create/log MODIFY.DOC
X$DECK
XThe file KEYWORDS.DAT is used to add items to STATUS, each line in the
Xfile contains an item name, the name of an initialization routine,
Xan argument to be passed to the initialization routine, and the name
Xof a routine to convert the binary data into text. For example:
X`009ACCOUNT,init$jpi,JPI$_ACCOUNT,cvt$text
XThe above creates the item ACCOUNT, the routine "init$jpi" will
Xbe used to initialize the item lists (or whatever initialization
Xneeds to be done). The routine cvt$text converts it for output.
X
XThese items demonstrate an SYI item, and how to format the same item two
Xdifferent ways:
X`009BOOTTIME,init$syi,(SYI$_BOOTTIME<<16)+8,cvt$time
X`009UPTIME,init$syi,(SYI$_BOOTTIME<<16)+8,cvt$elapsed_time
X
XThe following item demonstrates how to get at "global" VMS variables.
XNote that GLOBAL_VALUES.H contains a "globalref SYS$GW_BJOBCNT", and if
Xyou add others, you will need to add them to GLOBAL_VALUES.H as well.
X`009BJOBCNT,init$global,SYS$GW_BJOBCNT,cvt$global_word
X
XThe following demonstrate other oddball routines, PAGES gets two
XJPI items at a time and adds them together. TIME just gets the current
Xtime, and doesn't really need to collect any info, the formatting
Xroutine can get the current time just fine, hence the cvt$dummy
Xroutine.
X`009PAGES,init$pages,0,cvt$pages
X`009TIME,init$dummy,0,cvt$current_time
X
XThe init routine can be found in INIT.C, the formatting routines
X(cvt$-whatever-) are in FORMAT.C . Note that they don't have to be,
XI've just been lazy and putting them all there.
X
XAfter you have modified KEYWORDS.DAT, you can use MAKE to create
Xnew versions of everything. If you don't have MAKE, then you
Xwill need to RUN ORDER_KEYWORDS, and recompile all the modules
Xthat reference KEYWORDS.H.
X
XIn a future update, I will hopefully have a document describing this
Xprocess, for now, you will need to look at the code and figure it out
Xon your own. Good luck (it shouldn't be too difficult).
X
X
XIf you make modifications that you would like to share, be sure to contact
Xme, and I'll try to get them added to future distributions.
X$EOD
X$ create/log ORDER_KEYWORDS.C
X$DECK
X#include stdio
X#include stdlib
X#include ctype
X#include time
X
Xint compare();
Xint allocate();
Xvoid write_node();
Xvoid write_routines();
X
Xstruct node {
X  struct node *left;
X  struct node *right;
X  unsigned short int reserved;
X  unsigned short int index;
X  unsigned char ptr[3];
X  unsigned char fill;
X  unsigned char str[132];
X};
X
X#define BUFSIZ 132
Xint flag;
XFILE *infile,*outfile;
X
Xchar *month[12] = {"Jan","Feb","Mar","Apr","May","Jun",
X                   "Jul","Aug","Sep","Oct","Nov","Dec"};
Xstruct node *head_name = 0, *head_init = 0, *head_format = 0,
X            *node = 0, *dummy = 0;
X
Xmain()
X{
X  struct tm *time_struct;
X  int time_val;
X  unsigned char str[BUFSIZ];
X  int index,nextchar;
X  int zero = 0;
X  int status,i;
X  int lines = 0, pm = 0;
X
X  if ((infile=fopen("KEYWORDS.DAT","r")) == NULL)
X    return;
X
X  if ((outfile=fopen("KEYWORDS.H","w")) == NULL)
X    return;
X
X  time(&time_val);
X  time_struct = localtime(&time_val);
X
X  while (fgets(str,BUFSIZ,infile)) {
X    if (str[0] != '!') {
X      ++lines;
X      /* compress all white space out of string */
X      index = 0;
X      while (index<strlen(str)) {
X        if (isspace(str[index])) {
X          nextchar = index + 1;
X          while (isspace(str[nextchar])) ++nextchar;
X          str[index] = str[nextchar];
X          str[nextchar] = ' ';
X        };
X        ++index;
X      };
X
X      /* insert this node into the 'item-name' tree */
X      status = lib$insert_tree(&head_name,str,&zero,compare,allocate,&node);
X      if (!(status & 1)) return(status);
X
X      /* insert this node into the 'init-routine' tree */
X      status = lib$insert_tree(&head_init,&(*node).str[node->ptr[0]],
X                               &zero,compare,allocate,&dummy);
X      if (!(status & 1)) return(status);
X
X      /* insert this node into the 'format-routine' tree */
X      status = lib$insert_tree(&head_format,&(*node).str[node->ptr[2]],
X                               &zero,compare,allocate,&dummy);
X      if (!(status & 1)) return(status);
X
X    };
X  };
X
X  /* traverse the trees, fill in the index */
X  i = 1;
X  traverse_tree(head_init,&i);
X  i = 1;
X  traverse_tree(head_format,&i);
X
X  if (time_struct->tm_hour > 12) {
X    pm = -1;
X    time_struct->tm_hour -= 12;
X  };
X
X  fprintf(outfile,"/* KEYWORDS.H Created on %d-%s-%d %d:%02d %s */\n\n",
X          time_struct->tm_mday,
X          month[time_struct->tm_mon],
X          time_struct->tm_year,
X          time_struct->tm_hour,
X          time_struct->tm_min,
X          pm?"pm":"am");
X  fprintf(outfile,"struct ItemNode {\n");
X  fprintf(outfile,"  char *name;\n");
X  fprintf(outfile,"  int (*init_routine)();\n");
X  fprintf(outfile,"  int ini_data;\n");
X  fprintf(outfile,"  int (*frmt_routine)();\n");
X  fprintf(outfile,"};\n");
X  fprintf(outfile,"\n");
X  fprintf(outfile,"#ifdef GLOBAL\n");
X  fprintf(outfile,"int /* declare all initialization routines */\n");
X  flag = 1;
X  write_routines(head_init,1);
X  fprintf(outfile,";\n");
X  fprintf(outfile,"int /* declare all formatting routines */\n");
X  flag = 1;
X  write_routines(head_format,1);
X  fprintf(outfile,",\n  format_literal();");
X  fprintf(outfile,";\n");
-+-+-+-+-+ End of part 4 +-+-+-+-+-
