PARM pattern=main, entry=main comment SPKHELP is an easy-to-maintain (albeit a bit slow) command file that comment contains all the help text to support SPOOK. Written by Steve Elmer comment and Jeff Vance November 1990. comment The format for the help text is: comment SPKHELP_topic {used as a label, must be uppercase} comment Actual text {remember, do NOT escape <,>,>>,! characters} comment SPKHELP_NextTopic comment . . . comment SPKHELP_DONE {last line of this file} comment comment Usually the topic order is alphabetic, which supports searching for comment command name abbreviations, e.g., >help l[ist]. However, the SET comment help text must appear after the SHOW text since the abbreviation comment 'S' matches SHOW not SET. comment if bound(hpfile) then setvar _spkhelp_name hpfile else comment Modify the next line if SPKHELP is renamed... setvar _spkhelp_name 'SPKHELP.PUB.SYS' endif if '!entry' = 'main' then comment See if this part of text has already been printed. if bound(_spook_spkhelp_!"pattern"_start) then setvar _spkhelp_start _spook_spkhelp_!"pattern"_start setvar _spkhelp_end _spook_spkhelp_!"pattern"_end else xeq !_spkhelp_name !pattern, search _spkhelp_pattern do endwhile if _spkhelp_index < _spkhelp_eof then comment Found a match. Actual printing done in 'main' entry. setvar _spkhelp_start _spkhelp_index+1 if _spkhelp_all then setvar _spkhelp_end _spkhelp_eof-1 else comment Just print text for this topic, so find end-of-topic. while setvar(_spkhelp_index,_spkhelp_index+1) <= _spkhelp_eof and & lft(input(),8) <> 'SPKHELP_' do endwhile setvar _spkhelp_end _spkhelp_index-1 endif endif return endif comment End of SPKHELP, help text follows... SPKHELP_MAIN Spook Emulator Command | NM Spooler __________________________________________________________|___________________ A[LTER] spool_spec [;PRI=[,COPIES=] [,DEV=]] | :SPOOLF ;ALTER B[ROWSE] [dfid] Invokes HPBROWSE | :HPBROWSE Onnn DO [cmd_id] | EDIT [dfid] Invokes !HPEDITOR | (your editor) E[XIT] or Q[UIT] | F[IND] [[@] "pattern"] [,range] | (your editor) H[ELP] [all | spook command name ] | I[NPUT] user[.acct] ;tapefile | :SPFXFER dfid [,dfid [,...]];tapefile | L[IST] [range] [;OWNER=user] [;PAGE=n] | :PRINT LISTREDO | O[UTPUT] user[.acct] ;tapefile [;PURGE] | :SPFXFER dfid [,dfid [,...]];tapefile [;PURGE] | P[URGE] spool_spec | :SPOOLF ;DELETE RAWL[IST] [dfid] (old "mode c=on" command) | :PRINTSPF SET [MSG=loud | quiet] [;OWNER=user] | S[HOW] [spool_spec] [;[@] [I] [O]] | :LISTSPF T[EXT] [dfid] | [:] | __________________________________________________________|___________________ ::= spspec [;datespec] or ~ ::= spid [-spid [-...]] [,spid[-...]] ,eg. @.@-@.sys, #O123 ::= daysold <,<=,=,>,>= n ,eg. ;daysold>4 -- or -- date <,<=,=,>,>= mm/dd[/[yy]yy] ,eg. ;date<=9/30/90 ::= user[.acct] or dfid ::= [#O]n or #In or * ::= n or -n or partial string ::= n [/n] or n+n or n-n or FIRST or LAST or ALL or * ::= one or more digits, 0..9 <*> ::= current object (current dfid or current position in file) <~> ::= previous spool_spec (includes dfids, owners and datespec) SPKHELP_NEW News about the most recent SPOOK releases (use 'help cmdname' for more info): 4.1 New DO and LISTREDO commands, similar to the CI. 4.0 By default your logon user.account is used by the SHOW and implicit LIST commands. You can change your owner name via the SET command. Also the LIST command supports an owner name for cases when you occasionally want the default owner to be another user. 3.10 The LIST, EDIT and BROWSE commands will automatically text your spoolfile if you do not have one already TEXTed. If you own more than one spoolfile you will be prompted for a selection based on a simple index number. 3.9 SPOOK supports an INFO= command_string. For example: :spook 'p @.ui' 3.6 Added "~" to ALTER, PURGE and SHOW commands. "~" refers to your previous selection done by an earlier SHOW or ALTER command. For example: spook> s @.sys-manager.sys,#o123,@.ui-jeff-clh,mike;daysold>11 spook> purge ~ {purges above selection} 3.0 Spoolfiles can be selected by DAYSOLD or DATE. See ALTER, PURGE and SHOW. SPKHELP_FEATURES Spook Emulator Features First of all, the SPOOK command file does not simulate the SPOOK program in several areas: output from all commands is based on the NM Spooler formats, and, thus, is differrent from the SPOOK program's commands. Also, control-Y has no effect in the SPOOK command file. The only way to prematurely halt a command's output is via the key, which also abnormally terminates SPOOK. Several commands are not supported, including APPEND, COPY, KILL; but, the most common commands are emulated (and many have been enhanced). Enter "HELP MAIN" to see the list of supported commands. The FIND command (and sometimes LIST) are considerably slower than in the SPOOK program. If you need to find strings in large files use the EDIT, or BROWSE commands, or try Brett Meeker's SPOOKNM (Spook Approximator program). SPOOK translates your command input into the equivalent NM Spooler command, which is sometimes very lengthy due to powerful (but often verbose) selection equations. The NM Spooler keeps all "O" (output) files as O#### in OUT.HPSPOOL and all input files as I#### in IN.HPSPOOL. These files can be acted on by most MPE XL commands that accept a filename. For example, you can LISTFILE, PRINT, COPY, etc. these files in the HPSPOOL account. Several new commands have been added to SPOOK, such as SET, which controls whether or not the equivalent NM Spooler command is echoed. RAWLIST is the old MODE C=ON command. The new EDIT command lets you edit your output spoolfile. The default editor is HPEDIT.PUB.SYS, but this can be changed by setting the HPEDITOR variable to the name of your editor. The BROWSE command is a quick interface to HPBROWSE.PUB.SYS, if it is on your system. Below are some of the enhancements of the SPOOK command file over the program: o PURGE can be targeted to a user.account, which can be wildcarded. o ALTER, PURGE and SHOW accept a list of device file ids (dfid) and/or user.account names. A user.account name (which is the spoolfile's owner's name) can always be wildcarded. o ALTER, PURGE and SHOW let you specify which spoolfiles to get based on how old they are, or by their creation date. o ALTER, PURGE and SHOW accept the tilda ("~") parameter, meaning use previous selection. o TEXT, by default, shows you the spoolfile's eof and creation date/time. o An improved help facility is provided (your using it now). o FIND puts carets (^^^) under the matching string. It also remembers your most recent pattern, even with different spoolfiles. o LIST lets you list record 0, so that subsequent FINDs can start at the beginning of the file. LIST also supports the page= parameter for :PRINT. o Simple SPOOK commands, such as SHOW, can be executed in break mode. SPKHELP_MPE MPE Interface Most MPE XL commands can be executed from SPOOK simply by entering the command. If a SPOOK command exists with the same name as an MPE command then you must precede the MPE command with a ":"; otherwise the SPOOK command will be executed. Remember, to purge an MPE file, enter :PURGE filename. If the colon is omitted then all spoolfiles belonging to a user named "filename" may be purged (depending on your capabilities). MPE XL help is available by entering :HELP. SPKHELP_ALTER ALTER - allows you to change the priority, number of copies, and/or ldev for one or more spoolfiles. Syntax: ALTER spool_spec [;pri=n [,copies=n] [,dev=n or class]] Parameters: spool_spec- spspec [;datespec] or '~' Tilda refers to the previous spool_spec selection. spspec - required, one or more owner names and/or device file ids (dfid) separated by commas. Each owner name can be wild- carded (both the user and account names). Also, each wildcarded owner name can have other owners "subtracted" from it. The complete format is: spspec ::= spid [-spid [-spid]...] [,spid [-spid]]... spid ::= user[.account] or dfid or '*' datespec - [optional], either the age of a spoolfile specified in days old, or the creation date as mm/dd/yy. The syntaxes are: daysold number-of-days, from 0-30. date mm/dd/[yy[yy]]. relop ::= < or <= or = or > or >= Daysold and date are mutually exclusive, and can only be specified once. If the year in the "date" format is defaulted then the current year is assumed. pri - [optional], the new output printing priority, from 1-13. copies - [optional], the number of copies for the output spoolfile. dev - [optional], the new LDEV or device class for the spoolfile to be printed. A spoolfile can be referred to by it's device file ID (dfid) or by its owner (user.account). '*' refers to the currently TEXTed spoolfile. '~' refers to the previously specified spool_spec which may include dfid's, owner names, and a date specification. The NM Spooler will not let you get to spoolfiles that you do not have access to. The two date-related parameters provide additional filtering based on how old or new a spoolfile is. NM Spooler: SPOOK's alter is supported via the :SPOOLF ...;ALTER command. For example, :spoolf @; seleq=[owner=foo.bar] ;pri=2 ;ALTER changes all of FOO.BAR's spoolfiles to priority 2. Another example, :spoolf (#O123,456) ;copies=4 ;ALTER alters 2 spoolfiles: O123.OUT.HPSPOOL and O456.OUT.HPSPOOL. Abbreviations: ALTER (A,ALT) DEV (D) COPIES (C) PRI (P) Examples: > alter #o123 ;pri=8,copies=2 > alt 123, 456 ;dev=lp, p=2 > a clh.jhv, grace.@ ;p=2 > alt fred-#o123, @.ui ;c=6 > alter ~;pri=1;copies=1 {refers to above selection} > a @,789,piw ;daysold > 6 ;pri=1 > a @.@-@.sys-@.diag-jeff.ui; date >= 9/30/90 ;p=8, d=epoc Related Commands: SHOW, TEXT, PURGE SPKHELP_BROWSE BROWSE - is a simple interface to HPBROWSE.PUB.SYS. When a dfid is specified it becomes implicitly TEXTed. HPBROWSE is very fast at scanning variable record spoolfiles, and is syntactically similar to HPEDIT. To exit HPBROWSE enter 'e'. Syntax: BROWSE [dfid] Parameters: dfid - [optional] the device file id, in the form of: [#O]nnn or *. This field appears under the SPOOLID label in the SHOW command output. If '*' is specified the current TEXT file is used. If the dfid is omitted and you own one spoolfile then it will be implicitly TEXTed and passed to HPBROWSE. If the dfid is omitted and you own more than one spoolfile then you may select which spoolfile to browse by a simple index number. If the dfid is omitted and you own zero spoolfiles then an error is reported. Abbreviations: BROWSE (B) Examples: > browse #O123 > b 456 > b * > browse Related Commands: EDIT, TEXT, FIND, LIST SPKHELP_DO DO - re-executes a command from SPOOK's redo/history stack. The DO command is not posted to the redo stack. Syntax: DO [cmd_id] Parameters: cmd_id - [optional] a number (positive or negative) that indexes the command number to be re-executed. Default is -1 meaning the previous command. "Cmd_id" can also be a string which is searched for, starting at the most recent redo stack entry, going backwards through the stack. The string needs only be long enough to uniquely match the command image in the redo stack. Abbreviations: none Examples: > do > do -2 > do 10 > do show > do sh Related Commands: LISTREDO, REDO SPKHELP_EXIT EXIT - terminates the SPOOK command file. EXIT and QUIT are synonyms. Syntax: EXIT Abbreviations: EXIT (E) QUIT (Q) Examples: > exit > q SPKHELP_EDIT EDIT - allows you to edit a spoolfile. When a dfid is specified it becomes implicitly TEXTed. HPEDIT.PUB.SYS is the default editor, but you can set the HPEDITOR variable to the name of your favorite editor. Note: your editor must accept the text file name in the info= string. Syntax: EDIT [dfid] Parameters: dfid - [optional] the device file id, in the form of: [#O]nnn or *. This field appears under the SPOOLID label in the SHOW command output. If '*' is specified the current TEXT file is used. If the dfid is omitted and you own one spoolfile then it will be implicitly TEXTed and passed to your editor. If the dfid is omitted and you own more than one spoolfile then you may select which spoolfile to edit by a simple index number. If the dfid is omitted and you own zero spoolfiles then an error is reported. Examples: > edit #O123 {invokes HPEDIT, by default} > edit 456 > setvar hpeditor 'vi.unix.sys' {cause next edit to invoke vi} > edit * {edits current text file} > edit {edits current text file} Related Commands: BROWSE, TEXT, LIST SPKHELP_HELP HELP - provides basic information about the following topics: any supported SPOOK command, command summary, features and limitations, the MPE XL command interface and news about the current version of SPOOK. The first time a topic is selected SPOOK will display "working..." as it searches the SPKHELP help file. Subsequent help on the same topic (spelled the same way) is much faster because SPOOK remembers the location of the text. Syntax: HELP [topic] Parameters: topic - [optional], the name of a SPOOK command (may be abbreviated), or one of the following: MAIN - displays a summary of SPOOK commands showing the NM Spooler equivalent. This is the default. FEATURES - shows the enhancements and limitations of SPOOK. MPE - describes the MPE XL command interface. NEW - explains what is new for this release of SPOOK. ALL - displays help text for every command and topic. Abbreviations: HELP (H) Examples: > help > help features > h alter > h s SPKHELP_LIST LIST - lists one or more lines from the currently TEXTed spool file. Since the MPE print command is used, you will be prompted to "Continue?" every 23 lines, by default. If you do not have a spoolfile TEXTed the LIST command will allow you to select from among your own spoolfiles with a simple index number. If you do not have a spoolfile TEXTed and you own only one spoolfile then it will be implicitly TEXTed for you and listed. The OWNER parameter allows you to implicitly text another user's spoolfiles. Syntax: LIST [range] [;owner=user[.acct]] [;page=n] Parameters: range - [optional], the range of lines to be seen from the current text file. "range" can be one or more of the following: ALL - the entire file is listed (with page breaks). FIRST - the first record of the file is listed. LAST - the last record of the file is listed. n - record n (one-relative) is listed. If n=0 the record pointer is moved to bof, nothing is listed. If n exceeds eof then eof is used. - the next record in the file is listed. * - the current record in the file is listed. m/n - record m thru record n are listed. exp1/exp2 - record computed by evaluating expression1 thru the record computed by evaluating expression2. (note: for '*', current position has precedence over multiply) owner - [optional], the name of the owner of the spoolfile(s) that you want to implicitly TEXT and list. The default is to list your own spoolfiles. The owner parameter is only recognized when there is not a currently TEXTed spoolfile. page=n - [optional], n lines will be shown before a page break occurs. The default is the same as for the PRINT command, namely 23. The HPPAGE variable can be set, via the MPE SETVAR command, to change the default page size. A page size of zero suppresses all page breaks, meaning the entire range will be displayed uninterrupted. NM Spooler: SPOOK's LIST is supported via the :PRINT command. For example, :print o123.out.hpspool ;num Abbreviations: LIST (L) PAGE= (PG=) Examples: > text #O123 > list 3 > list all ;page=0 {no page breaks} > l 6/30 > l last-20/last {lists the last 20 lines of the file} > list {lists the next line} > l first+10/last-(3+2^5) {lists 11 thru last-35} > l */*+20 {lists current position thru current+20} > l */*+20*2 {tricky 2nd '*' means multiply} > text {un-text spoolfile} > l all;owner=cathy {implicit text/list of cathy's spoolfiles} Related Commands: SHOW, TEXT, FIND, BROWSE SPKHELP_LISTREDO LISTREDO - lists all of the commands in SPOOK's redo/history stack. The size the redo stack is the same as the CI's redo stack, and is defined by the HPREDOSIZE CI variable. Syntax: LISTREDO Parameters: none Abbreviations: LISTREDO (LISTR) Examples: > listredo > listr Related Commands: DO, REDO SPKHELP_PURGE PURGE - allows you to delete/purge one or more spoolfiles. Syntax: PURGE spool_spec Parameters: spool_spec- spspec [;datespec] or '~' Tilda refers to the previous spool_spec selection. spspec - required, one or more owner names and/or device file ids (dfid) separated by commas. Each owner name can be wild- carded (both the user and account names). Also, each wildcarded owner name can have other owners "subtracted" from it. The complete format is: spspec ::= spid [-spid [-spid]...] [,spid [-spid]]... spid ::= user[.account] or dfid or '*' datespec - [optional], either the age of a spoolfile specified in days old, or the creation date as mm/dd/yy. The syntaxes are: daysold number-of-days, from 0-30. date mm/dd/[yy[yy]]. relop ::= < or <= or = or > or >= Daysold and date are mutually exclusive, and can only be specified once. If the year in the "date" format is defaulted then the current year is assumed. A spoolfile can be referred to by it's device file ID (dfid) or by its owner (user.account). '*' refers to the currently TEXTed spoolfile. '~' refers to the previously specified spool_spec which may include dfid's, owner names, and a date specification. The NM Spooler will not let you get to spoolfiles that you do not have access to. The two date-related parameters provide additional filtering based on how old or new a spoolfile is. NM Spooler: SPOOK's purge is supported via the :SPOOLF ...;DELETE command. For example, :spoolf @; seleq=[owner=foo.bar] ;DELETE purges all of FOO.BAR's spoolfiles. Another example, :spoolf (#O123,456) ;DELETE deletes 2 spoolfiles: O123.OUT.HPSPOOL and O456.OUT.HPSPOOL. Abbreviations: PURGE (P) Examples: > purge #o123 > p 123, 456 > p clh.jhv, daren.@ > p mikep-#o123, dougc > p @,789,wing.@-wing.c ;daysold>=5 > p @.@-@.sys-@.diag-jeff.ui; date<=9/30/90 > p ~ {refers to above selection} Related Commands: SHOW, TEXT SPKHELP_RAWLIST RAWLIST - is a simple interface to PRINTSPF.PUB.SYS. When a dfid is specified it becomes implicitly TEXTed. RAWLIST mimicks the functionality of the SPOOK program's "mode c=on" command, by displaying the raw spool- file contents (including spool open record, environment, carriage control and close records). Syntax: RAWLIST [dfid] Parameters: dfid - [optional] the device file id, in the form of: [#O]nnn or *. This field appears under the SPOOLID label in the SHOW command output. If omitted, or '*' is specified, then the current TEXT file is used. Abbreviations: RAWLIST (RAWL) Examples: > rawlist #O123 > rawl 456 > rawl * > rawlist Related Commands: TEXT, LIST SPKHELP_SHOW SHOW - allows you to see one or more spoolfiles. Spoolfile selection can be specified by dfid, owner (user.account), creation date, age, and type (input or output). SHOW, with no parameters, displays all of your own spoolfiles. Syntax: SHOW [spool_spec] [;[@] [O] [I]] Parameters: spool_spec- spspec [;datespec] or '~' Tilda refers to the previous spool_spec selection. spspec - [optional], one or more owner names and/or device file ids (dfid) separated by commas. Each owner name can be wild- carded (both the user and account names). Also, each wildcarded owner name can have other owners "subtracted" from it. The complete format is: spspec ::= spid [-spid [-spid]...] [,spid [-spid]]... spid ::= user[.account] or dfid or '*' If "spspec" consists only of dfids then detailed spoolfile information is displayed. Detailed output is available when "spspec" contains owner names via the '@' option. If "spspec" is omitted then only your own spoolfiles are reported. datespec - [optional], either the age of a spoolfile specified in days old, or the creation date as mm/dd/yy. The syntaxes are: daysold number-of-days, from 0-30. date mm/dd/[yy[yy]]. relop ::= < or <= or = or > or >= Daysold and date are mutually exclusive, and can only be specified once. If the year in the "date" format is defaulted then the current year is assumed. @ - [optional], causes two-lined (detailed) display. Note: this is the default when "spspec" is a dfid(s). O - [optional], causes only output spoolfiles to be selected. I - [optional], causes only input spoolfiles to be selected. A spoolfile can be referred to by it's device file ID (dfid) or by its owner (user.account). '*' refers to the currently TEXTed spoolfile. '~' refers to the previously specified spool_spec which may include dfid's, owner names, and a date specification. The NM Spooler will not let you get to spoolfiles that you do not have access to. The two date-related parameters provide additional filtering based on how old or new a spoolfile is. NM Spooler: SPOOK's show is supported via the :LISTSPF command. For example, :listspf O@; seleq=[owner=foo.bar] displays all of FOO.BAR's output spoolfiles. Another example, :listspf (#O123,456) shows 2 spoolfiles: O123.OUT.HPSPOOL and O456.OUT.HPSPOOL. Abbreviations: SHOW (S) Examples: > show #o123 > s 123, 456 > s clh.jhv, @.hpe ; O@ {show detailed info for output spoolfiles} > s fred-#o123, zinta.@ ;@ {detailed output for I and O spoolfiles } > s @, 789 ;daysold > 6 > s ~ {refers to above selection} > s @.@-@.sys-@.diag-jim.nls; date >= 9/30/90 > s ~;o@ {detailed output info for above selection} Related Commands: LIST, :LISTF @.OUT.HPSPOOL SPKHELP_SET SET - allows you to set and display certain SPOOK features. Syntax: SET [[msg=] LOUD | QUIET] [[;owner=] user[.acct]] Parameters: msg - LOUD indicates that you want to see informational messages, such as the equivalent NM Spooler command, eof/creation date of TEXTed spoolfiles, "SHOW" output for all the NM Spooler, etc. LOUD is the default. QUIET means that you don't want to see these messages. owner - the default user name used by the SHOW and LIST commands. Wildcarding is supported. Both parameters must be omitted in order to see their current values. Abbreviations: none. Examples: > set {displays current MSG and OWNER values} > set msg=quiet {sets SPOOK's messages to QUIET} > set owner=mgr {sets the default owner to MGR.!hpaccount} > set loud {sets SPOOK's messages to LOUD} > set @.posix {sets the default owner to @.POSIX} SPKHELP_TEXT TEXT - causes the dfid to become the "currently texted file". TEXT is used in conjunction with the LIST and FIND commands. Also, the SHOW, ALTER and PURGE commands recognize '*' as the currently texted dfid file. Note: TEXT does not open or lock the spoolfile, thus its state can change while it is texted. Syntax: TEXT [dfid] Parameters: dfid - [optional], the device file id (also known as the SPOOLID) in the form: [#O]nnn. This number appears under the SPOOLID column in the SHOW command output. When a dfid is TEXTed and the user is SET LOUD (default) then the dfid file's EOF and creation date/time are displyed. If "dfid" is omitted or '*' is used then the currently texted dfid is un-texted. Abbreviations: TEXT (T) Examples: > text #o123 > t 456 > t * {un-text current dfid} > t {un-text current dfid} Related Commands: LIST, FIND, SHOW, ALTER, PURGE, SET, RAWLIST SPKHELP_DONE