RECSIZE=256;BLOCKFACTOR=1;CODE=2501;EXTENTS=8;FILESIZE=16776959;FORMAT=FSTORE/RESTORE-HP/3000.MPEXL O0,B5151AA C651909/18/010000?d5 yHg @CICATNDX PUB SYSADMIN MGR SYSADMIN MGR SYSADMIN` ? d5 y yh1HFSMAP _HFSGRP _HFSACCT MGR SYSADMIN MGR SYSADMIN`?d5 3yd)F0000000 _HFSGRP _HFSACCT MANAGER SYSADMIN MGR SYSADMIN`0d5 Gy4e f{F0000001 _HFSGRP _HFSACCT MANAGER SYSADMIN MGR SYSADMIN` ,(,H00000000000000000 000000;STORE cicatndx,./CICATNDX2,./cicat2html.pl;*NDXCICAT;SHOW /SYSADMIN/PUB/CICATNDX2/SYSADMIN/PUB/cicat2html.pl,d5 yHg @@ DISC 1CICATNDX PUB SYSADMIN MGR SYSADMINd5 njnjڐsڐs@ HH@H ڐsSYSADMIN A@@anyparm path=/APACHE/PUB/public_html/htdocs/mpe65/cicat setvar _mi_path "!path" if _mi_path = "?" echo echo File name: ![word(hpfile,'.')] echo echo Author: Donna Garverick echo echo This script is designed to produce an index.html file in echo the given directory. Typically, this directory should echo contain other .html (or .htm) files that have no central indexing echo method. Combined with the perl script 'cicat2html.pl', written echo by Mark Bixby, which produces a collection of .html files based echo on the contents of CICAT.PUB.SYS. CICATNDX and CICATNDX2 give you echo indexed access to the MPE HELP catalog. echo echo To use cicat2html.pl, you need to edit the lines echo echo $catalog = '/SYSADMIN/PUB/MYCICAT'; echo $destdir = '/APACHE/PUB/public_html/htdocs/mpe65/cicat'; echo echo inserting the correct path for your installation. echo echo CICATNDX calls CICATNDX2 echo echo To use CICATNDX, echo echo XEQ CICATNDX path_to_html_files echo deletevar _mi@ return endif if pos('@',_mi_path) = 0 if rht(_mi_path,1) <> '/' setvar _mi_path2 _mi_path+'/@' else setvar _mi_path2 _mi_path+'@' endif endif if finfo("!_mi_path/index.html","exists") purge !_mi_path/index.html endif purge mitemp,temp >$null listfile !_mi_path2,6 > mitemp setvar cjcw 0 grep "-i 'Non-existent'" < mitemp > $null #--- cjcw = 0 means the above string was found if cjcw = 0 echo echo ERROR: ListFile of !_mi_path appears to have failed print mitemp return endif #--- because this script uses anyparm, call a 2nd script to do #--- the real work ./CICATNDX2 < mitemp if finfo("!_mi_path/index.html","exists") chmod "644 !_mi_path/index.html" purge mitemp,temp > $null deletevar _mi_@ else echo echo ERROR: !_mi_path/index.html was not created endif hd5 y yh1 DISC 1 PUB SYSADMIN MGR SYSADMINd5 ڧnڧnڧnڧn> ڧnSYSADMIN F0000000._HFSGRP ._HFSACCT <- /SYSADMIN/PUB/CICATNDX2 F0000001._HFSGRP ._HFSACCT <- /SYSADMIN/PUB/cicat2html.pl h,d5 3yd)) DISC 1 PUB SYSADMIN MGR SYSADMINd5 ܁܁̓=U)0YY,)x USYSADMIN )))#--- build the index.html file as bytestream build !_mi_path/index.html;rec=-1,,b,ascii;disc=15000000 file x=!_mi_path/index.html,old;acc=append #--- the brackets for html tags cause all sorts of headaches... #--- so put them into ci variables (la = left angle and ra=right angle) setvar _mi_la '!<' setvar _mi_ra '!>' #--- start building the index page #--- notice how _mi_la is quoted...the ending quote avoids having to #--- insert a space (cool) echo !"_mi_la"html!_mi_ra >>*x echo !"_mi_la"head!_mi_ra >>*x echo !"_mi_la"title!_mi_ra >>*x echo Index of all MPE Commands and Variables (!hpversion)>>*x echo !"_mi_la"/title!_mi_ra >>*x echo !"_mi_la"/head!_mi_ra >>*x echo !"_mi_la"body!_mi_ra >>*x echo !"_mi_la"a name="_top_"!_mi_ra!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"hr!_mi_ra >>*x echo !"_mi_la"a href="#thumb-a"!_mi_ra a!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-b"!_mi_ra b!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-c"!_mi_ra c!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-d"!_mi_ra d!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-e"!_mi_ra e!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-f"!_mi_ra f!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-g"!_mi_ra g!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-h"!_mi_ra h!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-i"!_mi_ra i!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-j"!_mi_ra j!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-k"!_mi_ra k!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-l"!_mi_ra l!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-m"!_mi_ra m!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-n"!_mi_ra n!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-o"!_mi_ra o!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-p"!_mi_ra p!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-q"!_mi_ra q!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-r"!_mi_ra r!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-s"!_mi_ra s!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-t"!_mi_ra t!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-u"!_mi_ra u!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-v"!_mi_ra v!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-w"!_mi_ra w!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-x"!_mi_ra x!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-y"!_mi_ra y!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"a href="#thumb-z"!_mi_ra z!"_mi_la"/a!_mi_ra >>*x echo >>*x echo !"_mi_la"hr!_mi_ra >>*x echo !"_mi_la"h1!_mi_ra >>*x echo Index of all MPE Commands and Variables (!hpversion)>>*x echo !"_mi_la"/h1!_mi_ra >>*x setvar _mi_alphabet 'abcdefghijklmnopqrstuvwxyz' setvar _mi_1st '' setvar _mi_i 0 setvar _mi_eof1 finfo(HPSTDIN,"eof") while setvar(_mi_eof1,_mi_eof1-1) >= 0 input _mi_rec #--- extract 'filename.html' from the end of the record setvar _mi_file word(_mi_rec,'/',wordcnt(_mi_rec,'/')) #--- 1st is really 1st letter.... while _mi_1st < lft(_mi_file,1) setvar _mi_i _mi_i + 1 setvar _mi_1st str(_mi_alphabet,_mi_i,1) #--- echo to stdlist just so we know the script is running echo !_mi_1st #--- a little control break logic if _mi_1st > 'a' #--- fix this wrapped line prior to using echo !"_mi_la"dd!_mi_ra !"_mi_la"a href="#_top_"!_mi_ra back to the top!"_mi_la"/a!_mi_ra >>*x echo !"_mi_la"/dl!_mi_ra >>*x endif echo !"_mi_la"a name="thumb-!_mi_1st"!_mi_ra!_mi_la/a!_mi_ra >>*x echo !"_mi_la"h2!_mi_ra >>*x #--- fix this wrapped line prior to using echo !"_mi_la"a name="thumb-!_mi_1st"!_mi_ra !_mi_1st!_mi_la/a!_mi_ra >>*x echo !_mi_la/h2!_mi_ra >>*x echo !"_mi_la"dl!_mi_ra >>*x endwhile #--- (w/o the brackets...) dt a href="filename.html" filename" /a #--- fix this wrapped line prior to using echo !"_mi_la"dt!_mi_ra !"_mi_la"ahref="!_mi_file"!_mi_ra![word(_mi_file,'.')]!_mi_la/a!_mi_ra >>*x endwhile #--- a little wrap up echo !"_mi_la"/dl!_mi_ra >>*x echo !"_mi_la"/body!_mi_ra >>*x echo !"_mi_la"/html!_mi_ra >>*x ,d5 Gy4e f{{ DISC 1 PUB SYSADMIN MGR SYSADMINd5 DE bbҴb{ @{z@bSYSADMIN {@y5%$ $FOWNER $ $GMASK $ $GROUP ` ` #!/usr/local/bin/perl -w # A quick hack of an MPE CICAT to HTML converter. Extracts all \ENTRY sections # into their own separate HTML files named entry.html. Generates anchors for # \ITEMs, i.e. entry.html#item. My design goal was to achieve decent results # for command help; the other non-command sections may look a little strange. # # Attempts to generate hot links to other commands, variables, and functions. # # Learn Perl and regular expression pattern matching. It will change your life! # # Send comments, questions, and enhancements to: # # Mark Bixby # markb@cccd.edu # http://www.cccd.edu/~markb/ # +1 714 438-4647 # # While this is provided as freeware that you can do whatever you want with, # please leave the first continuous block of comments intact. # # Official distribution site: # # http://www.cccd.edu/ftp/pub/mpe/cicat2html.pl # http://www.cccd.edu/ftp/pub/mpe/cicat2html.html # ftp://ftp.cccd.edu/pub/mpe/cicat2html.pl # ftp://ftp.cccd.edu/pub/mpe/cicat2html.html # # Change history: # # 1.0 March 26, 1997 # # Official release. # # Configuration variables. # # The input catalog. $catalog = '/SYSADMIN/PUB/MYCICAT'; # The output directory tree. $destdir = '/APACHE/PUB/public_html/htdocs/mpe65/cicat'; # # No user-serviceable parts below. # sub cicatlink ($;$) { my $entity = $_[0]; my $link = lc($#_ ? $_[1] : $_[0]); "$entity" } $entry = ''; $commands = ''; # # Make a hash of all HP variables known by :SHOWVAR HP@ # ($hpvars = `callci showvar hp@`) =~ s/(^HP.*?) .*/$1\n$1/gm; @hpvarl = split("\n",$hpvars); %hpvarh = @hpvarl; # Manually add variables that only exist for jobs. $hpvarh{'HPLASTSPID'} = 'HPLASTSPID'; $hpvarh{'HPSPOOLID'} = 'HPSPOOLID'; # Make a manual hash of all alphabetic HP operators, i.e. arg1 op arg2. # Note that we intentionally omit AND and OR so we don't mangle ordinary # English sentences. %hpoprh = ( 'BAND','BAND', 'BNOT','BNOT', 'BOR','BOR', 'BXOR','BXOR', 'CSL','CSL', 'CSR','CSR', 'LSL','LSL', 'LSR','LSR', 'MOD','MOD', 'XOR','XOR'); # Make a hash of all HP functions, i.e. func(arg1,arg2), known by # :HELP FUNCTIONS. This code will certainly break if HP changes the format # of this particular :HELP entry. ($hpfuns = `callci "help functions" ) { chop; ($line = $_) =~ s/(^.*?)\s*\d{8}$/$1/; if ($line =~ /^\\ENTRY=(\w+)/) { # # Start of a new main section. # $commands = ''; if ($entry) { # # Terminate the previous main section. # print HTML 'Back to Main Index'; print HTML ''; close(HTML) || die "Unable to close $destdir/$entry.html: $!"; }; $entry = lc($1); print "ENTRY=$entry\n"; # # Create HTML file and standard header stuff. # open(HTML,">$destdir/$entry.html") || die "Unable to open $destdir/$entry.html: $!"; print HTML "$1

$1

$asof

Back to Main Index


\n";
  } elsif ($line =~ /^\\CONTINUE/) {
    # Just ignore for now.
  } elsif ($line =~ /^\\ITEM=(\w+)$/) {
    #
    # Items result in HTML #anchors.
    #
    $item = lc($1);
    print HTML "\n";
  } elsif (length($line) > 3 && length($line) < 40 && $line =~ /^([-:\/()A-Z\=]+)( [-:\/()A-Z\=]+)*$/) {
    #
    # Smells like a heading.
    #
    print HTML "

$line

\n";
  } elsif ($line =~ /Commands\s*:/i && $line =~ /:\s+.*?[A-Z]{2,}/) {
    #
    # Start of list of other command names.
    #
    ($commands = $line) =~ s/(.*?:\s+)(.*)/$2/;
    print HTML $1;
    $commands =~ s/([A-Z]{2,})/cicatlink($1)/eg;
    print HTML "$commands\n";
  } elsif ($commands) {
    #
    # Continuation of list of other command names.
    #
    if ($line) {
      ($commands = $line) =~ s/([A-Z]{2,})/cicatlink($1)/eg;
      print HTML "$commands\n";
    } else {
      $commands = '';
      print HTML "\n";
    };
  } else {
    #
    # Unknown.  Deal with random command, variable, and function names.
    #
    # Commands.
    #
    ($random = $line) =~ s/^:([A-Z]{2,})/':'.cicatlink($1)/ie;
    $random =~ s/( +:)([A-Z]{2,})/$1.cicatlink($2)/ieg;
    #
    # Variables.
    #
    $random =~ s/(HP[_A-Z]{3,})/$hpvarh{uc($1)} ? cicatlink($1) : $1/ieg;
    $random =~ s/(CIERROR)/cicatlink($1)/ieg;
    $random =~ s/(\W)(JCW)(s*\W)/$1.cicatlink($2).$3/ieg;
    $random =~ s/^(JCW)(s*)(\W)/cicatlink($1)."$2$3"/ie;
    #
    # Functions.
    #
    $random =~ s/([A-Z]{2,})(\s*\()/$hpfunh{uc($1)} ? cicatlink($1,$hpfunh{uc($1)}).$2 : "$1$2"/ieg;
    $random =~ s/([A-Z]{2,})/$hpfunh{$1} ? cicatlink($1,$hpfunh{$1}) : $1/eg if $entry eq 'functions';
    #
    # Operators.
    #
    $random =~ s/(\s)([A-Z]{2,})(\s)/$hpoprh{uc($2)} ? $1.cicatlink($2,$hpoprh{uc($2)}).$3 : "$1$2$3"/ieg;
    $random =~ s/([A-Z]{2,})/$hpoprh{$1} ? cicatlink($1,$hpoprh{$1}) : $1/eg if $entry eq 'functions';
    print HTML "$random\n";
  };
};

close(MPE) || die "Unable to close $catalog: $!";
STORE/RESTORE-HP/3000.MPEXL  O0,B5151AA  C651909/18/010000