home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / vms / 20328 < prev    next >
Encoding:
Internet Message Format  |  1993-01-05  |  4.0 KB

  1. Path: sparky!uunet!munnari.oz.au!manuel.anu.edu.au!manuel.anu.edu.au!usenet
  2. From: bear@nuc.anu.edu.au (Bernhard Fabricius)
  3. Newsgroups: comp.os.vms
  4. Subject: Re: Help needed on Uppercase in a batchfile
  5. Date: 5 Jan 1993 04:15:50 GMT
  6. Organization: Nuclear Physics, ANU
  7. Lines: 104
  8. Distribution: world
  9. Message-ID: <1ib21mINNntn@manuel.anu.edu.au>
  10. References: <1993Jan4.204413.2561@merrimack.edu>
  11. Reply-To: BEAR@NUC.ANU.EDU.AU
  12. NNTP-Posting-Host: 150.203.19.47
  13.  
  14.  
  15. In article <1993Jan4.204413.2561@merrimack.edu>, finocchiaroj@merrimack.eduwrites:
  16. >Path: manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!hri.com!noc.near.net!merrimack.edu!finocchiaroj
  17. >From: finocchiaroj@merrimack.edu
  18. >Newsgroups: comp.os.vms
  19. >Subject: Help needed on Uppercase in a batchfile
  20. >Message-ID: <1993Jan4.204413.2561@merrimack.edu>
  21. >Date: 4 Jan 93 20:44:13 GMT
  22. >Organization: Merrimack College, No. Andover, MA, USA
  23. >Lines: 12
  24. >
  25. >I have a question on whether there is a Uppercase function that you can use for
  26. >a batchfile, or is there an escape sequence to turn on Capslock. For example
  27. >say this is a batchfile:
  28.  
  29. [I presume you mean "commandfile" when you say "batchfile" - not much point in
  30. asking for user input when running in batch!]
  31.  
  32. >    
  33. >    $ inquire/nopuct "enter your name: "
  34. >    
  35. >And you want the user to type in his name like this JASON and not like jason
  36. >I would appreciate any info on this.
  37.  
  38. Pull your self together! Couldn't you at least test if you have a problem
  39. before you post ? If you had tried it out you would have discovered that
  40. INQUIRE is a DCL function that always returns TRIMMed, COMPRESSed, UNCOMMENTed
  41. and UPperCASEd strings (see below for what that means!)
  42.  
  43. But your syntax is wrong - may I suggest that you use HELP INQUIRE (here is an
  44. extract copyright (C) Digital Equipment Corp etc):
  45.  
  46. 1  INQUIRE
  47.    Reads a value from SYS$COMMAND (usually the terminal in
  48.    interactive mode or the next line in the main command procedure)
  49.    and assigns it to a symbol.
  50.  
  51.    Format
  52.  
  53.      INQUIRE  symbol-name [prompt-string]
  54.  
  55. (etc etc - really is exciting reading!)
  56.  
  57. It is READ that takes whatever you type - case, spaces, tabs and all.
  58.  
  59. As to your question wheter there is an "Uppercase function": Once more, RTFM!
  60. Here is an extract from the FM (again copyright (C) Digital Equipment Corp etc)
  61. (HELP LEXICALS F$EDIT...):
  62.  
  63. 1  Lexicals
  64.    A set of functions that return information about character strings
  65.    and attributes of the current process.
  66.  
  67. 2  F$EDIT
  68.    Edits the character string based on the edits specified in the
  69.    edit-list argument.
  70.  
  71.    Format
  72.  
  73.      F$EDIT(string, edit-list )
  74.  
  75. 3  Return_Value
  76.    A character string containing the specified edits.
  77.  
  78. 3  string
  79.    Specifies a character string to be edited. Quoted sections of the
  80.    string are not edited.
  81.  
  82. 3  edit-list
  83.    Specifies a character string containing one or more of the
  84.    following keywords which specify the types of edits to be made
  85.    to the string. If you specify more than one keyword, separate them
  86.    with commas (,).  Do not abbreviate these keywords.
  87.  
  88.    Edit           Action
  89.  
  90.    COLLAPSE       Removes all spaces or tabs.
  91.  
  92.    COMPRESS       Replaces multiple spaces or tabs with a single
  93.                   space.
  94.  
  95.    LOWERCASE      Changes all uppercase characters to lowercase.
  96.  
  97.    TRIM           Removes leading and trailing spaces or tabs.
  98.  
  99.    UNCOMMENT      Removes comments.
  100.  
  101.    UPCASE         Changes all lowercase characters to uppercase.
  102.  
  103.    Edits are not applied to quoted sections of strings. Therefore,
  104.    if a string contains quotation marks (" "),  the characters within
  105.    the quotation marks are not affected by the edits specified in the
  106.    edit list.
  107.  
  108. Need I say more ? 
  109. --------------------------------------------------------------------------------
  110. Dr Bernhard Fabricius              |
  111. Academic VAX/VMS Support           |  "I am a Bear of Very Little Brain,
  112. Department of Nuclear Physics      |           and long words Bother me."
  113. Australian National University     |
  114.                                    |                           - A.A. Milne
  115. InterNet: BEAR@NUC.ANU.EDU.AU      |
  116.     POSTMASTER@NUC.ANU.EDU.AU      |
  117.  
  118.