Home
AMOS Command Files User`s Manual
Contents
1. 4 1 to 4 2 FUNCI NS Asa 32n tum ede 4 2 G GOTO deste e eo d ak eb 3 2 Graphics lt 1 4 4 1 AlphaBASIC functions 4 3 Error checking 4 5 ite aesti n Se one 4 4 FUNCIONS reia RM 4 3 Mathematical operators 4 3 Relational operators 4 3 Reserved words 4 2 EE 4 3 Command File User s Guide Rev 00 Command File User s Guide Index Page 3 L 2 1 LOOKUP N ne d 4 2 LWORD Secs OE 4 3 M Mathematical operators 4 3 N NODE wed cated ore MR 4 3 Parameter symbols 5 1 5 3 Passing arguments to command files 5 1 PAUSE X rosis van oye eser 3 3 R Relational operators 4 3 Reserved words 4 2 S Sample command 5 A 1 SEVERITY pee e 4 2 Special Symbols 3 1 6 1 ee HEHE 6 4 Special 5 3 1 System initialization command file 2 2 T TIME Se o ense IUE ENTE ERES EE 4 2 TRUE Dua ego P c 4
2. might be IF LOOKUP INVEN DAT 1 RUN STOCK ELSE lt INVENTORY FILE NOT FOUND gt EXIT ENDIF Another example IF TIME 1200 Good afternoon gt ELSE Good morning gt ENDIF As you can see the IF program allows you to do many things within command files It gives your command files a great deal of flexibility and control over various situations 4 3USING IF WITH SPECIAL DO SYMBOLS Chapter Six contains a list of special DO file symbols When using any of these symbols that return a string value with the IF statement you must use quotes For example IF SNU John Smith lt Good day Johnny gt ELSE lt Hello gt Command File User s Guide Rev 00 The IF Statement 4 4CHECKING FOR ERRORS Page 4 5 The following reserved words are defined so you can check for specific errors and conditions reported by the monitor STANDARD RESERVED ERROR WORD CODE 0 1 ERR SPC 2 ERR MEM 3 ERR FNF 4 ERR FAX 5 ERR RDY 6 ERR FUL 7 ERR ERR 8 ERR USE 9 ERR ILC 10 ERR PRV 11 ERR WRT 12 ERR TYP 13 ERR DNX 14 ERR IBN 15 ERR INI 16 ERR FNO 17 ERR FAO 18 ERR KPT 19 ERR MNT 20 ERR IFL 21 ERR BBH 22 ERR BBW 23 ERR BBN 24 ERR NOQ 25 ERR MFD 26 ERR LNM 27 ERR RNR 28 ERR FIU 29 ERR RIU 30 ERR EMB 31 ERR DEL 32 ERR REN 33 ERR RNL 34 ERR RNO 35 ERR LQF 36 ERR NFS 37 ERR IRS 38 ERR BLK 256 ERR
3. The display of this command file would look something like this LOG DSK2 100 1 Logged into DSK2 100 1 Good Afternoon John Smith It is 13 00 You are job JOHN working on terminal SMITH using terminal driver ALPHA with the AM350 interface The system monitor is AMOS L You are operating under version 2 0A 175 2 Your root account is DSK2 100 1 Your privileges are 2149515264 and your level is 50 with an expertise level of 45 There are 371573 bytes of memory for your job Command File User s Guide Rev 00 APPENDIX A SAMPLE COMMAND FILES Below are some examples of the kinds of command files you can create to help you perform frequently used sequences of commands If you want all of the users on the system to be able to share your command files have the System Operator copy them into the System Command File Library DSKO 2 2 CMD If a command file is in this account it can be run by any user on the system without any disk or account specifications A 1BACK CMD This command file transfers backup copies of a disk to a VCR tape SE lt Backs up KILL MALSER WAIT MALSER Alert other the entire system gt jobs of backup gt Turn off AlphaMAIL job SEND PERFORMING BACKUP SYSTEM COMING DOWN SLEEP 25 LOG DSK0 1 2 ERASE LST ET NOLINK 1684 DSKANA 5 3 5 0 5 0 DSKANA DSK3 DSK1 D
4. 4 4 CHECKING FOR ERRORS 4 5 PASSING ARGUMENTS TO A COMMAND FILE PARAMETER SYMBOLS 5 1 SPECIAL PARAMETER SYMBOLS 5 3 5 2 1 D Default Parameter 5 3 5 2 2 Null Parameter Symbol 5 3 Command File User s Guide Rev 00 Page ii CHAPTER 6 SPECIAL SYMBOLS 6 1 INFORMATION 5 5 6 1 6 1 1 Original Device 6 1 6 1 2 P Original Account Symbol 6 1 6 1 3 Real Dollar Sign 6 2 6 1 4 TM Time of Day use tete E ESAE VE CEN SEES 6 2 6 1 5 TD Current Date 6 2 6 1 6 TW Day of the 6 2 651 7 GurrentdoD duoc toe ha OR N aden ed RC EACH A 6 2 6 1 8 NT Current Terminal 6 2 6 1 9 ND Terminal Driver 6 2 6 1 10 Interface 6 3 6 1 11 NM Modem 6 3 6 1 12 NS System 6 3 6 1 13 SV Operating System 6 3 6 1 14
5. As much as possible the expressions are compatible with AlphaBASIC This makes it easier for people already familiar with the AlphaBASIC IF statement and it makes it easier for AlphaBASIC programs to interact with command files 4 1RESERVED WORDS USED WITH IF You can use a number of special reserved words with the IF statement ERROR Tells you if an error occurred during the previous operation and what kind of error it was the section below for the error reserved words and examples of how to use Command File User s Guide Rev 00 Page 4 2 Chapter Four SEVERITY Tells you how severe the error that occurred in the last operation was This code can be from 0 to 17 octal the higher the number the more severe the error TIME The current time in string variable form The time is in 24 hour format without seconds for example 1 00 PM is 1300 DATE The current date in a string variable of YYMMDD form for example January 15 1987 is 870115 TRUE Equals TRUE for comparisons FALSE Equals FALSE for comparisons CTRLC Equals TRUE if was used at the keyboard 4 2FUNCTIONS USED WITH IF You can use the following functions with IF LOOKUP n Equals 1 if the file specified inside the parenthesis is found or 0 if itis not found The filename must be enclosed in quotes and is a standard file specification if the file is in another account include an account number etc DEVICE n Returns one or more numbers d
6. S gt required any time you log in from a logged off state This does not usually affect command files unless the command file uses a LOGOFF command and then tries to log in again AMOS continues to read lines of text from the command file until the file ends You may run enter and exit programs supply data to programs or perform system functions all under the control of a single command file Do not use the MEMORY command inside a command file This command changes the memory allocated to your job the section of memory you have been assigned Since your command file and any files it is using are in memory changing memory may cause serious problems As an example let s say you have a series of programs you need to run at the end of each week You might create a command file like this SI RUN PAYROL Runs the payroll for the week RUN INVENT Updates inventory records RUN COSTS Figures costs for the week RUN SHIP Compiles report of shipping RUN SUM Compiles weekly summary report PRINT DSK3 50 5 REPORT C 4 Prints shipping report PRINT DSK2 156 2 SUMMRY C 4 Prints summary report SEND FRED REPORT IS PRINTING The first line above is the special symbol that causes the lines of the command file to be displayed when the command file is executed The next five lines run AlphaBASIC programs the words after the semi colon indicate comments The nex
7. STANDARD RESERVED ERROR ERROR WORD CODE 513 ERR CLF Command line format error 514 ERR CLS Command line switch error 515 ERR SSD Bad SSD 516 ERR ONF Overlay not found 0 SEV NUL Operation completed no errors warnings 2 SEV WRN Operation completed with warnings only 4 SEV FER Operation completed with errors 6 SEV AER Operation aborted due to errors or C 8 SEV FTL Operation aborted due to fatal error Using the above reserved words you can check for problems that might occur when you run your command file For example RUN STOCK IF ERROR SEV NUL lt ERROR DETECTED IN STOCK PROGRAM gt EXI Or IF ERROR ERR L12 Command File User s Guide Rev 00 CHAPTER 5 PASSING ARGUMENTS TO A COMMAND FILE Another versatile feature of command files is by giving the command file a DO extension you can pass arguments to the file when you run it When you enter the name of the command file at AMOS command level you may also include one or more arguments For example FORMAT MEMO in this case MEMO is the name of a file you want your FORMAT command file to work on If your command file takes more than one argument separate them with spaces For example FORMAT MEMO TAX DAT RUN If an argument contains two or more words or spaces you can enclose the argument in symbols For example UPDATE MEMO DATA FOR THURS
8. it will format it using the TXTFMT command If it is an AlphaBASIC source file with a BAS extension it will compile it etc The file must be in your account number but you may specify a different device Any commands in the command file after COM statement will not be d executed because COM does not return control to the command file after it finishes processing Therefore use COM as the last statement in a command file Command File User s Guide Rev 00 Page 3 2 Chapter Three 3 3CONT This command used either inside or outside at AMOS command level a command file executes the command file CNT CMD This command continues the execution of a command file that was interrupted by the PAUSE command see below 3 4EXIT Terminates the processing of a command file You use this in command files containing IF and GOTO statements At the end of a conditional branch your command file must use a GOTO or and EXIT statement to go to another section or to end the file in order to avoid executing the next branch You may add a message after EXIT on the same command line that will be displayed on your terminal The example shown in GOTO below also shows how EXIT works 3 5GOTO Transfers control of a command file to a different line The format is GOTO label When the command file executes a GOTO line it branches to the associated label in the command file and continues executing from there The label can be either a lega
9. 3 4 Sudden d eau MJ MM NnNEHRHH DE V 3 4 BD E doute e diede ds 3 4 I dog tak me EUER 3 4 Loue de buie e Dr 3 4 Qd LIES Codd S 3 5 A AlphaBASIC functions 4 3 AMOS commands 1 1 ATGUITIOITIS n3 perio DA 5 1 B da Ras odes Me 4 3 Command File User s Guide Rev 00 Command File User s Guide Index Page 2 C inr mod ren PVP HER ESSE 3 1 COMIS s 3 1 Command files 1 1 Comments 2 2 Grealllig E hie RIA EA bd 2 1 MOSSaQOS NA E 3 4 Sample Sresi aana doe INIM a LOU es A 1 AA E ER ERE EUER E 1 2 COMMENTS EE Neque 2 2 CONT s ede inus 3 2 Control characters C a as tee 1 5 KI Kek pe 4 2 D DATE ken d dne Re EE PIPER E en 4 2 DEVICE A Aya xou ar DELE uas ct da ata 4 2 DOGS 553 n A d ya Oh 1 3 5 1 Parameter symbols 5 1 5 3 E pee pe xm MS 4 1 ENDIF b uS RE 4 1 ERROR ee UU et eee 4 1 Error checking 4 5 Error Goddess 28 Aad Al a E REM 4 5 EXIT iii eet eh texte 3 2 F xe Ou RA ea
10. One The way you build your own commands is by building a command file which is a file that contains the same kinds of input you might enter from the keyboard You can tell AMOS to read its instructions from a command file instead of entering those commands and data yourself 1 2HOW DO YOU USE COMMAND FILES Now that you know what a command file is how do you use one Let s take a small example say you often erase all of your temporary files then view the directory of your account The process to do this is ERASE EUR MEMO TMP ACCNTS TMP Total of 2 files deleted 3 disk blocks freed DIR RETURN MEMO TXT DSK0 1004 ACCNTS TXT 5 PAYROL RUN 7 Total of 4 files in 34 blocks This is a simple example sometimes a frequently used sequence of commands may be quite long and tedious to type Let s say you create a command file called CLEAN CMD to perform the functions in the example above The file contains the following lines of text This file erases TMP files and displays account directory BI ERASE TMP Erase the temporary files DIR Display the files in the account The at the front of your command file is a special symbol allowing you to see the lines of your command file on your terminal as AMOS processes them The semi colon indicates the text following it is a comment All of these special symbols are discussed later in this manual With this command file ins
11. specific file within an account A complete filespec is made up of the devn the filename the file extension and the account number For example DSK0 SYSTEM I NI 1 4 This abbreviation represents an account on a disk you can store files and data in An actual disk account number looks like this 100 2 or 1 4 Disk account specifications are sometimes referred to as Project programmer numbers Braces are used in some examples to indicate optional elements of a command line In the example DIR switch the braces tell you switch is not a required portion of the DIR com mand line The slash symbol precedes a command line switch or option request For example DIR WIDE 3 This command requests a directory display of the disk account you are currently logged into The switch WIDE 3 indicates you want the display to be three columns wide Bold text in an example of user computer communication represents the characters you type Command File User s Guide Rev 00 Introduction to Command Files Page 1 5 SYMBOL MEANING ET Text like this in an example of user computer communication represents characters the computer displays on your terminal In our examples the keycap symbol appears whenever you need to press a certain key on your terminal keyboard The name of the key you need to press appears inside the keycap symbol like this ew f you need to press the TAB
12. 1 to 4 2 U User names feature 2 1 What a command file is 1 1 What a 15 1 3 WORD e d tiet 4 3 Command File User s Guide Rev 00
13. AMOS Command Files User s Manual ALPHA MICROS YS TEMS RIGHT FROM THE ST DSM 00071 00 A00 1995 Alpha Microsystems REVISIONS INCORPORATED REVISION DATE 00 December 1988 AMOS Command Files User s Manual To re order this document request part number DS0 00071 00 The information contained in this manual is believed to be accurate and reliable However no responsibility for the accuracy completeness or use of this information is assumed by Alpha Microsystems This document may contain references to products covered under U S Patent Number 4 530 048 The following are registered trademarks of Alpha Microsystems Santa Ana CA 92799 AMIGOS AMOS Alpha Micro AlphaACCOUNTING AlphaBASIC AlphaCALC AlphaCOBOL AlphaDDE AlphaFORTRAN 77 AlphaLAN AlphaLEDGER AlphaMAIL AlphaMATE AlphaNET AlphaPASCAL AlphaRJE AlphaWRITE CASELODE OmniBASIC VER A TEL VIDEOTRAX The following are trademarks of Alpha Microsystems Santa Ana CA 92799 AlphaBASIC PLUS AlphaVUE AM PC AMTEC DART ESP MULTI inSight am inFront am All other copyrights and trademarks are the property of their respective holders ALPHA MICROSYSTEMS 2722 S Fairview St P O Box 25059 Santa Ana CA 92799 CHAPTER 1 cl N 2 2 1 2 2 CHAPTER 3 3 9 3 10 3 11 3 12 3 13 3 14 3 15 3 16 CHAPTER 4 4 1 4 2 4 3 44 CHAPTER 5 5 1 5 2 TABLE OF CONTENTS INTRODUCTION TO COMMAND FILES WHAT I
14. DAY DIAL 1 456 384 8392 5 1 SYMBOLS Each argument passed to a DO file has an associated parameter symbol These consist of a dollar sign and a number The first argument passed to a command file is 0 the second is 1 and so on up to 9 This parameter symbol is like a variable it represents the argument Let s take an example to see how this works We used the command line FORMAT MEMO TAX DAT above The FORMAT DO file might look like this TXTFMT HEADER TXT 0 1 TEXT FORMATTING COMPLETED O Command File User s Guide Rev 00 Page 5 2 Chapter Five When the DO file is called the 0 and 1 symbols are replaced with the arguments specified at AMOS command level in this case MEMO and TAX DAT Argument list items are associated with parameter symbols NOT in the order the parameter symbols appear The first item in the argument list is associated with parameter 0 even if parameter 2 appears before 0 in the command file Here is another example TK IR W 52 TXTFMT HEADER 50 RENAME D 0 LST HEADER LST 5 HEADER 51 RENAME D 51 15 5 PRINT 0 1 PRINT If you name this file DOC DO and run it entering DOC PSTINV ACTPAY TXT the 0 is replaced with PSTINV the 1 is replaced with ACTPAY an
15. MSC 257 ERR MAP 258 ERR IPR Command File User s Guide Rev 00 ERROR No error detected File specification error Insufficient free memory File not found File already exists Device not ready Device full Device error Device in use Illegal user code Protection violation Write protected File type mismatch Device does not exist Illegal block number Buffer not INITed File not open File already open Bitmap kaput Device not mounted Invalid filename BADBLK SYS has a bad hash total BADBLK SYS is in unsupported format BADBLK SYS not found Insufficient queue blocks MFD is damaged First logical unit is not mounted Remote is not responding File in use Record in use Deadly embrace possible File cannot be deleted File cannot be renamed Record not locked Record not locked for output LOKSER queue is full Device is not file structured Illegal record size Block allocate deallocate error Miscellaneous error Memory map destroyed Insufficient privileges to run program Page 4 6 STANDARD ERROR CODE 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 384 385 386 387 388 389 390 512 RESERVED WORD ERR L12 ERR OPR ERR M20 ERR LOG ERR BER ERR PAR ERR ADR ERR IIN ERR DIV ERR CHK ERR TRP ERR PRI ERR TRC ERR EM1 ERR MEX ERRIO ERR IH ERR II2 E
16. ND Memory Available 6 3 61 15 SUX ca x Mu y l RAE Awa ey og AB SA Sal A 6 3 6 1 16 LO Language ie tone ah RIAL BR E AER 6 3 SEY VCS SVT DOL es NERVAE CEN CES 6 3 6 1 18 LN No Symbol s coute totu eee e Pr ER KK KK 6 3 6 2 USER NAMES FEATURE SYMBOLS 6 4 6 2 1 NU Current User Name 6 4 6 2 2 RP Root 6 4 6 2 3 R RootDevice 6 4 6 2 4 SUB User Privilege se saa ec nO hk C ROO 6 4 6 2 5 UL UserLevel 6 4 6 2 6 SUE User Experlise o kis cs Kak a cR RES REV 6 4 6 3 HOW TO USE SPECIAL 5 5 6 4 APPENDIX A SAMPLE COMMAND FILES A 1 BACK CMD A esiste uina exu I E ES eH e DUIS A 1 A 2 STAR UDO s cute Ee etia a geet ees A 2 GLOSSARY DOCUMENT HISTORY INDEX Command File User s Guide Rev 00 CHAPTER 1 INTRODUCTION TO COMMAND FILES One of the constants of everyday life is repetition Especially in business you find certain tasks have to be done on a regular basis The mail has to be opened every day somebody has to make the coffee and if you don t do the payroll each week people tend to get upset Some of these tasks are done on your computer One of the g
17. RED PFK 60 0 Load Fred s function table lt gt ELSE lt SNU Instructions for working with the accounts payable files are in HELP TXT XY 33 Turn off highlight lt ENDIF ENDIF Command File User s Guide Rev 00 INDEX SYMBOLS Dade Data Ea EE emma 5 4 Wee ep 6 2 NC ER n a 6 1 VIE MESI RENE AA 5 3 HHHH 6 3 GEN 6 3 SEN LA but sese Up e dos 6 3 IN ss auo esie al Ea n Dia 6 3 NI ne beu ta yk k DE Aya nA Rd ad uM d s 6 3 DN Lose meus iti meas T DAN 6 2 DNI pde ne t eT ELSE 6 3 6 3 DIM ea ule nk Noe 6 2 p siue EHnEE N 6 4 ori ante uds eed duds thier DA UE dard 6 1 AS etse e o pe ERES 6 4 ul M Em 6 3 Jm IT 6 2 DIM aed b ue HHH 6 2 ST desees ctu xe pies ince erts 6 2 DUBE gt kot ese CADRE 6 4 DLE uno compa e 6 4 HE eC 6 4 SE opu e E EE 6 3 1422 Er nh a be uar 3 1 SS da w na det ste hai T An vedere Gul ay 3 4 OPER 3 3 die s 3 3 B stesse iti mee
18. RR IIS ERR IIA ERR IIS ERR II6 ERR II7 ERR BTO ERR MMU ERR PPV ERR FUB ERR FIR ERR FDZ ERR FUN ERR FOE ERR FOV ERR FSN ERR MCE ERR MIO ERR MLV ERR LPA ERR LAE ERR LCE ERR UND ERR RIE ERR SYN ERR AEL ERR CTC Chapter Four ERROR Must be logged into 1 2 Must be logged into DSKO 1 2 Program requires 68020 processor Must be logged in to run program Bus error Memory parity error Address error Illegal instruction Divide by zero error CHK instruction trap TRAPV instruction trap Privilege violation Trace trap return EM1111 instruction trap Miscellaneous exceptions Illegal interrupt on level 0 Illegal interrupt on level 1 Illegal interrupt on level 2 Illegal interrupt on level 3 Illegal interrupt on level 4 Illegal interrupt on level 5 Illegal interrupt on level 6 Illegal interrupt on level 7 Bus time out error MMU error Co processor protocol violation FPCP branch or set on unordered condition FPCP inexact result FPCP divide by zero FPCP underflow FPCP operand error FPCP overflow FPCP signaling NAN MMU co figuration error MMU illegal operation MMU access level violation Language processor aborted Language processor aborted with errors Language processor completed with errors Undefined identifier in input Runtime interpreter error Syntax error in input Assembly error in linkage Process aborted by operator C Command File User s Guide Rev 00 The IF Statement Page 4 7
19. S A COMMAND 1 1 HOW DO YOU USE COMMAND FILES 1 2 WHAT ISA DO FILE a LR EAE ERE REQUE 1 3 HOW DOES AMOS FIND COMMAND 5 1 3 GRAPHICS CONVENTIONS 1 4 HOW TO CREATE COMMAND FILES COMMENTS IN A COMMAND 2 2 THE SYSTEM INITIALIZATION COMMAND FILE 2 2 SPECIAL SYMBOLS AND COMMAND WORDS nu eos Deeds ptr E PROS ee fo 3 1 COM REW e mu E Mr End cnt 3 1 CONT N HHHH HHR EE ge gg u om 3 2 EXIT DD Dr OUR 3 2 GOTO servis do ex ssp d die d oss 3 2 PAUSE seen oto PRERIE Cer ER OS pb esee 3 3 K Ay den d eee veio aco erit K van A eria eS 3 3 SR 3 3 ER ANE MOVER TERN 3 4 oL 3 4 JE PUn MU Cp 3 4 DIUI TI 3 4 DC e dek de Uy Su 3 4 3 4 EE 3 5 lt lt eer ol a ese aat re 3 5 THE IF STATEMENT RESERVED WORDS USED WITH IF 4 1 FUNCTIONS USED WITH IF 4 2 4 2 Examples 255255 RIEF ee Re m Raw eRe E 4 4 USING IF WITH SPECIAL DO SYMBOLS
20. SK1 DSKANA DSK3 DSK2 DSK2 Ae Lu 2154 IRSEQ DSK1 E P 5 DIRSEQ DSKO F D D IRSEQ DSK2 E ERASE 5 BACKUP C 5 DSKO CHR SALES JAN 87 DIV Big Business Accounting O Hardy CRT610 F Command File User s Guide Rev BAK DSK1 BAK DSK2 00 Run DSKANA disks Turn off AlphaNET Sequence accounts BAK Answer BACKUP s questions Certify the backup was good Page A 2 A 2START DO Appendix A AMOS automatically looks for a START CMD or START DO file when you log into an account If it finds one it executes it You can use a START file to customize accounts setting up features of AMOS specifically for the needs of the person using the account Here s an example 2S LOAD DSKO 1 4 AMSORT SYS SET PROMPT Accounts Payable SE DIR W DEL PFK XY 32 IF TIME 1200 THEN lt Good Afternoon Set highlight text ELSE lt Good Morning ENDIF IF SNU Carl Anderson LOAD DSK2 100 0 MY PFK Load personal function sEcGCarl gt key table XY 33 Turn off highlight lt gt ELSE IF SNU Fred Sheldon lt Fred gt XY 33 Turn off highlight LOAD DSK1 F
21. at name 211 looks in your current account for a LIT file with that name looks in DSKO 1 4 CMD for a CMD file with that name 41 looks in DSKO 1 4 CMD for a DO file with that name looks in your current account for a CMD file with that name 6lt looks in your current account for a DO file with that name 71 looks in your X 0 account for a LIT file with that name looks in your X 0 account for a CMD file with that name 9Jt looks in your X 0 account for a DO file with that name You need to use a little care when selecting names for your command files so they don t conflict with any of the AMOS system commands LIT files or any other command files on your computer Command File User s Guide Rev 00 Page 1 4 1 5GRAPHICS CONVENTIONS Chapter One This manual conforms to the other Alpha Micro publications in its use of a standard set of graphics conventions We hope these graphics simplify our examples and make them easier for you to use Unless stated otherwise all examples of commands are assumed to be entered at AMOS command level SYMBOL MEANING Device Name The dev is the three letter physical device code and n is the logical unit number Examples of device names are DSKO DSK5 WIN1 and MTUO Usually device names indicate disk drives but they can also refer to magnetic tape drives and video cassette recorders filespec File Specification A file specification identifies a
22. ate a file named CNT CMD and write over any file of the same name that exists The K symbol allows you to enter one line of data or commands to either AMOS or the program currently being executed When AMOS finds a K symbol in your command file it halts the processing of the file until you enter a line of characters that ends with This input is then acted upon by AMOS or the program that is executing The P symbol is used in conjunction with the K symbol to let you enter part of a command line Whatever you input is added to the line between the P and K symbols For example if you have the following command file SI lt Input the name of the file you wish to VUE gt LP VUE K the command file will stop and wait for input and then append to VUE whatever was entered to make one command line If TEST TXT is entered the command file will execute the command VUE TEST TXT Put the P before the command you want to add to and do not forget the K symbol after that line Any other command file lines in between P and K will be appended together Command File User s Guide Rev 00 Page 3 4 Chapter Three 3 9 R Causes the results of command file lines but not the lines themselves to be displayed You can use multiple S R and symbols in one command file to let you see some program output and command file lines but not others 3 10 S Suppresses the display of command file lines and program ou
23. d the 2 is replaced with TXT Thus the DO file above will be executed as if it were IR DIR W TXT HEADER PSTINV RENAME D PSTINV LST HEADER LST IXTFMT HEADER ACTPAY RENAME D ACTPAY LST HEADER LST PRINT PSTINV ACTPAY PRINT You can use a parameter symbol to represent an entire file specification a portion of a file specification a command or any other piece of text inside a command file Remember the value of a parameter is set at the time of execution of a DO file with some parameters this can sometimes cause different results than you might expect As an example look at this DO file SR sleep 14400 lt TM gt TM returns the time of day The TM is replaced by the current time However since the DO file s first instruction is to sleep for four hours the time printed on the screen will be four hours early If you run the DO file at noon at four o clock the Command File User s Guide Rev 00 Passing Arguments to a Command File Page 5 3 DO file will tell you it is noon If you have more items in your argument list than there are parameter symbols in the command file the extra items are ignored If you have fewer items in your argument list than there are parameter symbols the extra parameters are ignored If you do not supply a parameter however the line it appears on may still be processed especially
24. e AMOS32 6 1 13 SV Operating System Version The current operating system version as a string 6 1 14 ND Memory Available The number of bytes of memory currently assigned to the user s job 6 1 15 UX Radix Gives you the currently active radix octal or hexadecimal returned as a number 8 or 16 This is the way the system is currently storing and using numbers AMOS usually uses octal representation The SET program can be used to change the Radix 6 1 16 LG Language The name of the currently selected language as a string For example ENGLISH 6 1 17 LY Yes Symbol The single character that stands for yes in the currently selected language as a string 6 1 18 LN No Symbol The single character that stands for no in the currently selected language as a string Command File User s Guide Rev 00 Page 6 4 Chapter Six 6 2USER NAMES FEATURE SYMBOLS The special symbols in this section have to do with the user names feature which allows programs to be tailored to the specific abilities of the user See your System Operator s Guide for more information about User Names 6 2 1 NU Current User Name The user name of the current user as a string 6 2 2 RP Root Account The current user s root account number as a string For example 120 0 6 2 3 R Root Device The current user s root device as a string For example DSKO 6 2 4 UB User Privilege The current user s privilege re
25. escribing the device if the device specified inside the parenthesis is found or a 0 if it is not found The device name must be enclosed in quotes The returned values are 1 File structured 2 Uses alternate track table 4 Can be divided into logical units 8 Sharable 16 Currently assigned to a job 32 Currently mounted 64 Set to no network access 128 Uses extended format directories 256 Uses paged bitmaps DEVICE returns the total of all the applicable numbers above i e a 48 would mean a device assigned to a job and mounted These values are the flag values returned by the DEVCHR monitor call see your Monitor Calls Manual for more information You can compare for an individual characteristic of the device or any combination you wish For example if a device is file structured and can be divided into logical units all of these statements would be true Command File User s Guide Rev 00 The IF Statement Page 4 3 IF DEVICE DSK0 1 IF DEVICE DSK0 4 IF DEVICE DSK0 5 NODE n Equals 1 if the specified network node is available for access or 0 if it is not You must enclose the node number or an equivalent ersatz name in quotes BYTE n Returns the value contained in memory byte n WORD n Returns the value contained in memory word n LWORD n Returns the value contained in memory longword n Returns the value contained in I O byte n In add
26. help AMOS tailor the system software for your particular hardware The System Operator can find information on the system initialization command file in the System Operator s Guide to the System Initialization Command File Command File User s Guide Rev 00 CHAPTER 3 SPECIAL SYMBOLS AND COMMAND WORDS In addition to normal input you might make from your keyboard there are special symbols and command words that appear only in command files The special symbols that begin with a colon MUST appear at the start of a command file line in order to be read as special symbols The comment character and command words may be placed anywhere in the file For examples of the use of these symbols see Appendix A The special symbols and commands are 3 1BATCH BATCH loads frequently used AMOS system commands into your memory partition You can use BATCH either at AMOS command level or at the start of a command file The commands it loads are GOTO IF EXIT TRACE PAUSE and LOAD Use BATCH if you use many of these commands in your command files since those commands execute faster if they are in your memory partition rather than on the disk 3 2COM COM processes files based on their extensions You use COM followed by a filespec for a specific file you cannot use wildcards DO NOT include an extension for the filespec Your command file will find the specified and process it according to its extension If it is a TXT file
27. if there is a default for the specified command For example if a line in your command file is DIR 0 and you do not specify that parameter AMOS will assume the default of DIR and process the line in that manner 5 2SPECIAL PARAMETER SYMBOLS In addition to the usual command file parameter symbols and the special command file symbols discussed in Chapter 6 these special parameter symbols allow you to use DO files in a more flexible way and for a greater range of applications 5 2 1 D Default Parameter List If you specify fewer items in the argument list than there are parameter symbols in the command file AMOS usually ignores the extra parameter symbols You can however supply a default argument list that AMOS will use if you omit all or part of the argument list On the first line of your DO file enter D followed by a list of defaults in order For example say you do most of your work in one file called PAYROL DAT You can create a DO file to save yourself typing It might be called LOOK DO and look like this 5 PAYROL DAT SER VUE 0 If you enter just LOOK at AMOS level you get PAYROL DAT if you want to VUE some other file you add the filename after LOOK PAYROL DAT becomes the default for 0 N i a D line appears in your command file it MUST be the first line of the D file even before a T S or R symbol 5 2 2 Null Parameter Symbol A single indicates a null parameter in a default parame
28. is used 3 16EXAMPLE See if file exists lf Report this to yo go to REPORT label to count stock to compile daily report a shortage list the list BATCH E IF LOOKUP INVEN DAT 1 GOTO REPORT ELSE lt Inventory file was not found supervisor before running again gt EXIT REPORT RUN STOCK Program RUN DAILY Program PAUSE Press RETURN to produce lt If you want the to get otherwis nter the cod gt K Command File User s Guide Rev 00 enter CEO for the reviewing manager CHAPTER 4 THE IF STATEMENT The IF statement allows you do different things in your command file depending on whether certain conditions are true or false The basic format is IF expr List of commands to do when expr is TRUE ELSE List of commands to do when expr is FALSE ENDIF For example IF LOOKUP ACCT TXT 1 VUE ACCT TXT EXIT ELSE VUE ACCT TXT Y EXIT ENDIF The ELSE clause is optional if you don t use ELSE the command file just goes past ENDIF if the condition is false IF statements can be nested up to 16 levels deep Expressions can be made up of a wide variety of operators reserved words and functions and support both string and floating point variables
29. ition the following AlphaBASIC functions are supported ABS ACS ASC ASN ATN CHR EXP FACT FIX INSTR INT LCS LOG LOG10 MID RIGHT RND SIN SQR STR TAN UCS VAL COS DATN LEFT LEN SGN SPACE Mathematical operators can also be used to evaluate expressions in the same way you would use them AlphaBASIC The valid mathematical operators are addition or unary plus subtraction or unary minus multiplication division raise to power raise to power NOT logical NOT AND logical AND OR logical OR XOR logical XOR EQV logical equivalence MIN minimum value MAX maximum value You may also use the following relational operators equal less than greater than unequal unequal less than or equal gt greater than or equal HAVA II V 1 Command File User s Guide Rev 00 Page 4 4 Chapter Four IF also fully supports AIphaBASIC substring modifiers use of the and symbols and number to designate parts of string variables See your AlphaBASIC User s Manual for more information All operators are evaluated in the same order as in AlphaBASIC of course you can use parentheses to override the usual order 4 2 1Examples Let s take a few examples to see how the above reserved words and operators can be used Say you want your command file to check to see if a certain file exists before you run an AIphaBASIC program that writes to that file The lines in your command file
30. key you would see or the ESCAPE key amp Sometimes the ESCAPE key is labeled ALT MODE This indicates a control sequence you press on the keyboard The first key is pressed and held down while the second key is also pressed This symbol in front of a capital letter means the letter is a control character For example when you press it appears on your screen as C C is the control character that cancels most programs and returns you to AMOS command level This symbol means halt It indicates an important note you should read carefully before going further in the documentation Usually text next to this symbol contains instructions for something you MUST or MUST NOT do so read it carefully This symbol means hint It indicates a helpful bit of information or a short cut that could save you time or trouble This symbol means remember It indicates something you should keep in mind while you are following a set of instructions Command File User s Guide Rev 00 CHAPTER 2 HOW TO CREATE COMMAND FILES To create a command file use Alpha VUE to make a text file usually with a CMD DO extension Fill the file with the commands you would ordinarily enter from the keyboard plus any special symbols A command file can contain most commands or data you might enter from the keyboard it can even contain the name of another command file If your computer uses the User Names feature a User Name is
31. l command file element or it can be a comment In either case the label referred to must be on a line by itself and must be after the GOTO statement in the context of the file If the label is a comment it must be preceded by a semi colon with no intervening spaces although the argument in the GOTO statement must not include the semi colon An example SE IF LOOKUP INVEN DAT 1 GOTO OKAY ELSE lt The inventory file is missing gt EXIT Thank you for using PROCES CMD OKAY RUN INVENT If you GOTO a command file element such as S or lt the command file will begin execution AFTER that element without executing the element itself Therefore it is better to use commented lines as labels Command File User s Guide Rev 00 Special Symbols and Command Words Page 3 3 3 6PAUSE 3 7 K 3 8 P When PAUSE appears in a command file the file stops and waits for you to input a character If you press the rest of the command file is then executed If you press any other key the control file is suspended and whatever is left in the command file is placed into a file called CNT CMD You may also put a message on the PAUSE line which will display before the file pauses For example End of Daily Report PAUSE Press RETURN to do weekly report Weekly Report section Do not use the name CNT CMD for your own command files since PAUSE statements cre
32. reat strengths of computers is their ability to free people from repetitious tasks and to speed up the completion of those tasks However sometimes the operation of the computer itself can be repetitious Many times you do a certain task on the computer by using the same set of commands and operations every time Alpha Micro provides special files called command and DO files that can contain these sets of commands and operations making the ordinary operation of your computer easier This chapter discusses the following points What is a command file What is a DO file eHow do you use command files eGraphics conventions 1 1WHAT IS A COMMAND FILE One of the important features of the Alpha Micro system is that rather than having a set of built in commands AMOS recognizes all of our commands are actually files stored on the disk When you enter an AMOS command such as DIR what you are really doing is telling AMOS to find and execute the file with that name Because of this feature you can extend and customize the set of AMOS commands on your computer by creating your own executable files And you can design your own commands combining the existing AMOS commands with special instructions You can also erase or rename standard AMOS commands if there are some commands you do NOT want people on your system to use or if you want to control WHO knows and can use certain commands Command File User s Guide Rev 00 Page 1 2 Chapter
33. t two lines send files to a printer to be printed Finally the command file sends Command File User s Guide Rev 00 Page 2 2 Chapter Two user FRED a message the command file has finished its work 2 1COMMENTS IN A COMMAND FILE You may include comments in your file by preceding them with a semicolon as in the above example AMOS does not process the comments If a T symbol is used any comments that follow it are displayed on your terminal as the command file executes If R is used instead of T these comments are not seen but will remain in the file to guide anyone who looks at the file Comments serve as explanations of the purpose and function of a command file Often a command file will not be used by just one person but by many If a person wants to do a certain task that person might look at the contents of a command file to see if it performs the needed task or not If special symbols or unusual commands are in the file the viewer might not know what they do and so might not understand what the command file does Therefore it is a good idea to fully comment your command files so other users will know exactly what functions the file performs 2 2THE SYSTEM INITIALIZATION COMMAND FILE Of special interest to the System Operator is a unique command file called the system initialization command file the system uses every time you turn on or reset your computer This command file has special properties and commands that
34. tead of entering what you entered in the first example each time you merely have to enter CLEAN tru and AMOS reads the CLEAN CMD and performs the process for you With this small example you do not save much typing but imagine the typing and time you would save if the sequence of commands is ten or twenty lines long If the extension of a command file is CMD or DO you do not have to include the extension when entering the name of the command file you saw you only had to type CLEAN rather than CLEAN CMD Command File User s Guide Rev 00 Introduction to Command Files Page 1 3 Otherwise you must specify the file extension if your command file is called DOIT TXT you must include the TXT when specifying the file This is why it is easiest to use CMD or DO extensions 1 3WHAT IS A DO FILE A DO file is a command file that allows you to pass arguments to it from AMOS command level You can input data file names and other information to the DO file when you execute the file The special commands used in DO files are discussed in Chapters 5 and 6 When you execute a DO file all of the special symbols inside the file are immediately replaced with the values needed then the file is executed just like a command file 1 4HOW DOES AMOS FIND COMMAND FILES When you enter a filename without an extension at AMOS command level AMOS goes through the following procedure looks in DSKO 1 4 SYS for a LIT file with th
35. ter list or a null argument in an argument list This symbol allows you to designate which parameter will be associated with which argument For example Command File User s Guide Rev 00 Page 5 4 Chapter Five SD INVEN TXT TXTFMT HEADER TXT 0 RENAME 0 LST HEADER LST VUE 1 In the file above the after D indicates there is no default for 0 and INVEN TXT is the default for 1 Command File User s Guide Rev 00 J NS CHAPTER 6 SPECIAL SYMBOLS The symbols below can be used with the IF statement to make tests within your DO files and sometimes they can be used to display information when you run the command file The symbols in this chapter only work with files with DO extensions 6 1INFORMATION SYMBOLS 6 1 1 The symbols in this section return information your DO file can use in IF conditions to customize your operations Original Device Symbol Represents the device the DO file was logged into when the file was run For example if you are logged into an account on DSKO the line LOG 1 4 is executed as LOG DSK0 1 4 You can use this symbol in combination with the original account symbol P to keep track of the account and device where the command file originated This is useful if the command file logs into other accounts and you want to return to the starting point when done 6 1 2 P Original Account Symbol Represents the account
36. the DO file was logged into when the file was run For example if you are logged into account 230 5 the command file line DIR DSKO P Command File User s Guide Rev 00 Page 6 2 Chapter Six is executed as DIR DSK0 230 5 6 1 3 Real Dollar Sign Represents an actual dollar sign If you need to use a dollar sign as part of a message within a command file you enter it as two dollar signs to distinguish it from the null parameter symbol see Chapter 5 6 1 4 TM Time of Day The current time of day as a string in 24 hour format including separator without seconds For example 13 00 6 1 5 TD Current Date The current date as a string in YYMMDD format For example 870719 for 19 August 1989 6 1 6 TW Day of the Week The current day of the week returned as a number starting with 0 for Monday 1 for Tuesday etc 6 1 7 NJ Current Job The name of the current job as a string 6 1 8 NT Current Terminal The name of the currently attached terminal as a string 6 1 99 ND Terminal Driver The name of the terminal driver currently in use as a string Command File User s Guide Rev 00 Special Symbols Page 6 3 6 1 10 NI Interface Driver The name of the interface driver currently in use as a string 6 1 115 Modem Driver The name of the modem driver currently in use as a string 6 1 12 NS System Monitor The name of the system monitor as a string For exampl
37. tput generated by the command file When S is used nothing the command file does will be displayed on the screen except for messages If you don t specify R or T S is assumed the default 3 11 T Displays the lines of the command file and all of the output on your terminal as AMOS processes them 3 12 U Turns off the display R and 5 will not override T so you must use to turn off T before re setting to R or S 3 13 X Ends the command file even if the command file process is not at AMOS command level 3 14 lt gt These symbols allow you to display messages on your terminal as the command file executes All the characters between the lt symbol and the gt symbol are displayed A command file message is not acted upon by AMOS or any other program A message may be more than one line long The end of the message is indicated by the gt symbol If you forget the gt AMOS will print everything following the lt as a message until it reaches the end of the file Command File User s Guide Rev 00 Special Symbols and Command Words 3 15 Page 3 5 A semicolon marks a comment line or part of a line which is not processed but is displayed with the rest of the command file if T precedes the comment Certain commands such as EXIT allow you to put a message on the command line If you put a comment after these commands it will be taken as a message and will display on the terminal even if R or S
38. turned as a decimal number For example 10 6 2 5 UL User Level The current user s level 0 to 100 6 2 6 User Expertise The current user s expertise level 0 to 100 6 3HOW TO USE SPECIAL SYMBOLS You can use special symbols to display information to the user of your command file You can place them anywhere within the and symbols and the symbol will be replaced by the appropriate information For example R Good Morning SNU You are running SNS 55 gt When run the above command file will print something like this Good Morning John Smith You are running AMOS L 2 0A 175 Command File User s Guide Rev 00 Special Symbols Page 6 5 You can also use special symbols with other command file commands For example SR IF SNJ FRED lt Welcome to Fred s account ENDIF Here is an example of a more complex command file that makes use of many of the special symbols R XY 0 LOG R RP Good gt IF TIME lt 1200 lt 1 gt ELSE lt Afternoon gt ENDIF lt SNU It is TM You are job NJ working on terminal SNT using terminal driver SND with the SNI interface The system monitor is 586 You are operating under version SSV Your root account is 5 Your privileges are SUB and your level is SUL with an expertise level of SUE There are SND bytes of memory for your job gt
Download Pdf Manuals
Related Search
Related Contents
電気用品安全法の概要セミナー - JET 一般財団法人 電気安全環境研究所 Paradyne 317x User's Manual Computer di controllo Intuvia 2004年第5版 - IEC活動推進会議 MANUAL DO USUÁRIO - Positivo Informática VITA Easyshade® User Manual - Projector Central Pflege- und Bedienungsanleitung 2006 Copyright © All rights reserved.
Failed to retrieve file