1 / 266

Seminar 1024

Seminar 1024. OpenVMS System Management Techniques, Tools, and Tricks David J. Dachtera djesys@fsi.net DJE Systems http://www.djesys.com/. Agenda. Basic DCL Concepts Commands Command Procedures Verbs Symbols Flow Control (IF, GOTO, GOSUB, CALL) Useful Lexical Functions. Agenda.

Download Presentation

Seminar 1024

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Seminar 1024 • OpenVMS System Management Techniques, Tools, and Tricks • David J. Dachtera • djesys@fsi.net • DJE Systems • http://www.djesys.com/

  2. Agenda • Basic DCL Concepts • Commands • Command Procedures • Verbs • Symbols • Flow Control (IF, GOTO, GOSUB, CALL) • Useful Lexical Functions

  3. Agenda • Logical names • Logical name tables • Logical name table search order • Modifying the search order • Logical name types • Single Translation • Search list • “Rooted” (Concealed) logical names • Lexical Function Caveat • F$TRNLNM() differs from F$LOGICAL()

  4. Agenda • Logical names, cont’d • Cluster-wide logical names • Caveats • SYS$COMMON Notes • Caveats (VMS$COMMON) • Site-Specific Paths • Organizing local system management code

  5. Agenda • Network Topics • TCP/IP • TCP/IP Services (fka UCX) • Multinet • TCPware • CMU/IP (VAX only) • DECnet • Access control • FAL logging

  6. Agenda • Network Topics, cont’d • Remote procedures • Types • Security concerns • Network Alerts • OPCOM alerts for DECnet network access • OPCOM alerts for FTP network access

  7. Agenda • System Startup • STARTUP phases • STARTUP parameters • Site-Specific startups • Logging SYSTARTUP_VMS.COM • Node-specific startups • Saving a crash dump at start-up time • Soft-coding # of logins allowed at startup • SYSMAN and STARTUP

  8. Agenda • System Shutdown • SHUTDOWN parameters • SHUTDOWN$xxxx logical names • AUTOGEN Shutdowns • AGEN$SHUTDOWN_TIME logical name • Cluster Shutdown • REMOVE_NODE • Using SYSMAN

  9. Agenda • System/Startup File Caveats • Deprecated Lexical Functions • Lexical Function names misspelled • AUTOGEN • MODPARAMS.DAT • Reports and outputs

  10. Agenda • OpenVMS Management Tools • StorageWorks Command Console (SWCC) • OpenVMS Management Station • AMDS • Accessibility Manager for Distributed Systems • Availability Manager • Like AMDS, runs on MS-Windows

  11. Agenda • OpenVMS Security • Essentials • UICs and File/Directory Protection • Access Control Lists (ACLs) • Access Control Entries (ACEs) • Rights Identifiers and ACEs • Propagating ACEs and Default Protections

  12. Seminar 1024 • Basic DCL • Concepts

  13. Basic DCL Concepts • Command Elements • $ verb parameter_1 parameter_2 • DCL commands consist of a verb and one or more parameters.

  14. DCL Command Proc.’s • $ @procedure_name • Top level (or terminal) is DEPTH 0. • Each new command procedure invoked is a new procedure DEPTH. • Maximum depth is still 32.

  15. DCL Command Proc.’s • Parameters • $ @procedure_name p1 p2 p3 … p8 • Notes: • Only eight(8) parameters are passed from the command line, P1 through P8 • Parameters with embedded spaces must be quoted strings. • Parameters are separated by a space.

  16. DCL Command Proc.’s • Parameters, cont’d • $ @procedure_name p1 p2 p3 … p8 • Notes, Cont’d: • Reference parameters via the variable names P1 through P8. • No built-in “shift” function. If you need it, write it as a GOSUB.

  17. DCL Verbs • Internal commands • ASSIGN, CALL, DEFINE, GOSUB, GOTO, IF, RETURN, SET, STOP, others… • External commands • APPEND, BACKUP, COPY, DELETE, PRINT, RENAME, SET, SUBMIT, others...

  18. DCL Verbs, Cont’d • “Foreign” Commands • $ symbol = value • Examples: • $ DIR :== DIRECTORY/SIZE=ALL/DATE • $ ZIP :== $ZIP/VMS

  19. Command Qualifiers • $ command/qualifier • $ command/qualifier=value • $ command/qualifier=(value,value) • $ command/qualifier=keyword=value • $ command/qualifier=- • (keyword=value,keyword=(value,value))

  20. Non-positional Qualifiers • Apply to the entire command, no matter where they appear. • $ command param1/qual param2 • Example: • $ COPY A.DAT A.NEW/LOG • $ DELETE/LOG C.TMP;

  21. Positional Qualifiers • Apply only to the object they qualify. • $ command param1/qual=value1 - • param2/qual=value2 • Examples: • $ PRINT/COPIES=2 RPT1.LIS, RPT2.LIS • $ PRINT RPT1.LIS/COPIES=1,- • RPT2.LIS/COPIES=3

  22. Common Qualifiers • Many commands support a set of common qualifiers: • /BACKUP /BEFORE /CREATED /EXCLUDE /EXPIRED /INCLUDE /MODIFIED /OUTPUT /PAGE /SINCE • See the on-line HELP for specifics.

  23. DCL Statement Elements • $ vbl = value • DCL statements are typically assignments where a variable receives a value.

  24. Assignment Statements • $ vbl = F$lexical_function( params ) • Examples: • $ FSP = F$SEARCH(“*.TXT”) • $ DFLT = F$ENVIRONMENT (“DEFAULT”) • $ NODE = F$GETSYI(“NODENAME”)

  25. Assignment Statements • $ vbl = string_expression • Examples: • $ A = “String 1 “ + “String 2” • $ B = A - “String “ - “String “ • $ C = ‘A’ • Maximum string length • 255 bytes (<=V7.3) • 4096 bytes (>=V7.3-1)

  26. Assignment Statements • $ vbl = numeric_expression • Examples: • $ A = 1 • $ B = A +1 • $ C = B + A + %X7F25 • $ D = %O3776

  27. Assignment Statements • $ vbl[start_bit,bit_count]=numeric_exp • Examples: • $ ESC[0,8]=%X1B • $ CR[0,8]=13 • $ LF[0,8]=10 • $ FF[0,8]=12 • $ CRLF[0,8]=13 • $ CRLF[8,8]=10

  28. Assignment Statements • $ ESC[0,8]=%X1B • $ SHOW SYMBOL ESC • ESC = "." • $ CR[0,8]=13 • $ SHOW SYMBOL CR • CR = "." • $ LF[0,8]=10 • $ SHOW SYMBOL LF • LF = "."

  29. Assignment Statements • $ FF[0,8]=12 • $ SHOW SYMBOL FF • FF = "." • $ CRLF[0,8]=13 • $ SHOW SYMBOL CRLF • CRLF = "." • $ CRLF[8,8]=10 • $ SHOW SYMBOL CRLF • CRLF = ".."

  30. Assignment Statements • DCL provides for substring replacement. • $ A := abcde • $ SHOW SYMBOL A • “ABCDE” • $ A[3,2]:=XX • $ SHOW SYMBOL A • “ABCXX”

  31. Assignment Statements • $ vbl = boolean_expression • Examples: • $ MANIA = (“TRUE” .EQS. “FALSE”) • $ TRUE = (1 .EQ. 1) • $ FALSE = (1 .EQ. 0) • $ YES = 1 • $ NO = 0

  32. Assignment Statements • Local Assignment: • $ vbl = value • Global Assignment: • $ vbl == value

  33. Assignment Statements • Quoted String: • $ vbl = “quoted string” • Case is preserved. • Examples: • $ PROMPT = “Press RETURN to continue “ • $ INVRSP = “% Invalid response!”

  34. Assignment Statements • Unquoted string: • $ vbl := unquoted string • Case is NOT preserved, becomes uppercase. Leading/trailing spaces are trimmed off. • Examples: • $ SAY := Write Sys$Output • $ SYSMAN :== $SYSMAN ! Comment

  35. Foreign Commands • $ vbl := $filespec[ param[ param[ …]]] • “filespec” defaults to SYS$SYSTEM:.EXE • Maximum string length: • 510 bytes (<=V7.3) • 4096 bytes (>=V7.3-1)

  36. Symbol Scope • SET SYMBOL/SCOPE= • NOLOCAL • All “outer” level local symbols are “invisible” • LOCAL • Undoes NOLOCAL • NOGLOBAL • All “outer” level global symbols are “invisible” • GLOBAL • Undoes NOGLOBAL

  37. Symbol Scope • SET SYMBOL/GENERAL/SCOPE=xxxx • Specifies that the values of the /SCOPE qualifier pertain to the translation of all symbols except the first token on a command line. • /GENERAL is incompatible with /ALL or /VERB.

  38. Symbol Scope • SET SYMBOL/VERB/SCOPE=xxxx • Specifies that the values of the /SCOPE qualifier pertain to the translation of the first token on a command line as a symbol before processing only. It does not affect general symbol substitution. • /VERB is incompatible with /ALL or /GENERAL.

  39. Symbol Scope • SET SYMBOL/ALL/SCOPE=xxxx • Specifies that the values of the /SCOPE qualifier pertain both to the translation of the first token on a command line and to general symbol substitution. • /ALL is incompatible with /GENERAL or /VERB.

  40. Conditional Expressions • $ IF condition THEN statement • Variations: • $ IF condition THEN $ statement • $ IF condition THEN - • $ statement

  41. Conditional Expressions • $ IF condition • $ THEN • $ statement(s) • $ ENDIF

  42. Conditional Expressions • $ IF condition • $ THEN • $ IF condition • $ THEN • $ statement(s) • $ ENDIF • $ ENDIF

  43. Conditional Expressions • $ IF condition • $ THEN • $ IF condition • $ THEN • $ statement(s) • $ ENDIF • $ statement(s) • $ ENDIF

  44. Conditional Expressions • $ IF condition • $ THEN statement(s) • $ IF condition • $ THEN • $ statement(s) • $ ENDIF • $ ENDIF • This may not work in pre-V6 VMS!

  45. Conditional Expressions • $ IF condition • $ THEN • $ statement(s) • $ ELSE • $ statement(s) • $ ENDIF

  46. Labels, GOTO • $ GOTO label_1 • . • . • . • $label_1:

  47. GOSUB, RETURN • $ GOSUB label_1 • . • . • . • $label_1: • $ statement(s) • $ RETURN

  48. GOSUB, RETURN • Emulate UN*X/DOS shell SHIFT: • $SHIFT: • $ P1 = P2 • $ P2 = P3 • $ P3 = P4 • $ P4 = P5 • $ P5 = P6 • $ P6 = P7 • $ P7 = P8 • $ P8 = "" • $ RETURN

  49. SUBROUTINE - ENDSUB... • $ CALL label_1[ param[ param[ …]] • . • . • . • $label_1: SUBROUTINE • $ statement(s) • $ END SUBROUTINE

  50. Lexical Functions • Functions built into the DCL Lexicon • F$CONTEXT F$CSID F$CVSI F$CVTIME F$CVUI F$DEVICE F$DIRECTORY F$EDIT F$ELEMENT F$ENVIRONMENT F$EXTRACT F$FAO F$FILE_ATTRIBUTES F$GETDVI F$GETJPI F$GETQUI F$GETSYI F$IDENTIFIER F$INTEGER F$LENGTH F$LOCATE F$MESSAGE F$MODE F$PARSE F$PID F$PRIVILEGE F$PROCESS F$SEARCH F$SETPRV F$STRING F$TIME F$TRNLNM F$TYPE F$USER F$VERIFY

More Related