<< ************************************************ >>                  00010000
<< *                                              * >>                  00012000
<< *     INCLLOG - User Logging Include File      * >>                  00014000
<< *                                              * >>                  00016000
<< ************************************************ >>                  00018000
                                                                        00020000
                                                                        00022000
EQUATE                                                                  00024000
   LIDDST   =  %41,                                                     00026000
   LOGSIR   =  %40,                                                     00028000
   LOGDST   =  %33;                                                     00030000
                                                                        00032000
<<******************* LOGTAB *************************>>                00034000
<< User Logging Table definitions -- DST #27 (%33)    >>                00036000
<<                                                    >>                00038000
<< There will be one entry in this table for every    >>                00040000
<< active user logging process.                       >>                00042000
                                                                        00044000
LOGICAL ARRAY LOGTAB(*) = DB;                                           00046000
BYTE ARRAY BLOGTAB(*)  = DB;                                            00048000
DOUBLE ARRAY DLOGTAB(*) = DB;                                           00050000
                                                                        00052000
DEFINE                                                                  00054000
                                                                        00056000
BTABINDEX  =  TABINDEX*2#,   << LOGTAB byte addresses >>                00058000
DTABINDEX  =  TABINDEX/2#;   << LOGTAB double addr.   >>                00060000
                                                                        00062000
                                                                        00064000
<< Entry #0 of LOGTAB >>                                                00066000
                                                                        00068000
EQUATE                                                                  00070000
                                                                        00072000
NUMENTRIES  =  0,    << Current number of entries           >>          00074000
FREE        =  1,    << Pointer to first free entry         >>          00076000
INUSE       =  2,    << Pointer to first entry being used   >>          00078000
BUFNUM      =  3,    << Last four digits of buffer name     >>          00080000
MAXLOGPROCS =  4,    << Max # user logging processes        >>          00082000
MAX'USR'PROC=  5,    << Max # users per log process         >>          00084000
LOGTAB'ESIZE=  7,    << Size of each entry in the LOGTAB    >>          00086000
                                                                        00088000
TENTRYSIZE  =  38;   << Each entry is 38 words              >>          00090000
                                                                        00092000
                                                                        00094000
<< Typical entry in the LOGTAB >>                                       00096000
                                                                        00098000
DEFINE                                                                  00100000
                                                                        00102000
LGNAME    =   BTABINDEX#,      << Logging identifier        >>          00104000
BNAME     =   BTABINDEX + 8  #,<< Buffer file name          >>          00106000
LFNAME    =   BTABINDEX + 16 #,<< Logging file name         >>          00108000
LFLOCKW   =   BTABINDEX + 24 #,<< Lockword - if disc        >>          00110000
LFGROUP   =   BTABINDEX + 32 #,<< Group file name - if disc >>          00112000
LFACCT    =   BTABINDEX + 40 #,<< Account file name -if disc>>          00114000
NUMUSERS  =   TABINDEX  + 24 #,<< # users on this log id    >>          00116000
DST       =   TABINDEX  + 25 #,<< DST of the LOGBUFF        >>          00118000
STATUS    =   TABINDEX  + 26 #,<< Status of logging process >>          00120000
LGTYPE    =   TABINDEX + 27).(8:8 #, << Type of log process >>          00122000
LGAUTO    =   TABINDEX + 27).(0:8 #, << Auto changelog flag >>          00124000
LGDEV     =   TABINDEX  + 28 #,<< Ldev of disc or disc buff.>>          00126000
PIN       =   TABINDEX  + 29 #,<< Logging process pin #     >>          00128000
LGSWITCH  =   TABINDEX  + 30 #,<< True if switch pending    >>          00130000
LGNEWTYPE =   TABINDEX +31).(8:8#,  << Type of new log file >>          00132000
LGNEWAUTO =   TABINDEX +31).(0:8#,  << Auto changelog flag  >>          00134000
LGADDR    =   DTABINDEX + 16 #,<< Address of logging buffer >>          00136000
BSIZE     =   DTABINDEX + 17 #,<< Size of logging buffer    >>          00138000
NEXT      =   TABINDEX  + 36 #,<< Pointer to next entry     >>          00140000
PREV      =   TABINDEX  + 37 #;<< Pointer to previous entry >>          00142000
                                                                        00144000
                                                                        00146000
<<**************** LOGBUFF ************************>>                   00148000
<< User Logging Buffer Table definitions.          >>                   00150000
<<                                                 >>                   00152000
<< This table has 50 words of global information,  >>                   00154000
<< one 25 word entry for every user accessing the  >>                   00156000
<< logging process (added via OPENLOG, deleted via >>                   00158000
<< CLOSELOG), and 4K buffer area.                  >>                   00160000
                                                                        00162000
LOGICAL ARRAY LOGBUFF(*) = DB;                                          00164000
INTEGER ARRAY ILOGBUFF(*) = DB;                                         00166000
BYTE ARRAY BLOGBUFF(*) = DB;                                            00168000
DOUBLE ARRAY DLOGBUFF(*) = DB;                                          00170000
                                                                        00172000
DEFINE                                                                  00174000
                                                                        00176000
BINDEX  =  INDEX*2#,   << LOGBUFF byte addresses   >>                   00178000
DINDEX  =  INDEX/2#,   << LOGBUFF double addresses >>                   00180000
                                                                        00182000
                                                                        00184000
<< Global information in the Logging Buffer (LOGBUFF) >>                00186000
                                                                        00188000
<< Byte indexes >>                                                      00190000
                                                                        00192000
LOGID     =  0#,     << Logging identifier                   >>         00194000
                                                                        00196000
<< Word indexes >>                                                      00198000
                                                                        00200000
SWITCH'   =  4#,     << True if switch pending               >>         00202000
NEWTYPE   = 5).(8:8#,<< Type of new log file                 >>         00204000
NEWAUTO   = 5).(0:8#,<< Auto flag for new log file           >>         00206000
LOGTYPE   = 6).(8:8#,<< Type of current log file             >>         00208000
AUTO      = 6).(0:8#,<< Auto flag for current log file       >>         00210000
BDST      =  7#,     << DST of the LOGBUFF                   >>         00212000
LOGPIN    =  8#,     << Pin of logging process               >>         00214000
NUMUSER   =  9#,     << Number of users accessing log process>>         00216000
MAXUSER'  = 10#,     << Maximum users allowed per process    >>         00218000
USERNO    = 11#,     << Next log number to assign            >>         00220000
SLPCT     = 12#,     << Number of users waiting for process  >>         00222000
STATE     = 13#,     << State of logging process             >>         00224000
MSG       = 14#,     << Internal message word                >>         00226000
LOGMSG    = 15#,     << Message from log process to user     >>         00228000
USERMSG   = 16#,     << Message from user to log process     >>         00230000
LOGERR    = 17#,     << Last error found                     >>         00232000
LOGDEV    = 18#,     << Ldev of disc - buffer file or logfile>>         00234000
BSPACE    = 19#,     << Space remaining in 4K buffer         >>         00236000
BUFUSED   = 20#,     << # records written in the 4K buffer   >>         00238000
VSETNO    = 21#,     << Number of this file in the set       >>         00240000
                                                                        00242000
<< Double indexes >>                                                    00244000
                                                                        00246000
LOGADDR   = 11#,     << Address of current extent            >>         00248000
INBUFREC  = 12#,     << Next record available in the extent  >>         00250000
FSIZE     = 13#,     << # Records in the current extent      >>         00252000
FSPACE'   = 14#,     << Space available in log buffer        >>         00254000
TRECS     = 15#,     << Total records written by this process>>         00256000
MAXFSPACE = 16#,     << Max file space useable - save 1 rec. >>         00258000
                                                                        00260000
<< Word indexes >>                                                      00262000
                                                                        00264000
LASTEXT'  = 34#,     << The last available extent in logfile >>         00266000
EXTENT    = 35#,     << Number of the current extent         >>         00268000
                                                                        00270000
<< Double index >>                                                      00272000
                                                                        00274000
RESOURCE  = 18#,     << For locking/unlocking this table     >>         00276000
                                                                        00278000
<< Word index >>                                                        00280000
                                                                        00282000
UHEAD     = 48#,     << Pointer to first entry in use list   >>         00284000
FHEAD     = 49#;     << Pointer to first entry in free list  >>         00286000
                                                                        00288000
<< Misc. LOGBUFF equates >>                                             00290000
                                                                        00292000
EQUATE                                                                  00294000
BENTRYSIZE=   25,    << Size of logbuff user entry           >>         00296000
BENTRYBASE=   2*BENTRYSIZE;  << Base of logbuff user entries >>         00298000
                                                                        00300000
                                                                        00302000
<< User entry definitions for LOGBUFF >>                                00304000
                                                                        00306000
DEFINE                                                                  00308000
                                                                        00310000
USER      =   BINDEX#,       << User's name                  >>         00312000
GROUP     =   BINDEX +  8#,  << User's log on group          >>         00314000
ACCT      =   BINDEX + 16#,  << User's log on account        >>         00316000
UPIN      =   INDEX  + 12#,  << User's pin number            >>         00318000
OPENCNT   =   INDEX  + 13#,  << Number of OPENLOGS for user  >>         00320000
WSTATE    =   INDEX  + 14#,  << State of user process        >>         00322000
ERROR     =   INDEX  + 15#,  << Last error code              >>         00324000
LGNUM     =   INDEX  + 16#,  << Log number for this user     >>         00326000
SCODE     =   INDEX  + 17#,  << Subsystem code - if priv.    >>         00328000
RECS      =   DINDEX +  9#,  << Number of records written    >>         00330000
NENTRY    =   INDEX  + 23#,  << Pointer to next user entry   >>         00332000
PENTRY    =   INDEX  + 24#,  << Pointer to prev. user entry  >>         00334000
                                                                        00336000
                                                                        00338000
<< Table relative pointer to top of 4K buffer area >>                   00340000
                                                                        00342000
BUFBASE   =   BENTRYBASE + LOGBUFF(MAXUSER') * BENTRYSIZE#;             00344000
                                                                        00346000
                                                                        00348000
<<******************** LIDTAB ******************************>>          00350000
<< User Logging Identifier Table -- DST #33 (%41).  This    >>          00352000
<< table will have an entry for every logid on the system.  >>          00354000
<< Entries created via :GETLOG and deleted via :RELLOG.     >>          00356000
                                                                        00358000
<< Entry # 0 definitions  >>                                            00360000
                                                                        00362000
EQUATE                                                                  00364000
                                                                        00366000
MENTRIES  =   1,   << Max. number of entries in the table   >>          00368000
LID'ESIZE =   4,   << Size of LIDTAB entries                >>          00370000
LIDESIZE  =  33,   << Each entry is 33 words                >>          00372000
EBASE     = LIDESIZE,  << Base of LIDTAB entries            >>          00374000
                                                                        00376000
<< Typical entry definitions  >>                                        00378000
                                                                        00380000
<< Byte entries  >>                                                     00382000
                                                                        00384000
LID       =   0,   << Logging identifier                    >>          00386000
PW        =   8,   << Password for logid                    >>          00388000
FNAME'    =  16,   << Log file name                         >>          00390000
LW        =  24,   << Disc file lockword                    >>          00392000
FGROUP    =  32,   << Disc file group                       >>          00394000
FACCT     =  40,   << Disc file account                     >>          00396000
UNAME     =  48,   << Creator's name                        >>          00398000
UACCT     =  56,   << Creator's account                     >>          00400000
                                                                        00402000
<< Word entries >>                                                      00404000
                                                                        00406000
TYP       =  32,   << Type of log process                   >>          00408000
                                                                        00410000
                                                                        00412000
<<************ LOGGING RECORD FORMAT **********************>>           00414000
                                                                        00416000
RNUM        =   0,   << Double -- record number              >>         00418000
CKSUM       =   2,   << Check sum                            >>         00420000
CODE        =   3,   << Type of logging record               >>         00422000
TIME        =   2,   << Double -- from CLOCK intrinsic       >>         00424000
DATE        =   6,   << From CALENDAR intrinsic              >>         00426000
LID'        =  14,   << 8 bytes -- logid                     >>         00428000
LNUM        =  11,   <<                                      >>         00430000
CREATOR     =  24,   << 24 bytes -- name, group, account     >>         00432000
LPIN        =  24,   << User's pin number                    >>         00434000
VSETNUM     =  25,   << The set number of the file -changelog>>         00436000
FILENAM     =  52,   << Filename field - changelog           >>         00438000
DEVTYPE     =  88,   << evice name for filenam - changelog  >>          00440000
LEN'        =   8,   << # words in user data area            >>         00442000
UAREA       =   9,   << Data area of the log record          >>         00444000
                                                                        00446000
DATAREA     = 119,   << # words of user data per log record  >>         00448000
                                                                        00450000
<< Log record values for CODE  >>                                       00452000
                                                                        00454000
OPEN        =   1,   << OPENLOG record                       >>         00456000
USER'SUB    =   2,   << User/subsystem record - WRITELOG     >>         00458000
CLOSE       =   3,   << CLOSELOG record                      >>         00460000
HEADER      =   4,   << When process is started              >>         00462000
TRAILER     =   5,   << When process is stoppped             >>         00464000
RSTART      =   6,   << When process is restarted            >>         00466000
CONT        =   7,   << Continuation of previous record      >>         00468000
CRASH       =   9,   << When file is recovered on warmstart  >>         00470000
TRAN'END    =  10,   << ENDLOG record                        >>         00472000
TRAN'BEGIN  =  11,   << BEGINLOG record                      >>         00474000
CHANGE'NEW  =  12,   << CHANGELOG record - last in "old" file>>         00476000
CHANGE'OLD  =  13,   << CHANGELOG record - first in "new" fil>>         00478000
                                                                        00480000
                                                                        00482000
<<************ MISC EQUATES *********************************>>         00484000
                                                                        00486000
<< State of user logging process >>                                     00488000
                                                                        00490000
INACT       =   0,           << Inactive log process         >>         00492000
ACT         =   1,           << Active log process           >>         00494000
RECOVERING  =   2,           << Recovering after warmstart   >>         00496000
INITIALIZING=  -1,           << Setting up from start/restart>>         00498000
                                                                        00500000
<< Values found in MSG field of LOGBUFF     >>                          00502000
                                                                        00504000
CONTINUE    =   6,           << Everything  is O.K.          >>         00506000
SUSPEND     =   2,           << Error - serial logfiles      >>         00508000
START       =   1,           << Start up                     >>         00510000
STOP        =   3,           << Stop as soon as numuser = 0  >>         00512000
RESTRT      =   5,           << Restart control message      >>         00514000
                                                                        00516000
NULL        =   -1,          <<                              >>         00518000
                                                                        00520000
<< Values for ATTACHIO parameters >>                                    00522000
                                                                        00524000
READ        =   0,                                                      00526000
WRITE       =   1,                                                      00528000
REWIND      =   5,                                                      00530000
FORWARDSPACE=   7,                                                      00532000
BKSPACE     =  12,                                                      00534000
                                                                        00536000
FLAGS       =   1,                                                      00538000
QMISC       =   0,                                                      00540000
                                                                        00542000
SUCCESS     =   1,        << Good return from ATTACHIO >>               00544000
                                                                        00546000
<< CCTL codes for FWRITEs to serial log file >>                         00548000
                                                                        00550000
SPECIAL'WRITE  =  %3001,    << SDISC,CTAPE - to set gap table>>         00552000
NORMAL'WRITE   =      0,                                                00554000
                                                                        00556000
<< Types of logging processes >>                                        00558000
                                                                        00560000
DISC        =   0,                                                      00562000
TAPE        =   1,                                                      00564000
SDISC       =   2,                                                      00566000
CTAPE       =   3,                                                      00568000
                                                                        00570000
<< Log file equates >>                                                  00572000
                                                                        00574000
LOG         = 1090,   << File code for disc log files >>                00576000
RECSIZE     = 128,    << Record size                  >>                00578000
RECSIZEM1   = RECSIZE -1,                                               00580000
BLKSIZE     = 4096,   << Block size                   >>                00582000
BLKFACTOR   =   32,                                                     00584000
                                                                        00586000
<< File System error codes                            >>                00588000
                                                                        00590000
SYSPOWERFAIL         = 89,   << System power failed   >>                00592000
TAPEPOWERFAIL        = 18,   << Device power failed   >>                00594000
                                                                        00596000
OUT'OF'GROUP'SPACE   = 61,                                              00598000
OUT'OF'ACCOUNT'SPACE = 62,                                              00600000
                                                                        00602000
<< System catalog set numbers                         >>                00604000
                                                                        00606000
SETNO          =  20, << User logging message set     >>                00608000
FSSETNO        =   8, << File System message set      >>                00610000
                                                                        00612000
<<*********** USER LOGGING MESSAGES ******************>>                00614000
                                                                        00616000
TOPENFAILED    =   1,   << FOPEN of tape log file failed     >>         00618000
BOPENFAILED    =   2,   << FOPEN failure on buffer file      >>         00620000
UOPENFAILED    =   3,   << Can't open disc log file          >>         00622000
NODSEG         =   4,   << No XDS available for LOGBUFF      >>         00624000
FLABELERR      =   5,   << File label error                  >>         00626000
BWRITEERROR    =   6,   << Error writing to log buffer file  >>         00628000
FWRITEERROR    =   7,   << Error writing to log file         >>         00630000
LOGFILEEOF     =   8,   << No more extents available         >>         00632000
OUTOFDISCSPACE =   9,   << Out of disc space                 >>         00634000
LOGPROCRUNS    =  10,   << Log process is running            >>         00636000
LOGPROCSTOP    =  11,   << Logging process is stopped        >>         00638000
LOGREC         =  12,   << Log file is recovered             >>         00640000
LOGRECERR      =  13,   << Error recovering log file         >>         00642000
NOLOGREC       =  14,   << Log file not recovered            >>         00644000
LOGRECOV       =  15,   << Recovering log file               >>         00646000
LOGRESTART     =  16,   << Log process restarted             >>         00648000
LOGEMPTY       =  17,   << Disc log file empty               >>         00650000
LOGSUSPENDED   =  18,   << Log process suspended             >>         00652000
INVALIDFILE    =  19,   << Invalid disc log file             >>         00654000
CANTSTART      =  20,   << Can't start Log Process           >>         00656000
LOGINUSE       =  21,   << Log process in use - term. pending>>         00658000
NOTEMPTY       =  22,   << Log file not empty, cannot start  >>         00660000
READERR        =  23,   << Read error while restarting       >>         00662000
BREADERROR     =  25,   << Error reading buffer file         >>         00664000
FCLOSEERROR    =  26,   << Error closing log file            >>         00666000
FREADERROR     =  27,   << Error reading from log file       >>         00668000
CANTRESTART    =  28,   << Can't restart log process         >>         00670000
PFAILERROR     =  29,   << Log file not recovered after pfail>>         00672000
BAD'USER'COUNT =  30,   << Max users/process is invalid      >>         00674000
TOOSMALL       =  31,   << Disc log file is too small        >>         00676000
TPOWERFAIL     =  32,   << Tape powefail detected            >>         00678000
                                                                        00680000
                                                                        00682000
<<******** CI MESSAGES - COMMAND PARSING ********************>>         00684000
                                                                        00686000
NOBACKREF       =  205,  << Backreference illegal            >>         00688000
NOSYSFILE       =  206,  << System files illegal             >>         00690000
FNAMELENGTH     =  532,  << Fname length > 8 characters      >>         00692000
NOTALPHAFNAME   =  530,  << Must begin with alpha char       >>         00694000
EXPECTEDLWORD   =  561,  << Expected lockword                >>         00696000
LOCKWORDLENGTH  =  562,  << Lock word length > 8 characters  >>         00698000
INVALIDCHAR     =  582,  << Must begin with alpha character  >>         00700000
PWLEN           = 1201,  << Password cannot be > 8 chars.    >>         00702000
EXPECTEDPW      = 1202,  << Expected password                >>         00704000
EXPECTEDEQ      = 1203,  << Expected "="                     >>         00706000
ILLEGALTYPE     = 1204,  << Illegal type parameter           >>         00708000
EXPECTEDCOMMA   = 1205,  << Expected ","                     >>         00710000
NIXLOGID        = 1206,  << Non-existent logging id          >>         00712000
DUPLICATE       = 1207,  << Duplicate logging identifier     >>         00714000
ILLEGALTAPEFILE = 1208,  << Illegal tape file name           >>         00716000
BUSY            = 1209,  << Logging process is busy          >>         00718000
MAXEXCEEDED     = 1210,  << Max # log ids exceeded           >>         00720000
INVALIDPARM     = 1211,  << Invalid parameter                >>         00722000
SECURITYVIOL    = 1212,  << Must be the creator              >>         00724000
INVALIDKEY      = 1213,  << Invalid keyword                  >>         00726000
EXPECTEDFNAME   = 1214,  << Expected file name               >>         00728000
EXPECTEDLNAME   = 1215,  << Expected log file name           >>         00730000
EXPECTEDLOGID   = 1225,  << Expected log id                  >>         00732000
LOGIDLENGTH     = 1226,  << Incorrect length                 >>         00734000
NOSPECHAR       = 1227,  << No special characters allowed    >>         00736000
ONEPARM         = 1229,  << Only one parameter for command   >>         00738000
NOLOGPROCRUN    = 1230,  << No logging processes running     >>         00740000
NOLOGID         = 1231,  << No log id assigned               >>         00742000
LOGPROCNORUN    = 1232,  << Logging process not running      >>         00744000
EXPASS          = 1233,  << Expected password                >>         00746000
CREPARM         = 1234,  << Param. only used by creator      >>         00748000
ILLEGALFILE     = 1250,  << File must reside in logon account>>         00750000
EXTRAPARM       = 1251,  << Extraneous parameter             >>         00752000
DUPKEYWORD      = 1252,  << Keyword already found            >>         00754000
EXPECTEDSEMI    = 1253,  << Expected ";"                     >>         00756000
NOTALPHALOGID   = 3812,  << Must start with alpha char.      >>         00758000
                                                                        00760000
                                                                        00762000
<<***** ERROR CODES FROM USER LOGGING INTRINSICS ************>>         00764000
                                                                        00766000
NWAITERR     =   1, << Process is busy -- nowait is illegal  >>         00768000
BOUNDSERR    =   2, << Parameter out of bounds               >>         00770000
NOLOGPROC    =   3, << Logging process not running           >>         00772000
INDEXERR     =   4, << Invalid index parameter               >>         00774000
MODEERR      =   5, << Incorrect value of mode parameter     >>         00776000
SUSPENDED    =   6, << Logging process is suspended          >>         00778000
ILLEGALCAP   =   7, << User must have LG or OP capability    >>         00780000
PASSERR      =   8, << Incorrect password                    >>         00782000
WRITEERR     =   9, << Error occurred while writing          >>         00784000
DISCSPACE    =  12, << No disc space available               >>         00786000
NOLOGENTRIES =  13, << No more logging entries available     >>         00788000
SECVIOL      =  14, << Security violation                    >>         00790000
EOFONLOGFILE =  15, << End of file on log file               >>         00792000
INVALIDLOGID =  16, << Logging identifier doesn't exist      >>         00794000
                                                                        00796000
<< Condition code equates   >>                                          00798000
                                                                        00800000
CCE       =  2,                                                         00802000
CCL       =  1,                                                         00804000
CCG       =  0;                                                         00806000
                                                                        00808000
<< Misc. defines    >>                                                  00810000
                                                                        00812000
DEFINE                                                                  00814000
                                                                        00816000
MYPIN      =  (ABSOLUTE(4) - ABSOLUTE(3))#,                             00818000
PDISABLE   =  ASSEMBLE(PSDB)#,                                          00820000
PENABLE    =  ASSEMBLE(PSEB)#;                                          00822000
                                                                        00824000
<< ************************************************ >>                  00826000
<< *                                              * >>                  00828000
<< *             End of INCLLOG                   * >>                  00830000
<< *                                              * >>                  00832000
<< ************************************************ >>                  00834000
