User Tools

Site Tools


openvms:openvms-cheatsheet

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
openvms:openvms-cheatsheet [2023/05/31 08:32] dodgeropenvms:openvms-cheatsheet [2023/07/01 08:09] dodger
Line 1: Line 1:
 ====== [CHEATSHEET] OpenVMS ====== ====== [CHEATSHEET] OpenVMS ======
  
 +====== Main concepts ======
 +
 +===== Keywords =====
 +
 +^ sort code ^ Full name ^ Translation to linux ^
 +| UAF | User authorization File | It's a combination of ''etc/passwd'', ''etc/group'' and SElinux/DB concepts with grants and roles |
 +| UIC | User Identification CODE | ''UID'' the user identificator, in OpenVMS is ''[1,100]''. As in linux should **NOT** be unique |
 +| DCL | Digital Command Language | ''bash'' LOL |
 +| CDU | Command definition utility | It's a kind of IDE or ''getops'', allow command line definitions |
 +| RMS | Record Management Services | ''journalctl'' (logs) |
 +| JBC | Job Controller | Queues |
 +| Symbol | - | A variable... |
 +
 +
 +===== key concepts =====
 +
 +^ OpenVMS ^ Linux ^ Comment ^
 +| ''SYS$MANAGER:SYLOGIN.COM'' | ''/etc/bashrc'' |
 +| ''SYS$LOGIN:LOGIN.COM'' | ''${HOME}/.bashrc'' |
 +| ''CTRL/Y'' | ''CTRL+C'' | when writing a command and you have a mistake, cancel the input (similar to ''sqlplus'' and ''CTRL+C'') |
 +| ''CTRL/Z'' | ''CTRL+C'' | Similar but on a interactive input prompt (running a cmd in interactive input mode) |
 +| ''!'' | ''#'' | comment delimiter |
 +| ''%'' | ''nothing here'' | Error message delimiter |
 +| ''^-(.*)'' | ''nothing here'' | Continue a message. For example 1st line begin with ''%'' and 2nd line with ''-'' |
 +
 +
 +===== Error levels =====
 +
 +^ alpha ^ numeric ^ level ^
 +| ''-S-'' | ''1'' | Success |
 +| ''-I-'' | ''3'' | INFO |
 +| ''-W-'' | ''0'' | Warning |
 +| ''-E-'' | ''2'' | Error |
 +| ''-F-'' | ''4'' | SEVERE |
 +
 +====== Programming ======
 +More or less
 +===== Symbols (Variables)  =====
 +
 +^ Creation ^ Description ^
 +| ''SYMBOLNAME = <value> '' | Creates a **local** symbol (string or integer) |
 +| ''SYMBOLNAME == <value> '' | Creates a **global** symbol (string or integer) |
 +| ''SYMBOLNAME := <value> '' | Creates a **local** STRING symbol |
 +| ''SYMBOLNAME :== <value> '' | Creates a **global** STRING symbol |
 +| ''DELETE/SYMBOL SYMBOLNAME'' | Destroy local variable''SYMBOLNAME'' |
 +| ''DELETE/SYMBOL/GLOBAL SYMBOLNAME'' | Destroy global variable ''SYMBOLNAME'' |
 +| ''SHOW SYMBOL SYMBOLNAME'' | Show content of the variable ''SYMBOLNAME'' |
 +
 +===== Aliases through symbols =====
 +Create an alias ''EDT' with a frequently used command:
 +<code DCL>
 +EDT :== EDIT/EDT/COMMAND=SYS$LOGIN:EDTINI.DDT
 +</code>
 +
 +
 +Replace a command with the command you want:
 +<code DCL>
 +PRINT :== PRINT/NOBURST/NOFLAG/NOTRAILER/NOTIFY
 +</code>
 +This will replace the command ''PRINT'' with ''PRINT/NOBURST/NOFLAG/NOTRAILER/NOTIFY'' everytime you launch it.
 +
 +===== Operations with symbols =====
 +
 +==== Arithmetic operations (integers) ====
 +
 +<code DCL>
 +$ APPLES = 10
 +$ SHOW SYMBOL APPLES
 +  APPLES = 10    Hex = 0000000A    Octal = 00000000012
 +
 +$ APPLES = 2 * (4+5)
 +$ SHOW SYMBOL APPLES
 +  APPLES = 18    Hex ...
 +$ ORANGES = 15
 +$ TOTAL_FRUIT = APPLES + ORANGES
 +$ SHOW SYMBOL TOTAL_FRUIT
 +  TOTAL_FRUIT = 33
 +</code>
 +
 +=== List of operations ===
 +^ Operation ^ 
 +| ''+'' |
 +| ''-'' |
 +| ''*'' |
 +| ''/'' |
 +
 +==== String operations ====
 +
 +<code DCL>
 +$ APPLES = "Apples"
 +$ SHOW SYMBOL APPLES
 +  APPLES = "Apples"
 +$ FRUIT = "Oranges and " + APPLES
 +$ SHOW SYMBOL FRUIT
 +  FRUIT = "Oranges and Apples"
 +</code>
 +
 +==== Using subshells in commands ====
 +
 +Sub-shell is invoqued with ''2 SINGLE QUOTES+VARIABLE+1 SINGLE QUOTE'', for examples:
 +<code DCL>
 +$ FILETYPE = "login.com"
 +$ TYPEIT = "TYPE ''filename'"
 +$ SHOW SYMBOL TYPEIT
 +  "TYPE login.com"
 +</code>
 +
 +<WRAP center round tip 60%>
 +Take care with string usage '':=''
 +</WRAP>
 +What works and what not (as a sub-shell):
 +  * Works:
 +<code DCL>
 +$ FILETYPE := "login.com"
 +$ TYPEIT := "TYPE ''filename'"
 +$ SHOW SYMBOL TYPEIT
 +  "TYPE login.com"
 +</code>
 +
 +  * DON'T Work (as a literal)
 +<code DCL>
 +$ FILETYPE := "login.com"
 +$ TYPEIT := "TYPE" +  filename
 +$ SHOW SYMBOL TYPEIT
 +  "TYPE FILENAME"
 +</code>
 +
 +<WRAP center round tip 60%>
 +In the other hand, without forcing string assignment
 +</WRAP>
 +Both are assigned as a variable:
 +<code DCL>
 +$ FILETYPE = "login.com"
 +$ TYPEIT = "TYPE ''filename'"
 +$ SHOW SYMBOL TYPEIT
 +  "TYPE login.com"
 +</code>
 +<code DCL>
 +$ FILETYPE = "login.com"
 +$ TYPEIT = "TYPE" +  filename
 +$ SHOW SYMBOL TYPEIT
 +  "TYPE login.com"
 +</code>
  
 ====== Startup ====== ====== Startup ======
 ===== Show available boot devices ===== ===== Show available boot devices =====
-<code bash>+<code DCL>
 show device show device
 </code> </code>
 ===== boot from device ===== ===== boot from device =====
-<code bash>+<code DCL>
 boot [DEVICE] boot [DEVICE]
 </code> </code>
 ex: ex:
-<code bash>+<code DCL>
 boot DKA0 boot DKA0
 </code> </code>
Line 18: Line 161:
 ===== Login ===== ===== Login =====
 **root** is ''SYSTEM'': **root** is ''SYSTEM'':
-<code bash>+<code DCL>
  Welcome to OpenVMS (TM) Alpha Operating System, Version V8.3  Welcome to OpenVMS (TM) Alpha Operating System, Version V8.3
  
 Username: SYSTEM Username: SYSTEM
 Password: Password:
 +</code>
 +
 +
 +
 +===== Logout =====
 +<code DCL>
 +LOGOUT
 +</code>
 +
 +<code DCL>
 +LOGOUT/FULL
 </code> </code>
  
Line 28: Line 182:
  
 ===== df ===== ===== df =====
-<code bash>+<code DCL>
 SHOW DEVICE SYS$SYSDEVICE SHOW DEVICE SYS$SYSDEVICE
 </code> </code>
Line 34: Line 188:
 ===== See system parameters ===== ===== See system parameters =====
 To check the values of your system parameters, enter the following command: To check the values of your system parameters, enter the following command:
-<code bash>+<code DCL>
 RUN SYS$SYSTEM:SYSGEN RUN SYS$SYSTEM:SYSGEN
 </code> </code>
 And then under ''SYSGEN>'' prompt, you can list parameters, for example: And then under ''SYSGEN>'' prompt, you can list parameters, for example:
-<code bash>+<code DCL>
 SHOW WSMAX SHOW WSMAX
 </code> </code>
- 
  
  
 ===== Show system pagelets ===== ===== Show system pagelets =====
-<code bash>+<code DCL>
 WRITE SYS$OUTPUT F$GETSYI("CONTIG_GBLPAGES") WRITE SYS$OUTPUT F$GETSYI("CONTIG_GBLPAGES")
 </code> </code>
 ===== Show free pagelets ===== ===== Show free pagelets =====
-<code bash>+<code DCL>
 WRITE SYS$OUTPUT F$GETSYI("FREE_GBLSECTS") WRITE SYS$OUTPUT F$GETSYI("FREE_GBLSECTS")
 </code> </code>
  
 ===== Generate more pagelets ===== ===== Generate more pagelets =====
-<code bash>+<code DCL>
 AUTOGEN AUTOGEN
 </code> </code>
 ===== Find how many pagelets are used by EXE ===== ===== Find how many pagelets are used by EXE =====
 In this case ''DCLTABLES.EXE'' In this case ''DCLTABLES.EXE''
-<code bash>+<code DCL>
 DIRECTORY/SIZE SYS$LIBRARY:DCLTABLES.EXE DIRECTORY/SIZE SYS$LIBRARY:DCLTABLES.EXE
 </code> </code>
Line 67: Line 220:
 ===== change system config ===== ===== change system config =====
 You have to edit: You have to edit:
-<code bash>+<code DCL>
 SYS$SYSTEM:MODPARAMS.DAT SYS$SYSTEM:MODPARAMS.DAT
 </code> </code>
Line 73: Line 226:
  
 ===== update system parameters and reboot ===== ===== update system parameters and reboot =====
-<code bash>+<code DCL>
 @SYS$UPDATE:AUTOGEN GETDATA REBOOT @SYS$UPDATE:AUTOGEN GETDATA REBOOT
 </code> </code>
  
  
-===== Change dynamic parameters ===== +===== Change dynamic parameters using SYSGEN===== 
-Using sysgen: +==== Run SYSGEN ==== 
-<code bash>RUN SYS$SYSTEM:SYSGEN+<code DCL>RUN SYS$SYSTEM:SYSGEN
 </code> </code>
 +==== SYSGEN: Modify parameter ====
 And (example): And (example):
-<code bash>+<code DCL>
 SYSGEN> USE ACTIVE SYSGEN> USE ACTIVE
 SYSGEN> SET GBLPAGES 100000 SYSGEN> SET GBLPAGES 100000
Line 91: Line 245:
  
  
 +==== SYSGEN: List all parameters  ====
 +<code DCL>
 +SHOW /ALL
 +</code>
  
  
 ===== empty ===== ===== empty =====
-<code bash>+<code DCL>
 </code> </code>
  
openvms/openvms-cheatsheet.txt · Last modified: 2023/07/01 08:10 by dodger