March 1984 Helen Pain AI1 NOTES ON USING EMAS Quick [this note assumes lower case and nobrackets options] Reference 1. LOGGING ON LOGGING First find yourself a terminal, switch it on, and press the ON space bar a few times. You should get a prompt for the host machine that you want - type 2972 Host: GESQ Host: 2972 then press then return button (I'll refer to this as ). The return button is pressed at the end of every command line. You will then be prompted for your user number and password: User: User:ecmi04 Pass: Pass:qwerty Your password will not be echoed. Remember to press return. If your password is correct you will then get a message something like: Logged on Test SS 3.02es 28/02/84 17.56.50 Users=66 Fsys=8 Group Holder : ECMI50 Funds left : 56.85 -------------------- AI2 course ---------------------- and probably some message (not included here). You may also get a message telling you that you have mail: New **MAILER?' 21/02/84 04.23: Outstanding message(s) Mail (see the later section on reading your mail). Terminal types: TERMINAL The system recognises different types of terminals.You TYPES can find out what type of terminal the system thinks you are using, and if it doesn't know (or it is wrong) you can tell it: Which Your terminal type is unknown terminaltype? Command:terminaltype ? unspecified 2 Command:terminaltype Terminals supported are Choices 0 unspecified 1 Hardcopy, width 72 (a whole load more numbers and types) 12 VT105 13 Hazeltine Esprit 14 Hazeltine 1500 15 Newbury (and more) Please type the number of your terminal and press 'return' Setting Terminal: 13 terminaltype Your terminal type is Hazeltine Esprit Passwords: PASSWORD You may wish to change your password. [Please tell me if you do!] You are offered foreground and background passwords: you will not need the background password. Changing Command:password password Which password do you want to change? (F for foreground, B for background, FB for both) :f Passwords will not be echoed. Type in your current FOREGROUND password - :qwerty CHANGE FOREGROUND PASSWORD Type in your new password - :fred Please type new password again to confirm - :fred Password changed. 2. PROMPTS. PROMPTS The first character or word on a line, printed by the computer, gives an indication of what sort of commands you are expected to give. It is referred to as the prompt. The prompt may indicate "what level" you are at. When you first log on you will be at the top level, monitor level. From here you can get into an editor, the mail system, help, prolog, or what ever else the system will let you do. You can also do things like copy files, look at other people's files, send things to the line printer, etc. The prompt at monitor (or command) level is: Command: Command: Nothing will happen until you give a command, followed by : Command:mail 3 For example, to get into the mail system, give the command mail. You then get the following prompt from the mail system: Mail: Mail: and if you wanted to compose a message you could give the command compose and would be prompted as follows: Mail:compose To: ecmi04 Subject: notes Text: :this is the prompt within the mail system :indicating that you can insert your message :: Send now? : y Message sent and filed Mail:quit Mail:quit You end your message by typing a single : after the : prompt, and you leave the mail system with the command quit. You are now back at command level and might go into the help system: Help: Command:help (a page of help information will be printed here) End of section View: View: At the end of each page you will either get the prompt 'view:' allowing you to name some other help section to view, or the word '...more' indicating that there is more information to be seen from the previous section: ...more View:quit View: quit To get more, type , to get back to command level type quit. You can get into the editor ecce from command level: ecce Command:ecce mygreet > **Additional facilities in this version of ECCE. Please VIEW(SUBSYS.NEWECCE) for details. Edit > 4 The > is the ecce prompt - see ecce documentation for the commands that you might give. > >%c >%c Typing %c after the > gets you out of ecce. [This is one of the few places that quit will not get you out!] Load a file into the editor em: em Command:em howtoemas > Editor 16 >p You are told that there are 16 lines in the file already. The em command prompt is > . The command q gets you out of em. If you have not kept your editing by writing the contents of the editor back to the file then you will reminded: Are you sure? n ? >w 20 >q >q To run prolog give the command myprolog or p at command level: prolog Command:prolog Emas Prolog version 4 | ?- | ?- true. The | ?- is the prompt for a goal. yes | ?- [user]. | | father(fred,tom). If you are consulting the user file the prompt will be a single | input is terminated by ^y (hold the control button and press y). | ^y | ?6 user consulted 60 bytes 26 mscs. yes | ?- quit. | ?- quit. to get out of prolog, one way is to use quit followed by a full stop. [ Prolog execution halted ] Command: 5 STOPPING & 3. STOPPING AND ALTERING COMMANDS. ALTERING del del or rub out this button deletes the last typed character each time you use it ^ ^ ^ means that you must hold the control button down as you type this character ^x ^x deletes the whole of the line that you have started typing ^y ^y ends inputting eg if you are typing in data esc a esc a press the esc button, then a, then return. esc a aborts whatever the current command is and returns you to command level. If you press esc by mistake, do before typing anything else and the esc will be ignored. [esc a will get you out of just about anything!] 4. MAIL MAIL If you have been sent mail since you last logged on you will receive a message telling you so: **MAILER?' 28/02/84 17.47: Message from E.McIntosh In order to read this message or to send a message you need to get into the mail system: Command:mail Message Each message that you receive is numbered and will be kept numbers until you get rid of it. Numbers go from 1 upwards, messages are referred to by these numbers. 1 new message You are told how many new messages you have and are given one line of information about each: n 6<= (23) 28 Feb E.McIntosh @ RCO test to list message This is a new (n) message, number 6 in your file of messages. It is 23 characters long, sent 28th Feb, from E.McIntosh and its subject is "test". Each new message is listed by . Mail: 6 (Message 6) Subject: test From: E.McIntosh @ RCO 28 Feb 84 17:47:06 gmt To: ecmu49 this is a short message One line of information about each message in your message file (referred to as a folder) can be printed on the screen using the command scan, and the whole message using list. List and scan both use the message numbers as arguments: scan Mail:scan all 1 (118) 07 Feb To: ECMI04 student log 2 (171) 10 Feb H.Pain @ RCO projects 3 (171) 14 Feb H.Pain @ RCO project 4 (63) 28 Feb To: ecmi04 notes 5 (23) 28 Feb To: ecmu49 test 6<= (23) 28 Feb E.McIntosh @ RCO test The message marked with <= is the one currently referred to, so the command scan or list without a message number would be taken to refer to this message. If another message is listed it becomes the current one: Mail:scan 2 2 (171) 10 Feb H.Pain @ RCO projects list Mail:list 2 (Message 2) Subject: projects From: H.Pain @ RCO 10 Feb 84 17:37:00 gmt To: ecmu35@2972 ,ecmu49@2972 In future I will be available to discuss projects and prolog problems on Fridays in my office at HPS. VERY IMPORTANT - in future please use the command myprolog instead of prolog. You can scan or list a sequence of messages also: Mail:scan 1-3,6 1 (118) 07 Feb To: ECMI04 student log 2<= (171) 10 Feb H.Pain @ RCO projects 3 (171) 14 Feb H.Pain @ RCO projects 6 (23) 28 Feb E.McIntosh @ RCO test 7 Mail:list 4,6 (Message 4) Subject: notes Date: 28 Feb 84 17:31:35 To: ecmi04 this is the prompt within the mail system (Message 6) Subject: test From: E.McIntosh @ RCO 28 Feb 84 17:47:06 gmt To: ecmu49 this is a short message Mail:list 2 (Message 2) Subject: projects From: H.Pain @ RCO 10 Feb 84 17:37:00 gmt To: ecmu35@2972 ,ecmu49@2972 In future I will be available to discuss projects and prolog problems on Fridays in my office at HPS. VERY IMPORTANT - in future please use the command myprolog instead of prolog. The current message can be replied to using the command reply: reply Mail:reply Replying to H.Pain @ RCO Text: :thanks, I received the message :: send Send now? : y Message sent and filed A copy of the message sent is also stored in your mail folder: Mail:scan 2-last (last refers to the last message) 2<= (171) 10 Feb H.Pain @ RCO projects 3 (171) 14 Feb H.Pain @ RCO projects 4 (63) 28 Feb To: ecmi04 notes 5 (23) 28 Feb To: ecmu49 test 6 (23) 28 Feb E.McIntosh @ RCO test 7 (30) 28 Feb To: H.Pain @ RCO Re: projects 8 Messages may also be marked for removal from the mail folder using the command discard, and the command tidy actually removes them: discard Mail:discard 4,5 2 messages discarded tidy Mail:tidy Folder M#INBOX contains 5 messages Mail:scan all 1 (118) 07 Feb To: ECMI04 student log 2 (171) 10 Feb H.Pain @ RCO projects 3 (171) 14 Feb H.Pain @ RCO projects 4 (23) 28 Feb E.McIntosh @ RCO test 5<= (30) 28 Feb To: H.Pain @ RCO Re: projects The messages are now renumbered eg the copy of the last message sent was number 7 but is now number 5: Mail:list 5 (Message 5) Subject: Re: projects Date: 28 Feb 84 17:52:29 To: H.Pain @ RCO thanks, I received the message If you wish to send a message use the command 'compose', and you will be prompted as follows: compose Mail:compose To: ecmi04 Subject: projects After To: (that is, 'in the to: field') put the user number or the user name. The subject can be anything you like. After the text prompt and colon, put your message. Each new line (after ) will start with a colon : to end the message type another colon on a line on its own and . Text: :I will come and see you Friday if that's ok. :If it's not let me kmow :: send Send now? : yes If you are satisfied with the message then type yes when 'send now?' is printed. 9 [If you wish to make any changes, type no and you will then get the Mail: prompt again. You can then edit any of the fields (To: Subject: Text:) of your message. See help in the mail system to do this]. Quit takes you back to command level: Mail:quit Mail:quit 5. FILEHANDLING a. What files? FILE Whenever you create a new file using an editor, or copy a file, HANDLING its name (or file descriptor) will be added to the list of files in your area. The command 'files' shows you what files you have: WHAT Command:files FILES? AI1 HOWTOEMAS * M#INBOX * M#PROFILE * MYGREET SFILE * SS#DIR SS#JOURNAL * SS#PROFILE You might want to know what filenames you have matching some pattern, eg any filename starting ss followed by any characters (indicated by *): Command:files ss* * SS#DIR SS#JOURNAL * SS#PROFILE or what files user ecmi04 has that start with the letter p : other user's Command:files ecmi04.p* files PARSE PRINTEXS If a filename is given on its own it is taken to refer to some file in your own area. If you are referring to another user's files then it is referred to by the usernumber followed by a full stop then the name of the file (or * to match any filename). match Command:files ecmi04.* any * AI1 * AI1MAIL * AI2MAIL FRED * PARSE PRINTEXS * SS#DIR SS#JOURNAL USEFUL VISITING The command 'list' prints the contents of a file on the terminal: 10 list Command:list mygreet greet([]). greet([X|Y]):- greet(X), greet(Y). greet(X):- write('Hello'), tab(1), write(X), nl. Command:list ecmi04.fred This is a file to demonstrate the use of the editor em containing a few lines of text. The name of this file is fred. COPYING & b. Copying and renaming files. RENAMING Files can be copied (the original is not altered): copy Command:copy ecmi04.fred,emdemo EMDEMO is a copy of ECMI04.FRED A copy of the file fred, belonging to ecmi04, is made and put in your own area under the name 'emdemo'. A message confirms that the copy has been made. Command:copy mygreet,greet GREET is a copy of MYGREET Identical files called greet and mygreet now exist. If you want to rename a file, that is call it a different name without saving a copy under the old name, use the command rename: rename Command:rename greet,testgreet greet no longer exists. Command:files AI1 EMDEMO HOWTOEMAS * M#INBOX * M#PROFILE * MYGREET SFILE * SS#DIR SS#JOURNAL * SS#PROFILE TESTGREET 11 c. Partitioned files. PARTIT- You are limited by the number of file descriptors (filenames) IONED that you can have in your area. However, you can put a number FILES of your files together under one heading, and they will then be using only one file descriptor. A number of files grouped together in this way is called a partitioned file. creating Command:newpdfile examples newpdfile New partitioned file 'EXAMPLES' created The command newpdfile has created a new partitioned file called examples. It doesn't yet have anything in it. Each member of a partitioned file is referred to by the the partitioned filename followed by _ (an underscore) and then the individual filename. copy Command:copy emdemo,examples_emdemo EXAMPLES_EMDEMO is a copy of EMDEMO A copy of the file emdemo is made in the partitioned file called examples. The partitioned file member 'examples-emdemo' can now be treated in the same way as any other file: list Command:list examples_emdemo This is a file to demonstrate the use of the editor em containing a few lines of text. The name of this file is fred. To get a list of members of a partitioned file the command analyse is used. (This command can be used with any filename to find out whattype it is eg character, data). analyse Command:analyse examples File: EXAMPLES Type: PARTITIONED Length: 184 Bytes Last altered: 28/02/84 at 18.04.04 Members: EMDEMO Other user's partitioned files may also be analysed: Command:analyse ecmi04.ai1 File: ECMI04.AI1 Type: PARTITIONED Length: 10480 Bytes Last altered: 16/02/84 at 17.19.28 Members: ATN DRINKS PROJECT RANDOM SENTENCE VISITING The member 'drinks' here would be referred to as ecmi04.ai1_drinks. 12 d. Cherishing files: CHERISHING Files not looked at for a number of weeks will be automatically FILES destroyed by the system. If you have files that you are not using at present, but do wish to use at a later date, then you need to mark them in some way so that you will later be able to retrieve them. This is called 'cherishing' files. Cherished files are removed from yous area, but are archived instead of being destroyed. This means that a copy is kept that you can restore: cherish Command:cherish howtoemas Command:files AI1 EMDEMO EXAMPLES * HOWTOEMAS * M#INBOX * M#PROFILE * MYGREET SFILE * SS#DIR SS#JOURNAL * SS#PROFILE TESTGREET The command cherish marks the file howtoemas. A * by the filename indicates that a file is cherished. Command:list sfile this is a small file of text archive Command:archive sfile The file sfile is archived: this does not happen immediately. To see which files have been archived use the following: Command:files ,a Archived files : 0 No files have been archived yet in this case. Archived files restore are restored with the command restore. e. To remove files: REMOVING The command destroy removes files from your area. You cannot FILES get them back once they are destroyed, so make sure that you really mean it! destroy Command:destroy mygreet f. Printing files: PRINTING To get hard copy of a file you can either sit at a teletype FILES instead of a vdu and list it, or you can get it printed on one of a number of printers around the university. Type the list command followed by the filename (as you would to list it on the list vdu screen) and then a comma , a full stop . and lp . 13 lp alone will cause the file to be printed on the printer at Kings Buildings. It will then be delivered for you to collect from Forrest Hill. If you would rather collect it from somewhere else (say George Square) then specify this using the command deliver. Use help deliver to find out the choices. Printout will continue to be delivered here (George Sq) until you change it again. deliver Command:deliver ercc(george square) .lp Command:list testgreet,.lp You can also get you file printed on a local lineprinter by specifying its number in the lp command: Command:list fred,.lp40 will print the file fred on the lineprinter at 59 George Square. (see information card for choices). 6. HELP. HELP The help system provides information on most of the commands on the system. Typing help on its own will give you information about the help system. Help and a command name will give you information on that particular command (if it exists): Command:help copy References found ---------------------------------------------------------- To examine a reference type its number and press 'return'. To return to this page, type R and press 'return' in response to the View: prompt (you may have to do this more than once). Q returns to command level. References to COPY 1 COPY . . . . . . . . EMAS Commands 2 COPY . . . . . . . . FILESTORE 3 Copy,Matrix . . . . . . NAGF 4 Copy,Vector . . . . . . NAGF ...more Help:quit Help: quit Command: To get back to command level type quit. 14 7. REFERENCES. REFERENCES For more information on EMAS see: EMAS 2900:User's Guide available from ERCC (KB or GSq) price c. #2.50 A summary of information is on the EMAS 2900 information card, free from ERCC. For information on the editor EM see: ecmi04.emnotes - available on-line or from me Using the Editor 'EM' on Emas available from ERCC, or from M.Pithie, DAI. For information on Emas PROLOG see: User's Guide to Emas PROLOG, D.A.I. Occasional Paper no 26 available from M.Pithie, DAI, or on-line (Command:um). [If you spot errors in this document, or wish to make comments, or have suggestions for additions or changes, please mail them to me, ecmi04, H.Pain@2972].