Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JOBLOG V1.5 -- a terminal session logger, part 05/06

6 views
Skip to first unread message

Leonard J. Peirce

unread,
Apr 4, 1995, 3:00:00 AM4/4/95
to
Submitted-by: pei...@gumby.cc.wmich.edu (Leonard J. Peirce)
Posting-number: Volume 7, Issue 53
Archive-name: joblog/part05
Supersedes: joblog: Volume 1, Issue 102-106

-+-+-+-+-+-+-+-+ START OF PART 5 -+-+-+-+-+-+-+-+
Vprocess`20*/
Xstatic`20$DESCRIPTOR(procname_d,procname);`20/*`20for`20getting`20process`20na
Vme`09`20`20`20`20`20`20*/
Xstatic`20$DESCRIPTOR(newpname_d,newpname);`20/*`20for`20creating`20new`20proce
Vss`20name`20`20`20`20`20*/
Xstatic`20$DESCRIPTOR(format_d,"JOBLOG_!XL");
X
X
X`20`20`20/*`20make`20sure`20that`20the`20user`20doesn't`20run`20JOBLOG`20while
V`20they`20are`20already`20in
X`20`20`20`20*`20JOBLOG
X`20`20`20`20*/
X
X`20`20`20item_code`20=`20JPI$_PRCNAM;
X`20`20`20status`20=`20LIB$GETJPI(`26item_code,0,0,0,`26procname_d,`26length);
V
X
X`20`20`20if(!(status`20`26`20SS$_NORMAL))
X`20`20`20`20`20`20LIB$STOP(status);
X
X`20`20`20procname`5Blength`5D`20=`20'`5C0';
X
X`20`20`20item_code`20=`20JPI$_OWNER;
X`20`20`20status`20=`20LIB$GETJPI(`26item_code,0,0,`26owner,0,0);
X
X`20`20`20if(!(status`20`26`20SS$_NORMAL))
X`20`20`20`20`20`20LIB$STOP(status);
X
X`20`20`20/*`20create`20what`20would`20the`20process`20name`20be`20if`20the`20u
Vser`20ran`20JOBLOG`20while
X`20`20`20`20*`20in`20JOBLOG
X`20`20`20`20*/
X
X`20`20`20status`20=`20SYS$FAO(`26format_d,`26length,`26newpname_d,owner`20`26
V`200xFFFF);
X
X`20`20`20if(!(status`20`26`20SS$_NORMAL))
X`20`20`20`20`20`20LIB$STOP(status);
X
X`20`20`20newpname`5Blength`5D`20=`20'`5C0';
X
X`20`20`20if(!strcmp(newpname,procname))
X`20`20`20`20`20`20LIB$STOP(JLG_INUSE);
X
X`20`20`20return;
X
X`7D`09/***`20joblog_check`20***/
X`0C
X/*****************************************************************************
V**
X******************************************************************************
V**
X
X`20`20Function:`09skim
X
X`20`20Purpose:`09Skim`20the`20JOBLOG`20staging`20directory`20for`20old`20JOBLO
VG`20files,`20de-
X`09`09leting`20them`20if`20they`20are`20older`20than`20the`20/WAIT`20value`20a
Vnd`20warning
X`09`09senders`20if`20they`20are`20older`20then`20the`20/WARN`20value.
X
X`20`20Formal`20Parameters:
X
X`09Name`09`09`09Description
X`09----`09`09`09-----------
X`09stage_dir`09`09staging`20directory`20for`20mailed`20log`20files
X
X`20`20Global`20variables:
X
X`09Name`09`09`09Examine/Modify/Use/Read/Write
X`09----`09`09`09-----------------------------
X`09none
X
X`20`20Return`20Codes:
X
X`09Code`09`09`09Reason
X`09----`09`09`09------
X`09none
X
X`20`20Termination`20Codes:
X
X`09Code`09`20`09`09Reason
X`09----`09`09`09------
X`09status
X
X******************************************************************************
V**
X******************************************************************************
V*/
X
Xstatic`20void`20skim(char`20*stage_dir)
X
X`7B`09/***`20skim`20***/
X`09`09`09`09`09/********`20`20`20LOCAL`20`20VARIABLES`20`20`20********/
X`09`20char`09`20`20*ptr;`09`09`09/*`20for`20skipping`20dev/directory`20spec`20
V`20`20`20*/
X`09`20ULONG`09`20`20fcontext,`09`09/*`20file`20context`20for`20getting`20file
V`20`20`20`20`20`20*/
X`09`09`20`20status,`09`09/*`20return`20code`20status`20holder`09`20`20`20`20
V`20`20*/
X`09`09`20`20wait_days,`09`09/*`20#`20days`20before`20deleting`20log`09`20`20
V`20`20`20`20*/
X`09`09`20`20warn_days,`09`09/*`20#`20days`20before`20warning`20people`09`20`20
V`20`20`20`20*/
X`09`09`20`20delete_time;`09`09/*`20time`20in`20secs`20when`20file`20is`20delet
Ved`20`20*/
X`09`20time_t`09`20`20cur_time,`09`09/*`20current`20time`20value`09`09`20`20`20
V`20`20`20*/
X`09`09`20`20elapsed_time;`09`09/*`20current`20time`20-`20file`20creation`20tim
Ve`20`20*/
X`09`20USHORT`09`20`20length;`09`09/*`20for`20trimming`20trailing`20blanks`09
V`20`20`20`20`20`20*/
Xstruct`09`20stat`09`20`20statbuf;`09`09/*`20for`20getting`20file's`20age`09`20
V`20`20`20`20`20*/
Xstruct`09`20tm`09`20`20*del_tm;`09`09/*`20for`20getting`20delete`20date`09`20
V`20`20`20`20`20*/
Xstatic`09`20char`09`20`20wildname`5BNAM$C_MAXRSS+1`5D,
X`09`09`20`20filename`5BNAM$C_MAXRSS+1`5D,
X`09`09`20`20buf`5BINT_STR_MAX+1`5D;`09/*`20for`20getting`20int`20strings`09`20
V`20`20`20`20`20*/
Xstatic`20$DESCRIPTOR(wild_d,wildname);
Xstatic`20$DESCRIPTOR(file_d,filename);
Xstatic`20$DESCRIPTOR(wait_d,"WAIT");
Xstatic`20$DESCRIPTOR(warn_d,"WARN");
Xstatic`20$DESCRIPTOR(buf_d,buf);
X
X
X`20`20`20if(CLI$PRESENT(`26wait_d)`20==`20CLI$_PRESENT)
X`20`20`20`7B
X`20`20`20`20`20`20/*`20get`20the`20class`20string`20*/
X
X`20`20`20`20`20`20status`20=`20CLI$GET_VALUE(`26wait_d,`26buf_d,`26length);
X
X`20`20`20`20`20`20if(status`20==`20SS$_NORMAL)
X`09`20buf`5Blength`5D`20=`20'`5C0';`09`09/*`20make`20it`20a`20string`09`09`20
V`20`20`20`20`20*/
X`20`20`20`20`20`20else
X`09`20LIB$STOP(status);
X
X`20`20`20`20`20`20wait_days`20=`20(ULONG)`20atol(buf);
X`20`20`20`7D
X
X`20`20`20if(CLI$PRESENT(`26warn_d)`20==`20CLI$_PRESENT)
X`20`20`20`7B
X`20`20`20`20`20`20/*`20get`20the`20class`20string`20*/
X
X`20`20`20`20`20`20status`20=`20CLI$GET_VALUE(`26warn_d,`26buf_d,`26length);
X
X`20`20`20`20`20`20if(status`20==`20SS$_NORMAL)
X`09`20buf`5Blength`5D`20=`20'`5C0';`09`09/*`20make`20it`20a`20string`09`09`20
V`20`20`20`20`20*/
X`20`20`20`20`20`20else
X`09`20LIB$STOP(status);
X
X`20`20`20`20`20`20warn_days`20=`20(ULONG)`20atol(buf);
X`20`20`20`7D
X
X`20`20`20fcontext`20=`200L;
X`20`20`20time(`26cur_time);
X`20`20`20strcpy(wildname,stage_dir);
X`20`20`20strcat(wildname,"*.*;*");`09`09/*`20look`20at`20all`20files`09`09`20
V`20`20`20`20`20*/
X`20`20`20wild_d.dsc$w_length`20=`20(USHORT)`20strlen(wildname);
X
X`20`20`20status`20=`20LIB$FIND_FILE(`26wild_d,`26file_d,`26fcontext);
X
X`20`20`20while(status`20==`20RMS$_NORMAL)
X`20`20`20`7B
X`20`20`20`20`20`20length`20=`200;
X
X`20`20`20`20`20`20while(length`20<`20NAM$C_MAXRSS`20`26`26`20filename`5Blength
V`5D`20!=`20'`20')
X`20`20`20`20`20`20`20`20`20++length;
X
X`20`20`20`20`20`20filename`5Blength`5D`20=`20'`5C0';`09`09/*`20make`20it`20a
V`20string`09`09`20`20`20`20`20`20*/
X`20`20`20`20`20`20stat(filename,`26statbuf);`09`09/*`20to`20find`20out`20how
V`20old`20it`20is`09`20`20`20`20`20`20*/
X
X`20`20`20`20`20`20/*`20should`20we`20delete`20or`20warn`20the`20sender`20and
V`20recipient?`20*/
X
X`20`20`20`20`20`20elapsed_time`20=`20cur_time`20-`20statbuf.st_atime;
X
X`20`20`20`20`20`20if(elapsed_time`20>`20(wait_days`20*`20SECONDS_IN_DAY))
X`09`20delete_log(filename);
X`20`20`20`20`20`20else`20if(elapsed_time`20>`20(warn_days`20*`20SECONDS_IN_DAY
V)`20`26`26
X`09`20`20`20`20`20`20elapsed_time`20<=`20(warn_days`20+`201)`20*`20SECONDS_IN_
VDAY)
X`20`20`20`20`20`20`7B
X`09`20delete_time`20=`20(ULONG)`20statbuf.st_ctime`20+`20(wait_days`20*`20SECO
VNDS_IN_DAY);
X`09`20del_tm`20=`20localtime(`26delete_time);
X`09`20ptr`20=`20(char`20*)`20(strchr(filename,'`5D')`20+`201L);
X`09`20warn(ptr,statbuf.st_ctime,del_tm->tm_mon,del_tm->tm_mday,
X`09`20`20`20`20`20`20del_tm->tm_year);
X`20`20`20`20`20`20`7D
X
X`20`20`20`20`20`20status`20=`20LIB$FIND_FILE(`26wild_d,`26file_d,`26fcontext);
V
X`20`20`20`7D
X
X`20`20`20return;
X
X`7D`09/***`20skim`20***/
X`0C
X/*****************************************************************************
V**
X******************************************************************************
V**
X
X`20`20Function:`09warn
X
X`20`20Purpose:`09Warn`20the`20sender`20and`20recipient`20of`20a`20logfile.
X
X`20`20Formal`20Parameters:
X
X`09Name`09`09`09Description
X`09----`09`09`09-----------
X`09filename`09`09log`20file`20name
X`09create_time`09`09when`20log`20file`20was`20created
X`09month,day,year`09`09date`20when`20log`20file`20will`20be`20deleted
X
X`20`20Global`20variables:
X
X`09Name`09`09`09Examine/Modify/Use/Read/Write
X`09----`09`09`09-----------------------------
X`09none
X
X`20`20Return`20Codes:
X
X`09Code`09`09`09Reason
X`09----`09`09`09------
X`09none
X
X******************************************************************************
V**
X******************************************************************************
V*/
X
Xstatic`20void`20warn(char`20*filename,UINT`20create_time,int`20month,int`20day
V,int`20year)
X
X`7B`09/***`20warn`20***/
X`09`09`09`09`09/********`20`20`20LOCAL`20`20VARIABLES`20`20`20********/
X`09`20ULONG`09`20`20status,`09`09/*`20return`20code`20status`20holder`09`20`20
V`20`20`20`20*/
X`09`09`20`20status2;
X`09`20USHORT`09`20`20verified,`09`09/*`20set`20if`20log`20file`20is`20verified
V`09`20`20`20`20`20`20*/
X`09`09`20`20length;`09`09/*`20length`20of`20formatted`20string`09`20`20`20`20
V`20`20*/
X`09`20char`09`20`20username`5BUSERNAME_MAX+1`5D,
X`09`09`20`20recipient`5BUSERNAME_MAX+1`5D,
X`09`09`20`20tempfile`5BNAM$C_MAXRSS+1`5D,
X`09`09`20`20command`5BCOMMAND_MAX+1`5D;
Xstatic`09`20char`09`20`20out_buf`5BBUFSIZ`5D,`09/*`20formatting`20and`20I/O`20
Vbuffer`09`20`20`20`20`20`20*/
X`09`09`20`20deadline_buf`5BBUFSIZ`5D;
Xstatic`09`20char`09`20`20*months`5B`5D`20=`20`7B"January","February","March","
VApril","May",
X`09`09`09`20`20`20`20`20`20`20"June","July","August","September","October",
X`09`09`09`20`20`20`20`20`20`20"November",`20"December"`7D;
Xstruct`09`20FAB`09`20`20out_fab;`09`09/*`20for`20creating`20mail`20message`20f
Vile`20`20`20`20`20*/
Xstruct`09`20RAB`09`20`20out_rab;
Xstatic`20$DESCRIPTOR(null_d,"NL:");
Xstatic`20$DESCRIPTOR(command_d,"");
Xstatic`20$DESCRIPTOR(out_buf_d,out_buf);
Xstatic`20$DESCRIPTOR(deadline_d,deadline_buf);
Xstatic`20$DESCRIPTOR(format_d,
X`09`20`20`20`20"If`20it`20is`20not`20retrieved,`20it`20will`20be`20deleted`20o
Vn`20!AS`20!ZL,`20!ZL.");
Xstatic`20$DESCRIPTOR(month_d,"");
X
X
X`20`20`20parse_filename(filename,username,recipient,`26verified);
X
X`20`20`20/*`20make`20a`20mail`20message`20for`20the`20recipient`20*/
X
X`20`20`20strcpy(tempfile,"JOBXXXXXX");
X`20`20`20mktemp(tempfile);
X`20`20`20strcat(tempfile,".TMP");
X
X`20`20`20out_rab`20=`20cc$rms_rab;
X`20`20`20out_rab.rab$l_fab`20=`20`26out_fab;`09/*`20pointer`20to`20input`20FAB
V`09`09`20`20`20`20`20`20*/
X`20`20`20out_rab.rab$b_rac`20=`20RAB$C_SEQ;`09/*`20sequential`20access`20for
V`20copy`09`20`20`20`20`20`20*/
X`20`20`20out_rab.rab$w_usz`20=`20sizeof(out_buf);`09/*`20length`20of`20output
V`20buffer`09`20`20`20`20`20`20*/
X`20`20`20out_rab.rab$l_rbf`20=`20out_buf;`09`09/*`20pointer`20to`20buffer`09
V`09`20`20`20`20`20`20*/
X
X`20`20`20out_fab`20=`20cc$rms_fab;
X`20`20`20out_fab.fab$w_ifi`20=`200;`20`09`09/*`20reset`20this!`09`09`09`20`20
V`20`20`20`20*/
X`20`20`20out_fab.fab$b_fac`20=`20FAB$M_PUT;
X
X`20`20`20out_fab.fab$l_fna`20=`20tempfile;
X`20`20`20out_fab.fab$b_fns`20=`20(UCHAR)`20strlen(tempfile);
X
X`20`20`20/*`20open`20the`20output`20file`20*/
X
X`20`20`20status`20=`20SYS$CREATE(`26out_fab);
X
X`20`20`20if(status`20!=`20RMS$_NORMAL)
X`20`20`20`7B
X`20`20`20`20`20`20SYS$CLOSE(`26out_fab);
X`20`20`20`20`20`20LIB$SIGNAL(status);
X`20`20`20`20`20`20return;
X`20`20`20`7D
X
X`20`20`20/*`20connect`20the`20output`20file's`20RMS`20blocks`20*/
X
X`20`20`20status`20=`20SYS$CONNECT(`26out_rab);
X
X`20`20`20if(status`20!=`20RMS$_NORMAL)
X`20`20`20`7B
X`20`20`20`20`20`20SYS$CLOSE(`26out_fab);
X`20`20`20`20`20`20LIB$SIGNAL(status);
X`20`20`20`20`20`20return;
X`20`20`20`7D
X
X`20`20`20/*`20warn`20the`20recipient`20*/
X
X`20`20`20if(verified)
X`20`20`20`20`20`20cat(out_buf,"There`20is`20a`20VERIFIED`20JOBLOG`20log`20file
V`20from`20",username,
X`09`09`20`20"`20waiting`20to");
X`20`20`20else
X`20`20`20`20`20`20cat(out_buf,"There`20is`20an`20UNVERIFIED`20JOBLOG`20log`20f
Vile`20from`20",username,
X`09`09`20`20"`20waiting`20to");
X
X`20`20`20out_rab.rab$w_rsz`20=`20(USHORT)`20strlen(out_buf);
X`20`20`20status`20=`20SYS$PUT(`26out_rab);
X
X`20`20`20strcpy(out_buf,"be`20retrieved.`20`20To`20retrieve`20it,`20enter");
X`20`20`20out_rab.rab$w_rsz`20=`20(USHORT)`20strlen(out_buf);
X`20`20`20status`20=`20SYS$PUT(`26out_rab);
X
X`20`20`20out_buf`5B0`5D`20=`20'`5C0';
X`20`20`20out_rab.rab$w_rsz`20=`200;
X`20`20`20status`20=`20SYS$PUT(`26out_rab);
X
X`20`20`20cat(out_buf,"`09JOBLOG/RETRIEVE/USER=",username);
X`20`20`20out_rab.rab$w_rsz`20=`20(USHORT)`20strlen(out_buf);
X`20`20`20status`20=`20SYS$PUT(`26out_rab);
X
X`20`20`20out_buf`5B0`5D`20=`20'`5C0';
X`20`20`20out_rab.rab$w_rsz`20=`200;
X`20`20`20status`20=`20SYS$PUT(`26out_rab);
X
X`20`20`20month_d.dsc$a_pointer`20=`20months`5Bmonth`5D;
X`20`20`20month_d.dsc$w_length`20=`20(USHORT)`20strlen(months`5Bmonth`5D);
X
X`20`20`20status`20=`20SYS$FAO(`26format_d,`26length,`26deadline_d,`26month_d,d
Vay,year`20+`201900);
X
X`20`20`20if(!(status`20`26`20SS$_NORMAL))
X`20`20`20`20`20`20return;
X
X`20`20`20strmcpy(out_buf,deadline_buf,length);
X`20`20`20out_rab.rab$w_rsz`20=`20(USHORT)`20strlen(out_buf);
X
X`20`20`20status`20=`20SYS$PUT(`26out_rab);
X
X`20`20`20status`20=`20SYS$CLOSE(`26out_fab);
X
X`20`20`20if(status`20!=`20RMS$_NORMAL)
X`20`20`20`7B
X`20`20`20`20`20`20LIB$SIGNAL(status);
X`20`20`20`20`20`20return;
X`20`20`20`7D
X
X`20`20`20if(verified)
X`20`20`20`20`20`20cat(command,"$MAIL/SUBJECT=`5C"VERIFIED`20JOBLOG`20from`20",
Vusername,
X`09`20`20"`20is`20still`20pending`5C"`20",tempfile,"`20",recipient);
X`20`20`20else
X`20`20`20`20`20`20cat(command,"$MAIL/SUBJECT=`5C"VERIFIED`20JOBLOG`20from`20",
Vusername,
X`09`20`20"`20is`20still`20pending`5C"`20",tempfile,"`20",recipient);
X
X`20`20`20command_d.dsc$a_pointer`20=`20command;
X`20`20`20command_d.dsc$w_length`20=`20(USHORT)`20strlen(command);
X
X`20`20`20/*`20now`20try`20to`20spawn`20the`20command`20to`20mail`20the`20notic
Ve`20*/
X
X`20`20`20status`20=`20LIB$SPAWN(`26command_d,`26null_d,`26null_d,NULL,NULL,0L,
V`26status2,0L,0L,
X`09`09`20`20`20`20`20`200L,0L,NULL,NULL);
X
X`20`20`20delete(tempfile);`09`09`09/*`20kill`20it`20before`20we`20forget`09`20
V`20`20`20`20`20*/
X
X`20`20`20if(!(status`20`26`20SS$_NORMAL))
X`20`20`20`7B
X`20`20`20`20`20`20LIB$SIGNAL(JLG_NO_SPAWN);
X`20`20`20`20`20`20return;
X`20`20`20`7D
X
X`20`20`20/*`20now`20warn`20the`20sender`20*/
X
X`20`20`20out_fab.fab$w_ifi`20=`200;`20`09`09/*`20reset`20this!`09`09`09`20`20
V`20`20`20`20*/
X
X`20`20`20status`20=`20SYS$CREATE(`26out_fab);
X
X`20`20`20if(status`20!=`20RMS$_NORMAL)
X`20`20`20`7B
X`20`20`20`20`20`20LIB$SIGNAL(status);
X`20`20`20`20`20`20return;
X`20`20`20`7D
X
X`20`20`20/*`20reconnect`20the`20output`20file's`20RMS`20blocks`20*/
X
X`20`20`20status`20=`20SYS$CONNECT(`26out_rab);
X
X`20`20`20if(status`20!=`20RMS$_NORMAL)
X`20`20`20`7B
X`20`20`20`20`20`20SYS$CLOSE(`26out_fab);
X`20`20`20`20`20`20LIB$SIGNAL(status);
X`20`20`20`20`20`20return;
X`20`20`20`7D
X
X`20`20`20/*`20warn`20the`20recipient`20*/
X
X`20`20`20cat(out_buf,"The`20JOBLOG`20log`20file`20you`20sent`20to`20",recipien
Vt,
X`20`20`20`20`20`20`20"`20has`20not`20been`20retrieved.");
X`20`20`20out_rab.rab$w_rsz`20=`20(USHORT)`20strlen(out_buf);
X
X`20`20`20status`20=`20SYS$PUT(`26out_rab);
X
X`20`20`20strcpy(out_buf,deadline_buf);
X`20`20`20out_rab.rab$w_rsz`20=`20(USHORT)`20strlen(out_buf);
X
X`20`20`20status`20=`20SYS$PUT(`26out_rab);
X
X`20`20`20status`20=`20SYS$CLOSE(`26out_fab);
X
X`20`20`20if(status`20!=`20RMS$_NORMAL)
X`20`20`20`7B
X`20`20`20`20`20`20LIB$SIGNAL(status);
X`20`20`20`20`20`20return;
X`20`20`20`7D
X
X`20`20`20cat(command,"$MAIL/SUBJECT=`5C"JOBLOG`20logfile`20for`20",recipient,
V
X`20`20`20`20`20`20`20"`20not`20retrieved`5C"`20",tempfile,"`20",username);
X
X`20`20`20command_d.dsc$w_length`20=`20(USHORT)`20strlen(command);
X
X`20`20`20/*`20now`20try`20to`20spawn`20the`20command`20to`20mail`20the`20notic
Ve`20*/
X
X`20`20`20status`20=`20LIB$SPAWN(`26command_d,`26null_d,`26null_d,NULL,NULL,0L,
V`26status2,0L,0L,
X`09`09`20`20`20`20`20`200L,0L,NULL,NULL);
X
X`20`20`20delete(tempfile);`09`09`09/*`20kill`20it`20before`20we`20forget`09`20
V`20`20`20`20`20*/
X
X`20`20`20if(!(status`20`26`20SS$_NORMAL))
X`20`20`20`20`20`20LIB$SIGNAL(JLG_NO_SPAWN);
X
X`20`20`20return;
X
X`7D`09/***`20warn`20***/
X`0C
X/*****************************************************************************
V**
X******************************************************************************
V**
X
X`20`20Function:`09parse_filename
X
X`20`20Purpose:`09Parse`20a`20filename`20and`20extract`20the`20username,`20reci
Vpient,`20and
X`09`09the`20verified`20status.`20`20The`20form`20of`20the`20filename`20is
X
X`09`09from_to_account.flag_joblog_dd_mm_yy_hh_mm
X
X`09`09where`20flag`20is`20V`20for`20VERIFIED`20log`20files`20and`20U`20for`20U
VNVERIFIED
X`09`09log`20files.
X
X`20`20Formal`20Parameters:
X
X`09Name`09`09`09Description
X`09----`09`09`09-----------
X`09filename`09`09filename`20to`20be`20parsed
X`09username`09`09username`20to`20be`20returned
X`09recipient`09`09recipient`20to`20be`20returned
X`09verified`09`09set`20if`20log`20file`20is`20verified
X
X`20`20Global`20variables:
X
X`09Name`09`09`09Examine/Modify/Use/Read/Write
X`09----`09`09`09-----------------------------
X`09none
X
X`20`20Return`20Codes:
X
X`09Code`09`09`09Reason
X`09----`09`09`09------
X`09none
X
X******************************************************************************
V**
X******************************************************************************
V*/
X
Xstatic`20void`20parse_filename(char`20*filename,char`20*username,char`20*recip
Vient,
X`09`09`09`20`20`20USHORT`20*verified)
X
X`7B`09/***`20parse_filename`20***/
X`09`09`09`09`09/********`20`20`20LOCAL`20`20VARIABLES`20`20`20********/
X`09`20char`09`20`20*ptr,`09`09`09/*`20to`20parse`20parts`20of`20the`20filename
V`20`20`20`20`20*/
X`09`09`20`20*ptr2;`09`09/*`20ditto....`09`09`09`20`20`20`20`20`20*/
X`09`20int`09`20`20length;`09`09/*`20length`20to`20be`20copied`09`09`20`20`20
V`20`20`20*/
X
X
X`20`20`20/*`20get`20the`20sender`20name`20*/
X
X`20`20`20ptr`20=`20strchr(filename,'_');
X`20`20`20length`20=`20ptr`20-`20filename;
X
X`20`20`20if(username`20!=`20NULL)
X`20`20`20`20`20`20strmcpy(username,filename,ptr`20-`20filename);
X
X`20`20`20ptr++;`09`09`09`09/*`20start`20at`20recipient`09`09`20`20`20`20`20`20
V*/
X
X`20`20`20/*`20get`20the`20recipient`20name`20*/
X
X`20`20`20ptr2`20=`20strchr(ptr,'_');
X`20`20`20length`20=`20ptr2`20-`20ptr;
X
X`20`20`20if(recipient`20!=`20NULL)
X`20`20`20`20`20`20strmcpy(recipient,ptr,length);
X
X`20`20`20ptr`20=`20strchr(ptr2,'.');
X
X`20`20`20if(verified`20!=`20NULL)
X`20`20`20`7B
X`20`20`20`20`20`20if(*(ptr`20+`201)`20==`20`20'V')
X`09`20*verified`20=`20TRUE;
X`20`20`20`20`20`20else
X`09`20*verified`20=`20FALSE;
X`20`20`20`7D
X
X`20`20`20return;
X
X`7D`09/***`20parse_filename`20***/
X`0C
X/*****************************************************************************
V**
X******************************************************************************
V**
X
X`20`20Function:`09squeeze_str
X
X`20`20Purpose:`09Squeeze`20the`20whitespace`20characters`20out`20of`20a`20stri
Vng
X
X`20`20Formal`20Parameters:
X
X`09Name`09`09`09Description
X`09----`09`09`09-----------
X`09str`09`09`09string`20to`20be`20squeezed
X
X`20`20Global`20variables:
X
X`09Name`09`09`09Examine/Modify/Use/Read/Write
X`09----`09`09`09-----------------------------
X`09none
X
X`20`20Return`20Codes:
X
X`09Code`09`09`09Reason
X`09----`09`09`09------
X`09none
X
X******************************************************************************
V**
X******************************************************************************
V*/
X
Xstatic`20void`20squeeze_str(register`20char`20*str)
X
X`7B`09/***`20squeeze_str`20***/
X`09`09`09`09`09/********`20`20`20LOCAL`20`20VARIABLES`20`20`20********/
Xregister`20char`09`20`20*ptr;`09`09`09/*`20temporary`20pointer`09`09`20`20`20
V`20`20`20*/
X
X
X`20`20`20ptr`20=`20str;
X
X`20`20`20while(*ptr)
X`20`20`20`7B
X`20`20`20`20`20`20if(!isspace(*ptr))
X`09`20*str++`20=`20*ptr++;
X`20`20`20`20`20`20else
X`09`20ptr++;
X`20`20`20`7D
X
X`20`20`20*str`20=`20'`5C0';`09`09`09`09/*`20make`20sure`20it's`20a`20string`09
V`20`20`20`20`20`20*/
X`20`20`20return;
X
X`7D`09/***`20squeeze_str`20***/
X`0C
X/*****************************************************************************
V**
X******************************************************************************
V**
X
X`20`20Function:`09my_puts
X
X`20`20Purpose:`09Output`20a`20string`20to`20the`20screen
X
X`20`20Formal`20Parameters:
X
X`09Name`09`09`09Description
X`09----`09`09`09-----------
X`09buffer`09`09`09string`20to`20be`20displayed
X
X`20`20Global`20variables:
X
X`09Name`09`09`09Examine/Modify/Use/Read/Write
X`09----`09`09`09-----------------------------
X`09tt_chan`09`09`09`09`09X
X
X`20`20Return`20Codes:
X
X`09Code`09`09`09Reason
X`09----`09`09`09------
X`09none
X
X`20`20Termination`20Codes:
X
X`09Code`09`20`09`09Reason
X`09----`09`09`09------
X`09status`09`09`09write`20to`20TTY`20failed
X`09iosb.status
X
X******************************************************************************
V**
X******************************************************************************
V*/
X
Xstatic`20void`20my_puts(char`20*buffer)
X
X`7B`09/***`20my_puts`20***/
X`09`09`09`09`09/********`20`20`20LOCAL`20`20VARIABLES`20`20`20********/
Xregister`20ULONG`09`20`20status,`09`09/*`20return`20code`20status`20holder`09
V`20`20`20`20`20`20*/
X`09`09`20`20length;`09`09/*`20length`20of`20string`20to`20be`20written`20`20
V`20`20`20*/
Xstatic`09`20IOSB_DEF`20iosb;`09`09`09/*`20I/O`20status`20block`20for`20write
V`09`20`20`20`20`20`20*/
X
X
X`20`20`20length`20=`20(ULONG)`20strlen(buffer);
X`20`20`20status`20=`20SYS$QIOW(0,tt_chan,IO$_WRITEVBLK,`26iosb,0,0,buffer,leng
Vth,0,32,0,0);
X
X`20`20`20if(!(status`20`26`20SS$_NORMAL))
X`20`20`20`20`20`20LIB$STOP(status);
X
X`20`20`20if(iosb.status`20!=`20SS$_NORMAL)
X`20`20`20`20`20`20LIB$STOP(iosb.status);
X
X`20`20`20return;
X
X`7D`09/***`20my_puts`20***/
X`0C
X/*****************************************************************************
V**
X******************************************************************************
V**
X
X`20`20Function:`09my_gets
X
X`20`20Purpose:`09Get`20a`20string`20from`20the`20screen`20without`20using`20C
V`20I/O.
X
X`20`20Formal`20Parameters:
X
X`09Name`09`09`09Description
X`09----`09`09`09-----------
X`09channel`09`09`09TTY`20channel
X`09buffer`09`09`09where`20input`20string`20is`20stored
X`09prompt`09`09`09prompt`20string
X`09length`09`09`09length`20of`20input`20string
X`09buflen`09`09`09size`20of`20buffer
X
X`20`20Global`20variables:
X
X`09Name`09`09`09Examine/Modify/Use/Read/Write
X`09----`09`09`09-----------------------------
X`09none
X
X`20`20Return`20Codes:
X
X`09Code`09`09`09Reason
X`09----`09`09`09------
X`09SUCCESS
X`09FAILURE
X`09CANCEL
X
X******************************************************************************
V**
X******************************************************************************
V*/
X
Xstatic`20ULONG`20my_gets(USHORT`20channel,char`20*buffer,char`20*prompt,USHORT
V`20*length,
X`09`09`20`20`20`20`20USHORT`20buflen)
X
X`7B`09/***`20my_gets`20***/
X`09`09`09`09`09/********`20`20`20LOCAL`20`20VARIABLES`20`20`20********/
X`09`20ULONG`09`20`20status,`09`09/*`20return`20code`20status`20holder`09`20`20
V`20`20`20`20*/
X`09`09`20`20retval;`09`09/*`20return`20value`09`09`09`20`20`20`20`20`20*/
X`09`20IOSB_DEF`20iosb;`09`09`09/*`20I/O`20status`20block`09`09`20`20`20`20`20
V`20*/
Xstatic`20$DESCRIPTOR(prompt_d,"");`09/*`20used`20for`20prompt`20string`09`20
V`20`20`20`20`20*/
Xstatic`20$DESCRIPTOR(buffer_d,"");`09/*`20for`20input`20buffer`09`09`20`20`20
V`20`20`20*/
X
X
X`20`20`20status`20=`20SYS$QIOW(0,channel,IO$_READVBLK`7CIO$_READPROMPT,`26iosb
V,0,0,buffer,
X`09`09`09(ULONG)`20buflen,0,0,prompt,strlen(prompt));
X
X`20`20`20if(!(status`20`26`20SS$_NORMAL))
X`20`20`20`20`20`20return(FAILURE);
X
X`20`20`20if(iosb.terminator`20==`200)
X`20`20`20`7B
X`20`20`20`20`20`20/*`20user`20pressed`20`5EC`20or`20`5EY`20*/
X
X`20`20`20`20`20`20buffer`5B0`5D`20=`20'`5C0';
X`20`20`20`20`20`20return(CANCEL);
X`20`20`20`7D
X`20`20`20else`20if(iosb.terminator`20==`20CONTROL_Z`20`26`26`20iosb.count`20==
V`200)
X`20`20`20`7B
X`20`20`20`20`20`20buffer`5B0`5D`20=`20CARRIAGE_RETURN;
X`20`20`20`20`20`20buffer`5B1`5D`20=`20'`5C0';
X`20`20`20`20`20`20return(SUCCESS);
X`20`20`20`7D
X
X`20`20`20buffer`5Biosb.count`5D`20=`20'`5C0';`09`09/*`20make`20it`20a`20string
V`09`09`20`20`20`20`20`20*/
X`20`20`20*length`20=`20iosb.count;
X`20`20`20return(SUCCESS);
X
X`7D`09/***`20my_gets`20***/
X`0C
X/*****************************************************************************
V**
X******************************************************************************
V**
X
X`20`20Function:`09kill_log
X
X`20`20Purpose:`09Kill`20the`20log`20file`20during`20an`20ungraceful`20exit.
X
X`20`20Formal`20Parameters:
X
X`09Name`09`09`09Description
X`09----`09`09`09-----------
X`09none
X
X`20`20Global`20variables:
X
X`09Name`09`09`09Examine/Modify/Use/Read/Write
X`09----`09`09`09-----------------------------
X`09log_fab`09`09`09`09`09X
X`09logfile`09`09`09`09`09X
X`09privs`09`09`09`09`20`20X`09X
X
X`20`20Return`20Codes:
X
X`09Code`09`09`09Reason
X`09----`09`09`09------
X`09none
X
X******************************************************************************
V**
X******************************************************************************
V*/
X
Xstatic`20void`20kill_log(void)
X
X`7B`09/***`20kill_log`20***/
X`09`09`09`09`09/********`20`20`20LOCAL`20`20VARIABLES`20`20`20********/
X`09`20ULONG`09`20`20status;`09`09/*`20return`20code`20status`20holder`09`20`20
V`20`20`20`20*/
X
X
X`20`20`20privs`5B0`5D`20=`20PRV$M_SYSPRV;`09`09/*`20so`20we`20can`20get`20to
V`20the`20log`20directory`20*/
X
X`20`20`20status`20=`20SYS$SETPRV(ON,`26privs,FALSE,NULL);
X
X`20`20`20if(!(status`20`26`20SS$_NORMAL))
X`20`20`20`20`20`20LIB$STOP(status);
X
X`20`20`20SYS$CLOSE(`26log_fab);
X`20`20`20delete(logfile);
X
X`20`20`20status`20=`20SYS$SETPRV(OFF,`26privs,FALSE,NULL);
X
X`20`20`20if(!(status`20`26`20SS$_NORMAL))
X`20`20`20`20`20`20LIB$STOP(status);
X
X`20`20`20return;
X
X`7D`09/***`20kill_log`20***/
X`0C
X/*****************************************************************************
V**
X******************************************************************************
V**
X
X`20`20Function:`09quit2
X
X`20`20Purpose:`09Secondary`20exit`20handler`20called`20from`20the`20primary`20
Vhandler`20to
X`09`09help`20ensure`20that`20no`20old`20log`20files`20are`20left`20around.
X
X`20`20Formal`20Parameters:
X
X`09Name`09`09`09Description
X`09----`09`09`09-----------
X`09none
X
X`20`20Global`20variables:
X
X`09Name`09`09`09Examine/Modify/Use/Read/Write
X`09----`09`09`09-----------------------------
X`09logfile`09`09`09`09`09X
X
X`20`20Return`20Codes:
X
X`09Code`09`09`09Reason
X`09----`20`09`09`09------
X`09none
X
X******************************************************************************
V**
X******************************************************************************
V*/
X
Xstatic`20void`20quit2(void)
X
X`7B`09/***`20quit2`20***/
X
X`20`20`20delete_log(logfile);
X`20`20`20exit(0);
X
X`7D`09/***`20quit2`20***/
X`0C
X/*****************************************************************************
V**
X******************************************************************************
V**
X
X`20`20Function:`09subprocess_exit
X
X`20`20Purpose:`09Called`20when`20the`20subprocess`20is`20terminated.`20`20Just
V`20set`20the
X`09`09hangup`20flag`20and`20exit`20and`20let`20the`20exit`20handler`20do`20the
V`20rest.
X
X`20`20Formal`20Parameters:
X
X`09Name`09`09`09Description
X`09----`09`09`09-----------
X`09none
X
X`20`20Global`20variables:
X
X`09Name`09`09`09Examine/Modify/Use/Read/Write
X`09----`09`09`09-----------------------------
X`09flags.hangup`09`09`20`20`20X
X`09clean_exit`09`09`09`20`20X
X
X`20`20Return`20Codes:
X
X`09Code`09`09`09Reason
X`09----`20`09`09`09------
X`09SUCCESS
X`09FAILURE
X
X******************************************************************************
V**
X******************************************************************************
V*/
X
Xstatic`20void`20subprocess_exit(void)
X
X`7B`09/***`20subprocess_exit`20***/
X
X`20`20`20if(flags.hangups)
X`20`20`20`7B
X`20`20`20`20`20`20clean_exit`20=`20TRUE;`09`09/*`20"normal"`20exit`20if`20we
V`20get`20here`09`20`20`20`20`20`20*/
X`20`20`20`20`20`20exit(1);
X`20`20`20`7D
X
X`20`20`20return;
X
X`7D`09/***`20subprocess_exit`20***/
X`0C
X/*****************************************************************************
V**
X******************************************************************************
V**
X
X`20`20Function:`09delete_log
X
X`20`20Purpose:`09Delete`20a`20log`20file`20from`20the`20log`20area.`20`20SYSPR
VV`20is`20needed`20to
X`09`09do`20this`20so`20we`20turn`20it`20on,`20delete`20the`20file,`20and`20tur
Vn`20it`20off.
X
X`20`20Formal`20Parameters:
X
X`09Name`09`09`09Description
X`09----`09`09`09-----------
X`09logfile`09`09`09name`20of`20log`20file`20to`20be`20deleted
X
X`20`20Global`20variables:
X
X`09Name`09`09`09Examine/Modify/Use/Read/Write
X`09----`09`09`09-----------------------------
X`09privs`09`09`09`09`20`20X`09X
X
X`20`20Return`20Codes:
X
X`09Code`09`09`09Reason
X`09----`20`09`09`09------
X`09SUCCESS
X`09FAILURE
X
X******************************************************************************
V**
X******************************************************************************
V*/
X
Xstatic`20USHORT`20delete_log(char`20*logfile)
X
X`7B`09/***`20delete_log`20***/
X`09`09`09`09`09/********`20`20`20LOCAL`20`20VARIABLES`20`20`20********/
X`09`20ULONG`09`20`20status;`09`09/*`20return`20code`20status`20holder`09`20`20
V`20`20`20`20*/
X
X
X`20`20`20privs`5B0`5D`20=`20PRV$M_SYSPRV;`09`09/*`20need`20SYSPRV`20to`20delet
Ve`20the`20log`20file`20*/
X
X`20`20`20status`20=`20SYS$SETPRV(ON,`26privs,FALSE,NULL);
X
X`20`20`20if(!(status`20`26`20SS$_NORMAL))
X`20`20`20`20`20`20return(FAILURE);
X
X`20`20`20delete(logfile);
X
X`20`20`20status`20=`20SYS$SETPRV(OFF,`26privs,FALSE,NULL);
X
X`20`20`20if(!(status`20`26`20SS$_NORMAL))
X`20`20`20`20`20`20return(FAILURE);
X
X`20`20`20return(SUCCESS);
X
X`7D`09/***`20delete_log`20***/
$ call unpack JOBLOG.C;230 103442686 "" 277 5 11
$!
$ create 'f'
X1`20JOBLOG
X!`20JOBLOG.HLP
X!`20Copyright`20(c)`201990,`20Leonard`20J.`20Peirce
X
XJOBLOG`20will`20capture`20the`20output`20for`20a`20terminal`20session,`20place
V`20it`20in`20a`20file,
Xand,`20upon`20exit,`20give`20you`20the`20option`20of`20printing`20it,`20saving
V`20it,`20storing`20the
Xlog`20file`20in`20a`20secure`20area`20and`20sending`20notification`20of`20it
V`20to`20another`20user,
Xor`20deleting`20it.
X
XThere`20are`20essentially`20two`20types`20of`20JOBLOG`20log`20files:`20`20VERI
VFIED`20and`20UNVERI-
XFIED.`20`20VERIFIED`20log`20files`20are`20guaranteed`20to`20be`20untouched`20b
Vy`20the`20person`20who
Xcreated`20them.`20`20Since`20the`20log`20files`20themselves`20are`20never`20ac
Vcessible`20to`20the
Xuser`20while`20running`20JOBLOG,`20the`20only`20opportunity`20for`20modificati
Von`20is`20if
Xlogging`20is`20disabled`20while`20in`20JOBLOG.`20`20While`20this`20is`20often
V`20a`20nice`20feature,
Xit`20immediately`20makes`20the`20log`20file`20UNVERIFIED.
X
XThe`20difference`20between`20VERIFIED`20and`20UNVERIFIED`20log`20files`20becom
Ves`20important
Xfor`20printed`20and`20mailed`20log`20files,`20especially`20for`20class`20assig
Vnments`20and`20such.
X
XNOTE:`20`20Logging`20full-screen`20applications`20is`20risky`20at`20best`20and
V`20are`20not`20guar-
Xanteed`20to`20be`20logged`20correctly.
X
XTo`20invoke`20JOBLOG,`20the`20syntax`20is:
X
X`20`20`20$`20JOBLOG/qualifier(s)
X2`20Qualifiers
X/CLASS
X
X`20`20/CLASS=class
X
X`20`20Used`20in`20conjunction`20with`20the`20/RETRIEVE`20qualifier,`20log`20fi
Vles`20from`20the
X`20`20specified`20class`20are`20retrieved`20from`20the`20secure`20area`20and
V`20placed`20in`20the
X`20`20current`20directory.
X
X/DELETE
X
X`20`20/DELETE=user
X
X`20`20Delete`20a`20JOBLOG`20that`20you've`20sent`20to`20USER`20from`20the`20st
Vaging`20area.`20`20You`20must
X`20`20specify`20/USER.`20`20A`20mail`20message`20stating`20that`20the`20log`20
Vfile`20has`20been`20deleted
X`20`20will`20be`20sent`20to`20USER.
X
X/EXPERT
X
X`20`20/EXPERT
X
X`20`20Suppress`20the`20JOBLOG`20startup`20message.
X
X/MAIL
X
X`20`20/MAIL=user
X
X`20`20Mail`20notification`20of`20log`20file`20to`20the`20specified`20user`20up
Von`20exit`20from`20JOBLOG.
X`20`20The`20log`20file`20will`20be`20placed`20in`20a`20secure`20staging`20area
V`20and`20can`20then`20be
X`20`20retrieved`20by`20the`20user`20by`20using`20the`20/RETRIEVE`20qualifier.
V`20`20The`20specified
X`20`20user`20must`20possess`20one`20of`20the`20following`20identifiers:`20`20S
VTAFF,`20FACULTY,
X`20`20JOBLOG_RECIPIENT.
X
X/PRINT
X
X`20`20/PRINT`5B=queue`5D
X
X`20`20Print`20the`20log`20file`20upon`20exit`20from`20JOBLOG`20to`20the`20spec
Vified`20queue.`20`20If
X`20`20no`20queue`20is`20specified,`20you`20will`20be`20prompted`20for`20it`20u
Vpon`20exiting`20JOBLOG.
X
X/RETRIEVE
X
X`20`20/RETRIEVE
X
X`20`20Retrieve`20a`20log`20file`20from`20the`20secure`20area.`20`20You`20must
V`20know`20the`20username`20of
X`20`20user`20who`20sent`20you`20the`20notification`20of`20the`20pending`20log
V`20file.`20`20You`20must`20also
X`20`20specify`20either`20/CLASS`20or`20/USER.
X
X/SAVE
X
X`20`20/SAVE`5B=file-spec`5D
X
X`20`20Save`20the`20log`20file`20to`20the`20specified`20file`20upon`20exit`20fr
Vom`20JOBLOG.`20`20If`20the
X`20`20file-spec`20is`20not`20specified,`20you`20will`20be`20prompted`20for`20i
Vt`20upon`20exiting
X`20`20JOBLOG.
X
X/SKIM
X
X`20`20/SKIM
X
X`20`20Skim`20the`20secure`20area,`20deleting`20old`20log`20files`20and`20warni
Vng`20both`20senders`20and
X`20`20recipients`20(via`20mail)`20of`20files`20that`20are`20soon`20to`20be`20d
Veleted.`20`20Both`20/WAIT
X`20`20and`20/WARN`20are`20required`20qualifiers.`20`20SYSPRV`20is`20required
V`20to`20use`20this
X`20`20qualifier.
X
X/TIME_STAMP
X
X`20`20/TIME_STAMP`20(default)
X`20`20/NOTIME_STAMP
X
X`20`20Display`20the`20current`20time`20in`20the`20log`20file`20for`20each`20DC
VL`20command`20entered.
X`20`20Time`20stamping`20can`20be`20toggle`20on/off`20by`20entering`20control-
V`5E.
X
X/USER
X
X`20`20/USER`5B=username`5D
X
X`20`20Specify`20the`20username`20for`20the`20/RETRIEVE`20or`20/MAIL`20qualifie
Vrs.`20`20If`20/USER`20is
X`20`20not`20specified,`20you`20will`20be`20prompted`20for`20it.
X
X/WAIT
X
X`20`20/WAIT=n
X
X`20`20Specified`20in`20conjunction`20with`20the`20/WARN`20qualifier,`20/WAIT
V`20specifies`20how
X`20`20how`20long`20to`20wait`20before`20a`20pending`20log`20file`20is`20delete
Vd`20from`20the`20secure
X`20`20area.`20`20Any`20log`20files`20older`20than`20n`20days`20are`20deleted.
V`20`20SYSPRV`20is`20required
X`20`20to`20use`20this`20qualifier.
X
X/WARN
X
X`20`20/WARN=n
X
X`20`20Mail`20messages`20are`20sent`20to`20senders`20and`20recipients`20of`20fi
Vles`20in`20the`20secure
X`20`20area`20that`20are`20older`20than`20n`20days`20but`20not`20older`20than
V`20the`20number`20of`20days
X`20`20specified`20with`20the`20/WAIT`20qualifier.`20`20Both`20/SKIM`20and`20/W
VAIT`20must`20be`20speci-
X`20`20fied`20with`20this`20qualifier.`20`20SYSPRV`20is`20also`20required`20to
V`20use`20this`20qualifier.
X
X2`20time_stamp
X`20`20To`20enable`20time`20stamping`20of`20all`20DCL`20commands`20in`20JOBLOG,
V`20enter`20control-`5E
X`20`20(hold`20the`20Control`20key`20down`20and`20press`20`5E).`20`20Each`20tim
Ve`20this`20is`20entered`20the
X`20`20time`20stamp`20feature`20is`20toggled.`20`20It`20is`20initially`20off`20
Vwhen`20JOBLOG`20is
X`20`20started.`20`20Specify`20the`20/TIME_STAMP`20qualifier`20on`20the`20comma
Vnd`20line`20to`20start
X`20`20JOBLOG`20with`20time-stamping`20enabled.
X
X2`20toggle_logging
X`20`20To`20toggle`20logging`20on/off,`20enter`20control-`5C`20(hold`20the`20Co
Vntrol`20key`20down`20and
X`20`20press`20`5C).`20`20Logging`20is`20initially`20enabled`20with`20JOBLOG`20
Vstarts.`20`20If`20logging
X`20`20is`20ever`20turned`20off,`20the`20log`20file`20immediately`20becomes`20U
VNVERIFIED.`20`20
$ call unpack JOBLOG.HLP;2 306454468 "" 9 6 11
$!
$ create 'f'
Xmodule`20joblog_cld
X
Xdefine`20verb`20joblog
X
X`09qualifier`20class,`09placement=global,value(required)
X`09qualifier`20delete,`09placement=global,value
X`09qualifier`20expert,`09placement=global
X`09qualifier`20mail,`09`09placement=global,value
X`09qualifier`20output,`09placement=global,value(required,type=$file)
X`09qualifier`20print,`09placement=global,value
X`09qualifier`20retrieve,`09placement=global
X`09qualifier`20save,`09`09placement=global,value(type=$file)
X`09qualifier`20skim,`09`09placement=global,value(type=$number)
X`09qualifier`20time_stamp,`09placement=global
X`09qualifier`20user,`09`09placement=global,value(required)
X`09qualifier`20verified,`09placement=global
X`09qualifier`20warn,`09`09placement=global,value(required,type=$number)
X`09qualifier`20wait,`09`09placement=global,value(required,type=$number)
X
X`09disallow`20class`20and`20delete
X`09disallow`20class`20and`20expert
X`09disallow`20class`20and`20mail
X`09disallow`20class`20and`20output
X`09disallow`20class`20and`20print
X`09disallow`20class`20and`20save
X`09disallow`20class`20and`20skim
X`09disallow`20class`20and`20time_stamp
X`09disallow`20class`20and`20user
X`09disallow`20class`20and`20wait
X`09disallow`20class`20and`20warn
X
X`09disallow`20delete`20and`20expert
X`09disallow`20delete`20and`20mail
X`09disallow`20delete`20and`20output
X`09disallow`20delete`20and`20print
X`09disallow`20delete`20and`20save
X`09disallow`20delete`20and`20skim
X`09disallow`20delete`20and`20retrieve
X`09disallow`20delete`20and`20time_stamp
X`09disallow`20delete`20and`20user
X`09disallow`20delete`20and`20wait
X`09disallow`20delete`20and`20warn
X
X`09disallow`20expert`20and`20class
X`09disallow`20expert`20and`20delete
X`09disallow`20expert`20and`20retrieve
X`09disallow`20expert`20and`20skim
X`09disallow`20expert`20and`20wait
X`09disallow`20expert`20and`20warn
X
X`09disallow`20mail`20and`20output
X`09disallow`20mail`20and`20print
X`09disallow`20mail`20and`20retrieve
X`09disallow`20mail`20and`20save
X`09disallow`20mail`20and`20skim
X`09disallow`20mail`20and`20user
X`09disallow`20mail`20and`20wait
X`09disallow`20mail`20and`20warn
X
X`09disallow`20output`20and`20print
X`09disallow`20output`20and`20retrieve
X`09disallow`20output`20and`20skim
X`09disallow`20output`20and`20save
X`09disallow`20output`20and`20user
X`09disallow`20output`20and`20wait
X`09disallow`20output`20and`20warn
X
X`09disallow`20print`20and`20retrieve
X`09disallow`20print`20and`20save
X`09disallow`20print`20and`20skim
X`09disallow`20print`20and`20user
X`09disallow`20print`20and`20wait
X`09disallow`20print`20and`20warn
X
X`09disallow`20retrieve`20and`20save
X`09disallow`20retrieve`20and`20skim
X`09disallow`20retrieve`20and`20time_stamp
X`09disallow`20retrieve`20and`20wait
X`09disallow`20retrieve`20and`20warn
X
X`09disallow`20save`20and`20skim
X`09disallow`20save`20and`20user
X`09disallow`20save`20and`20verified
X`09disallow`20save`20and`20wait
X`09disallow`20save`20and`20warn
X
X`09disallow`20skim`20and`20time_stamp
X`09disallow`20skim`20and`20user
X
X`09disallow`20time_stamp`20and`20wait
X`09disallow`20time_stamp`20and`20warn
X
X`09disallow`20user`20and`20wait
X`09disallow`20user`20and`20warn
X
X`09disallow`20retrieve`20and`20not`20(user`20or`20class)
X`09disallow`20skim`20and`20not`20wait
X`09disallow`20skim`20and`20not`20warn
X`09disallow`20wait`20and`20not`20skim
X`09disallow`20warn`20and`20not`20skim
$ call unpack JOBLOGCLD.CLD;5 259520903 "" 6 7 11
$!
$ create 'f'
X.TITLE`09`09`09JOBLOG`20Program`20Error`20Messages
X.IDENT`09`09`09'JOBLOG`201.4'
X.FACILITY`09`09JOBLOG,2/PREFIX=JLG_
X
X.SEVERITY`20`20`20`20`20`20`09`09SEVERE
XNO_LOGICAL`09`09<!AS`20logical`20not`20set.`20`20Contact`20System`20Manager>/F
VAO_COUNT=1
XNO_LOGFILE`20`20`09`09<Cannot`20open`20log`20file.`20`20Exiting`20JOBLOG>
XNO_EXH`20`20`20`09`09<Cannot`20declare`20exit`20handler.`20`20Exiting`20JOBLOG
V>
XCANT_QUEUE`09`09<Cannot`20queue`20!AS>/FAO_COUNT=1
XCANT_WRITE`09`09<Cannot`20write`20!AS>/FAO_COUNT=1
XINUSE`09`09`09<You`20are`20already`20running`20JOBLOG>
X.SEVERITY`20`20`20`20`20`20`09`09WARNING
XNO_SPAWN`20`20`20`20`20`09`09<Cannot`20SPAWN`20to`20send`20mail>
XCANT_CANCEL_IO`09`09<Cannot`20cancel`20I/O`20on`20!AS>/FAO_COUNT=1
XCANT_DELETE`09`09<Cannot`20delete`20!AS>/FAO_COUNT=1
XCANT_DASSGN`09`09<Cannot`20deassign`20!AS>/FAO_COUNT=1
XCANT_RESET`09`09<Cannot`20reset`20TT`20characteristics>
X.SEVERITY`20`20`20`20`20`20`09`09INFORMATIONAL
XCANT_DELETE_LOG`09`09<Cannot`20delete`20JOBLOG`20log`20file`20!AS>/FAO_COUNT=1
V
X.END
$ call unpack JOBLOGMSG.MSG;4 789209333 "" 2 8 11
$!
$ create 'f'
XFile`09`09`09`09Contents
X----`09`09`09`09--------
XBUILD.COM`09`09`09For`20people`20who`20don't`20have`20MMS
XCOPYRIGHT.TXT`09`09`09Full`20JOBLOG`20copyright`20text
XDESCRIP.MMS`09`09`09MMS`20control`20file
XDOC.TXT`09`09`09`09Description`20of`20JOBLOG`20that`20we`20give`20our`20users
V
XJOBLOG.C`09`09`09JOBLOG`20C`20source`20file
XJOBLOG.HLP`09`09`09JOBLOG`20VMS-style`20help`20file
XJOBLOGCLD.CLD`09`09`09JOBLOG`20CLD`20file
XJOBLOGMSG.MSG`09`09`09JOBLOG`20message`20definitions
XMANIFEST.TXT`09`09`09This`20file
XREADME.TXT`09`09`09JOBLOG`20description`20and`20installation
X`09`09`09`09instructions
XSUBS.C`09`09`09`09Some`20general-purpose`20subroutines
$ call unpack MANIFEST.TXT;5 2137132953 "" 2 9 11
$!
$ create 'f'
XLast`20update:`20`2003/17/95
X
XINTRODUCTION
X`20`20`20Welcome`20to`20JOBLOG,`20a`20terminal`20session`20logging`20facility.
V`20`20JOBLOG`20is`20based
Xon`20the`20popular`20program`20PHOTO,`20written`20by`20Asbed`20Bedrossian`20at
V`20USC.`20`20Basically,
XJOBLOG`20does`20what`20PHOTO`20does,`20provides`20some`20additional`20options
V`20for`20"secure"
Xlog`20files`20(untouched`20by`20the`20user),`20and`20fixes`20some`20bugs`20tha
Vt`20caused`20VT220
Xterminals`20to`20hang`20under`20certain`20circumstances.
X
X`20`20`20PHOTO`20is`20Copyright`201986`20by`20Asbed`20Bedrossian`20at`20Univer
Vsity`20of`20Southern
XCalifornia.
X
XDISTRIBUTION
X`20`20`20Feel`20free`20to`20redistribute`20JOBLOG.`20`20I`20don't`20mind`20as
V`20long`20as`20the`20copyright
Xnotice`20(COPYRIGHT)`20stays`20with`20it`20and`20you`20don't`20claim`20you`20w
Vrote`20it`20or`20try`20to
Xmake`20money`20from`20it.
X
XREQUIREMENTS
X`20`20`20This`20version`20of`20JOBLOG`20(1.5)`20works`20with`20the`20FT`20pseu
Vdo-terminal`20driver`20that
Xshipped`20with`20VMS`205.4.`20`20If`20you're`20running`20a`20version`20of`20VM
VS`20that`20doesn't`20have
Xthe`20FT`20driver`20and`20you`20would`20like`20to`20use`20JOBLOG,`20get`20vers
Vion`201.3.`20`20You`20will
Xalso`20need`20the`20TW/PY`20pseudo-terminal`20driver.`20`20Both`20are`20availa
Vble`20from`20a`20number
Xof`20anonymous`20FTP`20sites`20around`20the`20net,`20DECUS`20tapes,`20or`20nei
Vghbors.`20`20If`20you
Xcan't`20find`20them,`20e-mail`20me`20and`20I'll`20see`20what`20I`20can`20do.
X
XNOTE:`20`20If`20you're`20using`20VAX`20C`20you`20might`20need`20to`20change`20
Vthe`20definition`20for
XLINKOPTIONS`20in`20the`20DESCRIP.MMS`20file`20or`20the`20line`20in`20BUILD.COM
V`20where`20the
Xlink`20is`20done.`20`20Both`20DESCRIP.MMS`20and`20BUILD.COM`20contain`20inform
Vation`20necessary
Xto`20make`20the`20change.`20`20It's`20pretty`20simple.
X
X`20`20`20PHOTO`20mode`20is`20available`20so`20that`20JOBLOG`20can`20be`20built
V`20so`20that`20it`20functions
Xexactly`20like`20PHOTO.`20`20This`20is`20for`20users`20who`20don't`20want`20to
V`20go`20through`20all`20of
Xthe`20steps`20necessary`20to`20have`20secure`20log`20files.`20`20Log`20files
V`20are`20written`20to`20a
Xfile`20called`20JOBLOG.LOG`20in`20the`20current`20directory.
X
X`20`20`20NOTE:`20`20the`20default`20is`20for`20JOBLOG`20to`20be`20built`20for
V`20secure`20log`20files.
X
X`20`20`20Requirements`20for`20secure`20log`20files:
X
X`09-`20two`20system`20directories`20to`20hold`201)`20temporary`20log`20files
V`20and`202)
X`09`20`20log`20files`20waiting`20to`20be`20retrieved
X`09-`20two`20system-wide`20logical`20names`20pointing`20to`20the`20above`20dir
Vectories
X`09-`20adding`20the`20JOBLOG`20help`20file`20to`20the`20system-wide`20help`20l
Vibrary
X`09-`20INSTALLation`20of`20JOBLOG.EXE`20with`20SYSPRV`20and`20CMKRNL`20privile
Vges
X`09-`20an`20entry`20in`20a`20daily`20batch`20job`20to`20run`20JOBLOG`20so`20th
Vat`20recipient
X`09`20`20and`20senders`20of`20log`20files`20are`20notified`20of`20pending`20lo
Vg`20files
X`09`20`20and`20old`20log`20files`20are`20deleted
X
X`20`20`20If`20you`20wish`20to`20use`20PHOTO`20mode,`20go`20to`20the`20INSTALLA
VTION`20section.
X
X`20`20`20In`20case`20anyone`20is`20interested`20this`20version`20was`20develop
Ved`20and`20tested`20on
XOpenVMS`206.1`20on`20both`20an`20Alpha`207620`20and`20a`20VAX`206620.`20`20It
V`20builds`20cleanly`20both
Xwith`20VAX`20C`20and`20DEC`20C.
X
XDESCRIPTION
X`20`20`20In`20order`20to`20understand`20the`20above`20requirements,`20let's`20
Vlook`20at`20the`20life`20of
Xa`20secure`20log`20file`20created`20by`20JOBLOG.
X
X`091.`20User`20runs`20JOBLOG.`20`20The`20log`20file`20is`20created`20in`20the
V`20system`20dir-
X`09`20`20`20ectory`20pointed`20to`20by`20the`20JOBLOG$LOG`20logical.`20`20This
V`20directory`20is
X`09`20`20`20protected`20RWED,,,`20so`20the`20user`20is`20never`20able`20to`20m
Vodify`20it.
X
X`092.`20During`20the`20session,`20the`20user`20has`20the`20option`20of`20toggl
Ving`20logging
X`09`20`20`20on/off.`20`20If`20logging`20is`20turned`20OFF,`20the`20log`20file
V`20immediately`20be-
X`09`20`20`20comes`20UNVERIFIED,`20signifying`20that`20it`20is`20not`20a`20true
V`20record`20of`20the
X`09`20`20`20login`20session.
X
X`093.`20After`20the`20user`20terminates`20the`20session,`20the`20user`20can:
X
X`09`20`20`20a)`20print`20the`20log`20file
X
X`09`20`20`20`20`20`20The`20log`20file`20is`20printed`20directly`20from`20the
V`20JOBLOG$LOG`20dir-
X`09`20`20`20`20`20`20ectory`20with`20a`20job`20name`20that`20reflects`20whethe
Vr`20it`20is`20VERIFIED
X`09`20`20`20`20`20`20or`20UNVERIFIED.`20`20The`20log`20file`20is`20deleted`20a
Vfter`20printing.
X
X`09`20`20`20b)`20delete`20the`20log`20file
X
X`09`20`20`20`20`20`20The`20log`20file`20is`20deleted`20directly`20from`20the
V`20JOBLOG$LOG`20dir-
X`09`20`20`20`20`20`20ectory.
X
X`09`20`20`20c)`20save`20the`20log`20file
X
X`09`20`20`20`20`20`20The`20log`20file`20is`20copied`20to`20the`20file`20specif
+-+-+-+-+-+-+-+- END OF PART 5 +-+-+-+-+-+-+-+-

0 new messages