HP3000-L Archives

August 2004, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Paul Scott <[log in to unmask]>
Reply To:
Paul Scott <[log in to unmask]>
Date:
Wed, 25 Aug 2004 14:16:28 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (78 lines)
Below is a sample of how I build my cmndfiles with the help built in. It
won't achieve exactly what you are asking, but if the cmndfile is
executed without any parms, help pops up; if it executed followed by "?"
or "help" (in upper, lower or mixed case), help pops up. And if any of
the error testing within the command file fails (like an empty parm,
alpha in a numeric response, etc, then I call the cmndfile again to
force the help to pop up. Basically, I ram the help down the users
throat... :)

parm header="?",data="^",outrpt="^",pass="init"

if "!header" = "?" or '![ups("!header")]' = "HELP" then
  # generate inline help if no user input or if "Help" was input
  echo
  echo This command file adds headers to a report list after ever 50
  echo lines, and adds a total count to the bottom.
  echo
  echo Parameters:
  echo   1) Header file name - Required, 4 lines long, line 1 should
  echo      end with "Page:" with room to append page numbers after.
  echo      Note: Avoid placing characters in column 1!!!
  echo   2) Data file name - Required, record size < 500 bytes.
  echo   3) Output report name - Required, will be purged and built
  echo      automatically.
  echo
  echo   Example:
  echo   xeq !hpfile header1,datain,rptout
  echo
  return

endif

if "!pass"="init" then

  # initialize variables, build the output file, and set file equations

  if "!data" = "^" then
    echo Warning: Input file not specified!
    xeq !hpfile
    echo Terminating operation!
    return
  endif
...

Paul

-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On
Behalf Of Gehan G.
Sent: Wednesday, August 25, 2004 11:59 AM
To: [log in to unmask]
Subject: [HP3000-L] Commnad file help display

 I wrote a command file includeing a bit of long CI code. When I type
:help startpro my return is a print out of the startpro.command file.

 I was wondering if I could change that so when I type help startpro it
just gives a breif description of the useage, and not a print out of the
whole script?

Any help would be much appricated :)

Thanks,
Gehan G.



_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2