Upload
darcy-washington
View
215
Download
0
Embed Size (px)
Citation preview
OpenVMS SEMINAR
1. Getting Access to an Open VMS System2. DCL Commands3. Recall and Command Line Editing4. Naming Files5. Directory Structures and Commands6. Creating Text Files with the EVE Editor7. Managing & Displaying Files8. Protecting Your Data9. Customizing Your Environment10. Command Procedure
CONTENTS
1.Getting Access to an OpenVMS System
Overview of the Environment Log into an OpenVMS system Log out of an OpenVMS system Change your security password
Section Objective
Overview of the Environment
database
UNIX VMSUSER
P.C
TCP/IP
database
DECnet
TCP/IP TCP/IP
R2 FAB
In a Network
Overview of the Environment
VMS VMSUSER
VMS
TCP/IP
DECnet
TCP/IP TCP/IP
database
database
database
In a VMScluster
Easily share CPU resources,queues, and data
안정적인 system
DECnet DECnet
Logging in & out of the system
$ set password/generateBy system manager
Change passwordCommand
$ logout / fullLogging out Command
XXLower or Uppercase
PasswordusernamePrompt
OOUnique
6 ∼ 32
( A ∼ Z, 0 ∼ 9, $,-,_)
1∼12Characters
PasswordUser nameUser account
Example of Logging in & Out of the System
2. DCL Commands
Name and identify the DCL Commands Special DCL features Getting Help Explain the structure of error messages
Section Objective
Name and identify the DCL Commands
Prompt
Verb Keywordparamete
r
QualifierQualifier ValueCommand
QualifierPositional Qualifier
$ print a.lis /copies = 2
$ show time
Command Line Needs space each (but “/” , ”,” , ”=“ )
Special DCL features
Feature EX
Command Abbreviation
(Command,keyword,qualifier)
4 characters $ show time $ sh ti
Command Prompting (not type parameters or keywords)
$ show return _what : time
Long Command Lines
End with Hyphen (-)
HICIM1_HICIM_V3.0> show -
_HICIM1_HICIM_V3.0> time
24-SEP-2000 10:10:54
Getting Help
Explain the structure of error messages
• Syntax error in command line
• Wrong parameter (ex. Nonexistant filename)
• Unavailable resource (ex. A disk was not available)
• Hardware/software problem
• Program error
1) Why error Message Occur
Explain the structure of error messages (Cont’d)
2) The Structure of an Error Message
EX
HICIM1_HICIM_V3.0> sjow time %DCL-W-IVVERB, unrecognized command verb – check validity and spelling \SJOW\
DESCRIPTION
%System message delimiter
DCLFacility code (what part of the o/s generated the error)
WSeverity level code
IVVERBIdentification code
OTHERMessage text
• F (Fatal or severe, level4)
• I (Informational ,level3)
• E (Error, level 2)
• S (Success , level 1)
• W (Warning , level 0)
3) Severity Levels
Explain the structure of error messages (cont’d)
HICIM1_HICIM_V3.0> dir myfile.lis
%DIRECT-W-NOFILES, 파일이 없음
HICIM1_HICIM_V3.0> delete myfile.lis
%DELETE-E-DELVER, explicit version number or wild card required
HICIM1_HICIM_V3.0>copy/log temp.t temp2.t
%COPY-S-COPIED, Hi….
HICIM1_HICIM_V3.0> purge/log
%PURGE-I-FILPURG, HIC
HICIM1_HICIM_V3.0>deassign myfile.lis
%SYSTEM-F-NOLOGNAM,
no logical name match
3. Recall and Command Line Editing
Use the recall function Use the special control keys for line editing and display functions
Section Objective
Use the recall function
Verb Qualifiers Description
recall
= Ctrl / B Recalls the last commands(254)
/ all Lists all the commands in the recall buffer
/page Displays the commands one screenat a time
n Recall the number n
Verb Recall the last Verb command line
/erase To empty recall buffer
KeysUp arrow To step backwards through buffer
Down " To step forwards through buffer
Use the special control keys for line editing and display functions
CONTROL KEYSDescription
CONTROL OTHER
CTRL /A F14 Toggle(overstrike&insert)
CTRL /C & Y Interrupt command processing
CTRL /E To the end
CTRL /H F12 To beginning
CTRL /J F13 Delete the preceding word
CTRL /SF 1
Pause the scrolling of the output
CTRL /Q Restart after CTRL / S
CTRL /O Continue Processing (=CTRL/S&Q)
CTRL /Z F10 Exit the program
KEYS
DELETE Delete
LEFT/RIGHT ARROW
To the left / To the right
4. Naming Files
File Specification Rules for Naming Files Wildcards in File Specifications Default File Types
Section Objective
File Specification
FORMAT Node :: device : [directory] filename.type ; version
Node :: The name of the system the file is on
Device : The name of the device,usually a disk
[directory]
Space on a disk can be organized using areas called directories
Filename The actual name of the file (0 to 39 characters)
.type The nature and function of the file (0 to 39 length,usually 3 )
; version The version number of the file (from 1 to 32,767)
Rules for Naming Files
Use descriptive filenames
Use default file types
Don’t use special characters
Don’t use hyphens
Don’t use dollar signs
Wildcards in File Spec
The Asterisk (*)
To replace from 0 to 39 characters in a directory name,filename,or file type
The Percent (%)
To replace exactly one character in the file spec
Combinations of wildcards are allowed (=directory)
Default File Types (Common File Types)
File TypeDCL
CommandsExplanation
.com @ Command procedure
.exe run Executable program or utility
.dat Applications Data file (Often not readable)
.lis Print,type ASCII data (Normal readable)
.txt No specific Text file
.log No specificApplications containing messages,logging,etc
Default File Types (Programming File Types)
File Type DCL Commands Explanation
.cob cobol Cobol sources
.pas pascal Pascal sources
.mar macro Macro sources
.c cc C sources
.for fortran Fortran sources
.bas basic Basic sources
.obj link
An object file created by a compiler & used for linking into an executable image
Default File Types (Library File Types)
File Type DCL Commands Explanation
.olb library object library
.mlb library Macro library
.hlb Library,help Help library
.tld library Text library
.nlb libraryNational character set library
4. Directory Structures and Commands
Directory Structures Naming , Creating and Default Directories Example of File Information Qualifiers for displaying selected file information Qualifiers for selecting Files to Display
Section Objective
Directory Structures
[ U S E R]
[ .O U R]
[ .S Y S TE M]
[ .J P S ] [ .K IM]
[ .user]
[ FAMS V30]
[ .examples] [ .exerc ises]
[ S Y S TE M] [ ...]
[ 000000] MFD
UFD
(=login)
SFD
SFD
(Up to 7)
Level 0
Level 1
Level 2
Level 3
reference
Naming , Creating and Default Directories
Syntax [directory.subdir1.subdir2…,subdir7]
Dir File type .dir (always have a version number of 1)
Create Subdir Create/directory/log [directory.subdirectory]
Check location Show default
Change defaultSet default device:[directory.subdirectory]
Set default [.subdirectory]
Up one level Set default [-]
Up two levels Set default [--]
Default login dir Set default sys$login
File Information Directory /full filespec
Dir Wildcard Directory […]
Example of File Information
HICIM1_HICIM_V3.0> dir/full jps.*;*디렉토리 HICIM1$DKA100:[FAMSV30.USER]JPS.DIR;1 파일 ID: (554,39,0) 크기 : 1/4 소유자 : [SYSTEM]생성일 : 25-SEP-2000 06:34:34.65개정일 : 25-SEP-2000 06:34:34.65 (0)만료일 : < 지정된 것이 없음 >백업일 : < 백업이 기록되지 않았음 >유효한 것 : < 지정된것 없음 >기록 : < 지정된것 없음 >파일 구성 : 순차보류된 상태 : 온라인 캐쉬 속성 : Writethrough파일 속성 : 할당 : 4, 확장 : 0, 글로발 버퍼 수 : 0 기본 버전 한계 없음 , 연속적인 , 디렉토리 파일레코드 형식 : 가변길이 , 최대 512 바이트 s, 가장 긴 512 바이트 s레코드 속성 : 캐리지 제어 없음 , 걸치지 않음RMS 속성 : 없음저널링이 불가능함 : 없음파일 보호 : System:RWE, Owner:RWE, Group:RE, World:E액세스 제어 리스트 : 없음클라이언트 속성 : 없음합계 : 1 파일 , 1/4 블럭
Qualifiers for displaying selected file information
Qualifiers Function
/ size Size of the file
/ protection Protection information
/ owner Owner of the file
/ date Creation date
/ full All file information
/ total Total number of the file
Qualifiers for selecting Files to Display
Qualifiers Function
/ since=dateAll files,created since that day (ex.today,yesterday)
/ before=date All files,created before that day (ex.tomorrow)
/ backupFiles that have been backed up before or since the date specified,using the /before or /since
/ modifiedFiles that have been revised before or since the date specified,using the /before or /since
/ exclude= filespec Exclude filespec from the output
6. Creating Text Files with the EVE Editor
Introduction to OpenVMS Editors EVE Editing
Section Objectives
Introduction to OpenVMS Editors
• Design for the VT200-style keyboard• Insert and overstrike editing modes• Multiple editing windows• Definable shortcut keys for frequently used editing
functions
Features of EVE (Extensible Versatile Editor)
Features of EDT (Digital standard editor )• Many predefined edit keys• Line-mode editing • No overstrike editing mode• No multiple windows• No support for the VT200 keyboard
Starting EVE EVE Screen Layout Entering EVE Commands Moving the Cursor Entering and Modifying Text Finding and Replacing Text Cutting and Pasting with EVE Including Other Text Files EVE Online Help Saving Your Edited Text Recovering Files Using EVE Windows
EVE Editing
Starting EVE (1)
EVE Editing
Format $ editFile filename.file
typeStarting EVE
EX
$ edit blankYou will be prompted for it when you exit EVE
$ edit File spec (not exist) Create a new file
$ edit File spec (exist)Edit and create new version
EVE Screen Layout (2)
EVE Editing
I'm trying to connect a notebook(NEC VERSA M/100)
and a desktop ,both running Windows9x,via parallel printer ports with a cable.
[End of file]
Buffer: REPORT.TXT | 기록 | 삽입 | 정방향
Command:
5 lines written to file HICIM1$DKA100:[FAMSV30.USER.JPS]REPORT.TXT;3
Text window
End of the file marker Buffer
status line
Command line
Message
buffer
Filename
By default
Where or not this buffer can be modified
Text entry modeDirection of cursor
Entering EVE Commands (3)
EVE Editing
NEXT SCREENPREV SCREENSELECT
REMOVEINSERTFIND
PERIOD
Select
Reset
KP0
EDT Line
Open Line
ENTER
Return
Substitute
KP3Character
Spec Ins
KP2EOL
DEL EOL
KP1Word
ChngCase
COMMADel char
Rest Char
KP6Remove
Ins Here
KP5Reverse
Top
KP4Forward
Bottom
MINUSDel word
Rest Word
KP9Append
EDT Rep
KP8Section
Fill
KP7Move by
pageDO
PF4Del Line
Rest Line
PF3Find Next
Find
PF2Help
Key Def
PF1Gold
F10 : EXIT
F11 : Forward/R
everse
Pause :DO
/ :HELP:
FIND : Search for string
SELECT,INSERT,REMOVE : Cut & paste
F12 :Move by
line
Moving the Cursor (4)
EVE Editing
Line nMove to the specific
Mark or go to mark_nameSet a mark and go to the mark
BottomMove to the bottom of the file
TopMove to the top of the file
NEXT SCREENMove to the next screen
PREV SCREENMove to the previous screen
Start of the lineCTRL + HMove to the beginning of the current line
End of the lineCTRL + EMove to the end of the current line
RIGHT ARROWMove one character to the right
LEFT ARROWMove one character to the left
DOWN ARROWMove down one line
UP ARROWMove up one line
CommandKeyFunction
Entering and Modifying Text (5)
• Typing Text• Manipulating Text Strings• Cutting and Pasting Text (Using SELECT&INSET&REMOVE key)• Including Other Text Files
Finding and Replacing Text (6)
• Command : fins string• Press FIND key
EVE Editing
Cutting and Pasting with EVE (7)
EVE Editing
Yes , no , all , last , quitType
Replace old_string new stringCommand format
Including Other Text Files (8)• Position the cursor at insertion point• Press “DO” in command mode• Include file spec• The file is inserted at the insertion point
EVE Online Help (9)• Press “ / (HELP)” key• Press “pause(DO)” and then “HELP”
Recovering Files (11)• $ edit/recover original_filespec ! [ .TPU$JOURNAL in login directory]• The journal is deleted when EXIT or QUIT
EVE Editing
F10CTRL+Z
Save file as new_filespec
Save the text buffer into a new different file
Write new_filespec
Save file
Save the text buffer into a new version of the file
Write
Saving without Ending the Edit Session
Save your text in a new version file exit
Discard the text and exitQuit
Ending the Edit Session
Saving Your Edited Text (10)
EVE Editing
Using EVE Windows
7. Managing & Displaying Files
Summary of commands for managing files Summary of commands for displaying files
Section Objectives
Summary of commands for managing files
To find differenceBetween files
1st filespec [2nd filespec]/paralleldifference
To keep the number of versions
File spec [ , … ]/version_limit = nSet file
To find a file containing a specified string
File spec [ , … ] string [ , … ]
/exact “string”, /windows=(n,m)
Search
To delete files except the highest version of file
File spec [ , … ]/log, /confirm, /erase , /keep=nPurge
To delete unneeded version files
Filename.filetype;version/log, /confirm , /eraseDelete
To change the name of a file,or move it to another directory on the same disk
/log, /confirmRename
Copy of a file
Input filespec output filespec
/log, /confirm,/exclude=file specCopy
Create a new fileFile spec [ , … ]/log, /confirmCreate
DescriptionFile SpecificationQualifierCommand
Summary of commands for displaying files
To stop TYPE outputCTRL+Z or +C
To display the last n lines/tail=n
To print a fileFilename.type [ , … ]
/copies=nprint
To display page by page/page
To display the contents of a file and filetype .lis
File spec
type
DescriptionFile SpecificationQualifierCommand
8. Protecting Your Data
User Identification Codes Protection Codes Displaying & Manipulating Files Security
Information Setting & Deleting a directory file ACL & Saving Copies of Files
Section Objectives
User Identification Codes
Purpose of UICs• Read the file• Write the file• Execute the file• Delete the file
UIC Components• A group number• A member number
UIC Formats• Numeric [1 ∼37776,0 ∼177776]• Alphanumeric (ex. [MANAGER])
Displaying Your UIC
User Categories
World(W)Group(G)Owner(O)System(s)
Protection Codes
Types of File Access
Elements of Protection Code
Delete,purge,renameDelete (D)
Run , @Execute (E)
EditWrite (W)
Copy,type,print,directoryRead (R)
AccessProtection code
(S:RWED,O:RWED,G:RE,W)
Protection codeProtection code
delimiter
User category symbol(system)
User categorydelimiter
User categoryAccess codes
User categoryseparater
Displaying & Manipulating Files Security Information
(ex) Set security/protection = (s:rwe,o:rwe,g,w) sample.file
Control a file’s UIC protection codeSet security/protection=(code) filespec
To change default protection
protection
security Display all of the aboveshow Display the default protection for
process
/security
/owner
/protection
/Qualifier or Keyword
Set protection =(s:rwe,g)/default
Display all of the above
Display the owner
Display the UIC protection code
directory
Security InformationCommand
Setting & Deleting a directory file
Setting directory files protection
Delete the directory file itselfDelete (D)
List the file ,without using wildcardsExecute (E)
May write into this directory(Including create,delete,rename files)
Write (W)
List the files in this directory ,including the use of wildcards in the filename
Read (R)
AccessProtection code
Deleting a directory file• Remove all files from the directory ,either by deleting them or
renaming them to another directory (The directory must be empty)• Set your default to a higher level directory• Change the protection on the directory file (To have delete access)• Delete the directory file
ACL(Access Control List) & Saving Copies of Files
Backup
Saving Copies of file
$ edit / acl menu.comidentifier=[jps],access=read+executeidentifier=[kim],access=read+executeidentifier=[200.*],access=read+execute
$ set security / acl = (identifier=[ron],access=read+execute) menu.com
Applying Specific Protection to Users
9. Customizing Your Environment
Processes Logical Names Symbols Key Definitions
Section Objectives
Processes
• Create by the system using "submit" command.• Terminate when the batch procedure completes.• It runs independtly of the submitting processes.
Batch
• Create with the "spawn" command.• It is dependent on its paraent.• To view subprocess information, using "show process/sub".
Subprocess
• Create when a user logs in.• Treminate when athe user logs out.• Its commands are entered from user terminal.
Interactive
Category
The user's log in sessionProcess
Logical Names
Definition• A character string that is used to represent other character called equivalence string
Commands to Create Logical Names• $ assign equivalence name [ , …] logical name
• $ define logical name equivalence name [ , …]
(ex) $ assign dka300:[ronald] ron
$ define ron dka300:[ronald]
Rules for Creating Logical Names• Maximum of 255 characters (equivalence name , logical name)
• Contain alphanumeric characters , _ , - , $,…
• Do not specify a colon of a logical name
Duration of a Logical Name• When you logout of the system ,the logical name is deassigned
• To be available every time log in , create the logical name in a command procedure login.com
Logical Names
Using Logical Names• CASE1 - for a directory specification
(ex) $ assign [heman.worksheet] ws
$ dir ws
• CASE2 - for a complete file specification
(ex) $ define scuba dka0:[heman.diving]beautiful_sports.txt
$ dir scuba
• CASE3 - in the left part of a file specification (the right part makes error)
(ex) $ define scuba dka0:[heman.diving]
$ dir scuba:beautiful_sports.txt
Display the equivalence string of a logical name (ex) $ assign dka0:[heman.diving] scuba
$ define fun scuba
$ show translation fun
FUN = “SCUBA” (the equivalence string of “fun” is “scuba”)
Logical Names
Iteratively translate the logical name up to 10 levels (ex) $ define scuba dka0:[heman.diving]
$ assign scuba fun
$ show logical fun
“FUN’ = “SCUBA”
1 “SCUBA” = “dka0:[heman.diving]”
Logical name tables• /process (private to your process only, this is default)
• /job (shared by your process and any of its subprocesses)
• /group (all the processes that are in your UIC group)
• /system (all the processes on the system)
Sharing Logical Names (ex) $ define/job demo myfile.lis (define the logical demo in the job logical table)
Removing Logical names (ex) deassign scuba
Symbols
Definition• A name that represents a numeric,character,or logical value.
Using symbols• As a synonym for an entire DCL command
• As a variable within a DCL command procedure
• As a parameter passed to a command procedure
Categories of symbol• Local symbols :
usually created & used as a variable within a command procedure, the local symbol is deleted when the command procedure exits
• Global symbols :
Use to continue after the command procedure exits,the global symbol is deleted when logout the process
Data types for symbols• Character string & integer number
Symbols
Creating symbols• Local symbols : Use one equal sign
$ symbol_name := string or $ symbol_name = "string" or $ symbol_name = integer_value (ex) $ her_name ;= joan simson $ show symbol her_name HER_NAME = "JOAN SIMSON" • Global symbols : Use two equal sings $ symbol_name :== string or $ symbol_name == "string" or $ symbol_name = integer_value (ex) $ his_name == "Johnny Simson" $ show symbol his_name HIS_NAME =="Johnny Simson"• Common : 1) Using the colon results in all the characters being converted to uppercase and all spaces and tabs will be replaced by single space. 2) Using with quotatin mark and omit the colon to preserve case and spaces in a string 3) The String is stored as uppercase
Symbols
Creating symbol as a command synonym (ex) $ home :== set default sys$login or $home ==" set default sys$login"
Creating symbols that can be abbreviated (ex) $ cl*eanup == "purge/log"
Caution (ex) $ del*ete == "delete/confirm"
$ del/entry=5
%DCL-W-CONFLICT,illegal….
Displaying Symbols (ex) $ show symbol [/global] [/local] [/all] symbol_name (default is local)
Deleting Symbols (ex) $ delete /symbol [/global] [/local] symbol_name
The Difference between a logical and a Symbol• Symbol for "Command synonym" & Logical for "Short or easy name forfile spec"
Key Definitions
Creating Keypad Definitions• $ define/key key_name equivalence_string (ex) $ set terminal/nonumeric $ define/key PERIOD "show time"
Displaying Keypad Definitions• $ show key/full key_name
Deleting keypad Definitions• $ delete/key key_name
COMMAND PROCEDURE
Developing Command Procedure
Design the command procedure Create the command procedure file (Use the text editor) Execute and test the command procedure Modify the command procedure,if necessary Add comments to simplify maintenance
Rules
Start each DCL command on a new line Precede DCL commands with a dollar sign Use a hyphen to continue a command on the next line(no $ sign) Precede comments with an exclamation point (!) Assign the default file type ,COM ,to all command procedure Use full DCL commands,no abbreviations End your command procedure with the EXIT command For readability,use blank command lines,with " $! "
Executing Command Procedure Executed by the DCL Command Language Interpreter To execute a command procedure interactively ,type the " @ "symbol (ex) @command_procedure.com To direct the output of the procedure to a file,use "/ourput" qualifier (ex) @july_reports/output = july.dat
Testing Your Command Procedure To test and debug command procedure, use "set verify" command Add "set verify" as the first line,to display each line before executing the line Add "set noverify" at the end of the procedure,not to display each line , just before the "exit" command After finishing test,remove "set verify" and "set noverify"
Halting Execution To interrupt the execution ,CTRL+Y To resume execution,use "continue" command
Writing a Login Command Procedure To execute the same commands each time ,place "login.com" file "login.com" should contain :
Assigning symbols
Defining logical names
Defining key definitions
Setting terminal characteristics
Setting broadcast settings
Changing your default directory
Changing your process name or privileges
Changing your DCL prompt
If you modify login.com, be sure to test it before you log out. If your login.com contains errors that prevent you from logging in, bypass if adding the "/nocommand" qualifier to your user name when logi in. (ex) username : hicim30/nocommand
Common Errors in Login Command Procedures
You cannot log in (check) if "login.com" contains a "logout" command instead of "exit" None of your customizations are in effect (check) use execute command "@login" No symbols (check) Use global symbols (two equals),not local symbols No key definitions (check) to execute one of the following commands to enable keypad definitions $ set terminal/nonumeric $ set terminal/applications_keypad
No DCL commands (check) Did you create a symbol that is the same as a DCL commands ? $ del*ete == "logout"
No features (check) There is an error in your login.com file.Enter the "set verify" command
"directory not found" (check) Edit the login.com file and make sure the correct directories
Lexical function A lexical function is a way for you to ask DCL to ask go into the system
and find information that you can use in a command. A lexical function can be assigned to a symbol
(ex)
Characteristics of Batch Jobs Allow long programs to execute whtiout typing up your terminal Run independently of your current process The default file type is ".COM" Format : $ submit filespec [, …] Commands
Command Function
Show queue/batch Display all batch queues
Show entry Show all of your batch
Set entry Change a characteristic of a job
Delete/entry Delete a job
• Useful Submit Qualifiers
Command/qualifiers description
$ submit/hold Hold a batch job until released
$ set entry n /release Release the held job n
$ submit/after = time filename Delay the execution of a job until after a specified time
$ submit/notify filename Be notified when the batch job is finished
$ submit /queue=queuename filename Specify a specific batch queue
$ submit/keep Keep the log file after it is printed
$ submit/noprinter Not print the log file
$ submit/parameter=(pa,..,p8) Pass parameters to the batch job