MS Dos External Commands
MS Dos External Commands
What are External Commands?
External commands are predefined, independent of the computer's operating system, and secured by authorizations. End users can only set up tasks allowing the system operator's permission.
An end user without background processing administrator’s authorization can use an external command to launch a pre-defined SAP system command or program. The user must be authorized to run the command.
External commands provide you control over what users do outside of the SAP System by permitting just specific commands and parameters. Access to these commands is controlled by SAP authorizations.
All external commands can be preceded by a drive name and path at which it is available.
Formatting Disks-Format
Prepares a disk by rearranging random magnetic impulses into a series of tracks and sectors so that is addressable by DOS
Syntax:
[d :] [path] FORMAT fd: [/s] [/u] [/4]
Options
- /s-Transfers DOS system files into the disk being formatted
- /u-Unconditional formatting to the disk
- /4-Formats a single or double sided disk in a 1.2MB high-capacity drive
Examples
- FORMAT B: - It formats the disk in drive B.
- FORMAT B:/s – It places the Dos files on the disk in drive B and makes it a system disk.
Hence the disk may be used as a bootable disk. While formatting the disk you may get any one of the following messages:
Disk Unsuitable for system disk
If there is a defective track in the area that contains the DOS files, you will get the above message. Use this disk only for storing data and not as a bootable disk.
Format failure
- The disk may be unusable. Re-issue the FORMAT command using another disk.
- Invalid media or Track 0 bad-disk unusable
Either track 0 is bad, in which case the disk is unusable, or the disk and the drive are not compatible. Check the disk and drive; if they are incompatible types, reissue FORMAT with the/4 option; if they are compatible, use a new disk.
Copying system files to another disk-SYS
The DOS hidden system files cannot be copied by COPY command. For this you have to use SYS command.
Syntax:
[d: ] [path] SYS cd:
Examples
SYS B: It is used to copy the DOS files to the disk in drive B messages
- No room for system on destination disk
This message will be displayed if there is not enough space for the system files on the destination disk.
- No system on default drive
If DOS cannot locate the system files to be transferred, the above message will be displayed. Select a disk that has the DOS files and try again.
Checking the disk-Chkdsk
Reports disk size, space available, and RAM available. Also reports and optionally corrects internal disk error.
Syntax:
[d: ] [path] CHKDSK [cd: ] [cpath] [cfilename] [/f ] [/v ]
Options
- /f- It is used to fix errors in the file allocation table (FAT)
- /v- It is used to provide file names as it examines them so that you can see where the error occurs.
Examples
- Chkdsk- It is used to check the default drive reporting any internal errors as well as disk six=ze, free space, and available RAM size.
- Chkdsk B: /F- It is used to check the disk in drive B while fixing any internal errors it finds. You will be asked whether you wish to recover any lost data sectors into data files. If you respond Y, each lost allocation unit is recovered into its own file, named FILEnnn.CHK. You can inspect the recovered units by using the TYPE or DEBUG command. If you respond N, each allocation unit will be made free and hence free bytes of disk will increase.
Copying disks- Diskcopy
Copies disks; optionally formats the target disk if it is not formatted previously. DISKCOPY cannot be issued to virtual disks such as the one formed by a SUBST command. This cannot be issued for copying hard disk to floppy disk.
Syntax:
- [d: ] [path] DISKCOPY [sd : [td: ] ] [/1 ] [/v ]
Options
- /1- It is used to copy only the first side of the double sided disk
- /v- It is used to verify that the information is copied correctly
Examples
- Diskcopy A: B: - It is used to copy the disk in drive A onto the disk in drive B
- Diskcopy- It is used to copy the disk in the default drive to another disk that will be placed in the default drive.
You have to note that if the target disk has some files already, then those will be erased automatically during this process. This command will copy all the information available from the source to target disk, including the hidden files and subdirectories. Any one of the following messages may be displayed while using this command.
Copy Complete
Copy another (Y/N)?
If the copying was done perfectly, the above message will be displayed. To continue the disk copy process for another disk, you have to press Y; otherwise you have to press N.
Formatting while copying
If the target disk is not formatted previously, then this command will format the disc automatically. During that time the above message will be displayed.
Target diskette may be unusable
If the target disk is having any unrecoverable read, write or verify errors, the above message will be issued.
Displaying directory tree-Tree
Sometimes you may see only the directories available in the disk. If you give DIR command, you will also get the file names along with the directory names. Hence TREE command can be given to see only directories.
Syntax:
[d: ] [path] TREE [pd: ] [/F]
/F Displays all the files names within each subdirectory.
Printing files-Print
Allows you to set up a print queue for printing files while continuing to work in DOS.
Syntax:
PRINT [/C] [/T] [d: ] [path] [filename]
- /C – It specifies which file or files are to be removed from the print queue. The preceding files and all subsequent file names on the command line are cancelled until a /P parameter is encountered on the command line.
- /T – It is used to remove all files from the print queue.
Examples
- PRINT *. BAS- Prints all the files with secondary name (extension) as .BAS one by one.
- PRINT A: SALES.BAS- Prints the files SALES.BAS from drive A.
You have seen some of the important commands of DOS. These commands may be frequently used in your computer operations. The rest of the commands can be learnt with the help provided by DOS. The help text about any DOS command may be obtained by typing the command followed by/?
Conclusion
External commands are predefined, independent of the computer's operating system, and secured by authorizations. End users can only set up tasks allowing the system operator's permission. SAP authorizations control access to these commands. External commands can be preceded by a drive name and path. Formatting disks involves rearranging random magnetic impulses into a series of tracks and sectors, making the disk addressable by DOS.
Copies system files to another disk can be done by SYS, which may display messages if there is not enough space for the files or no system on the default drive. Checking the disk is done using CHKDSK, which reports disk size, space available, and RAM available, as well as reporting internal disk errors. Diskcopy copies disks and optionally formats the target disk if it has not been formatted previously. Displaying directory trees displays all file names within each subdirectory, such as PRINT *. BAS and PRINT A: SALES.BAS. These commands are essential in computer operations and can be learned with the help provided by DOS.