Creating & Opening Files. Robelle Solutions Technology Inc. Qedit for Windows 5.9.13
Reklama
Reklama
Creating & Opening Files
Creating Files
Shortcut: CTRL+SHIFT+N
Toolbar:
You can create a new file on an MPE or HP-UX host or on your PC. In Windows terminology, creating a file from scratch is called the New operation, while Open usually refers to an existing file.
Creating a New Host File
To create a new file on a host system,
1. Select the File menu, point to Host, and click New.
2. When the following dialog box appears, define the file’s characteristics:
Qedit for Windows User Manual
New Host File dialog box
• First select a Connection, which is a host system and specific login name and security. If you need to use a connection repeatedly, you can create a
new saved connection. (See “Creating a Saved Connection” on page 52).
Once you have created a saved connection, it is accessible through your connection list until you remove it from the list.
• Next, select a Language for your file. This is not a spoken language such as French, German, or English, but a computer language like COBOL,
C++, PowerHouse, or Data (the default). The Language is important because it determines how the Smart string option will work (i.e., hyphen
Creating & Opening Files
• 61
Shortcut: CTRL+N
Toolbar:
is valid in a word in COBOL, but not in Pascal), and it defines the maximum Record length for your file.
Qedit for HP e3000 is able to recognize the Language setting and select the appropriate compiler based on that. At the moment, you need to run host-based Qedit from a terminal or terminal emulator to take advantage of this feature.
Many PC editors set the maximum line length to 32,000 or 64,000 characters, so the concept of Record length doesn’t really apply. Qedit is designed for editing host files, which often have a maximum length for each line. For example, COBOL has a fixed format in which the first 6 columns contain a sequence number, the next 66 contain the program code, and the last eight are comments. By default, Qedit opens a Data type file with a Record length of 256 characters, but you can increase or decrease that value. Qedit’s maximum record length is currently 8,172 characters for a host file.
3. Click the New button. Qedit will create a connection to that host (if you do not have one already) and attempt to create a new file in your login directory. Until this file is given a permanent name, you will see the connection name followed by Untitled1 in the window title bar.
Once you have entered some information into your new file, use the Save command of the File menu to save the file. This automatically gives you the Host Save As dialog box in which you can assign a new name to the file. Otherwise, the file will be lost if the connection terminates for any reason.
Creating a New Local File
Creating a new local file on your PC is very similar to creating a new host file. Just select the Local submenu on the New command in the File menu. Qedit for
Windows creates a new document window on your PC with these defaults: Data as the Language and a maximum Record length of 8,172 characters.
Creating Local Directories
The method for creating a directory on your PC depends on your version of
Windows. For Windows 95 and Windows NT 4.0, follow these steps to create a new directory for a newly created file:
1. On the File menu, point to New, and then click Local.
2. Type the information in the file.
3. On the File menu, select the Save command.
4. When the Save As dialog box appears, click Create New Folder (its icon looks like a folder with a star). A new folder will be created within the current folder, which is the directory in the Save in text box. The folder is assigned a default name such as New Folder and is highlighted so that you can rename it to something meaningful.
This option is also available on other Windows dialog boxes.
62
• Creating & Opening Files
Qedit for Windows User Manual
Creating a new folder using Windows 95 or Windows NT 4.0
Defining File Options
Shortcut: ALT+F,I
Each file has its own set of file characteristics. These characteristics are saved in the document database. New files, files that are not in the document database i.e. files that have never been opened and files in the document database that do not have customized file properties, acquire the default settings defined in the Preferences dialog box. Once the file is in the document database, Qedit uses the saved characteristics on subsequent access. To check or change the characteristics of a file,
1. Select the File menu and point to Properties.
2. When the Properties dialog box appears, you will see the following options:
Qedit for Windows User Manual Creating & Opening Files
• 63
64
• Creating & Opening Files
File Properties dialog box
• Record length
The Record length text box indicates the number of columns available on each line. The value shown in the example above is the default for a
COBOL file from an HP e3000 host. It has a maximum of 66 columns per line, because columns 1 to 6 are used for a sequence number and columns
73 to 80 are reserved for comments. If you want to include comments in
COBOL, select COBX in the Language list.
Local files can have a length between one and 8,172 characters per line.
• Language
The Language list allows you to choose from a number of different programming languages and their file types. Each language has different characteristics with the Record length being the most evident.
The Language setting also affects the way Qedit searches with the Smart
Search option and what gets selected when you double-click a word.
Qedit supports the host-defined rules for searching.
• Set Font
To access the font settings, click Set Font. When the Font dialog box appears, select the Font, the Font style, and the Size from the list boxes.
If you want a font size that is not available in the list, you can type a custom size in the text box.
• Set Color
To change the color settings, click Set Color. When the Color
customization dialog box appears, select the color scheme and, if you
• Use spaces for tabs
Qedit for Windows User Manual
When enabled, Qedit for Windows replaces horizontal tab characters in the file with the appropriate number of spaces. For HP e3000 host files, the
Use spaces for tabs option is enabled as the default. For HP-UX hosts and local PC files, this option is disabled as the default.
• Display detabbed column
The status bar at the bottom of a document window displays the cursor position relative to the beginning of the file. The status bar shows the relative line number and the column number within the line. If the file contains tabs and you press the
TAB
key, Qedit moves the cursor to the next defined tab stop and adjusts the column number accordingly. If there is text to the right of the cursor when you press
TAB
, the text will also be moved.
With Display detabbed column enabled, the column number on the status bar includes the number of spaces the
TAB
occupies, as if the
TAB character had been replaced with spaces (see Use spaces for tabs above).
Document window with Display detabbed column option enabled
If Display detabbed column is disabled, the column number on the status bar counts the
TAB
as one character, regardless of the number of spaces it occupies. In the example below, the text following the
TAB
is displayed in column 35, but the column number only shows a value of 29.
Qedit for Windows User Manual
Document window with Display detabbed column option disabled
• Preserve trailing blanks
Creating & Opening Files
• 65
By default, Qedit preserves trailing spaces that have been entered. If you try to insert new text on these lines, the trailing spaces will eventually reach the right margin and you won’t be able to insert any more characters. When this happens, you have to go to the end of the line and remove some spaces to make room for the extra character(s). Although this process is awkward,
Qedit uses it as a default because it presumes that anything you enter is valuable and should be kept intact.
Unfortunately, you cannot tell whether or not a line has trailing spaces. If trailing spaces are really not important, you can disable this feature. Once disabled, Qedit removes the necessary trailing spaces as you enter new text.
Note that if you delete characters from a line, Qedit does not return the trailing spaces that were removed.
This setting only affects editing while the file is opened. As you modify the file and add trailing blanks, Qedit recognizes them. However, trailing blanks are not written to the file when you save it. Next time you open the file, trailing blanks are gone. That's because the server never transmits them to the Qedit client.
• Auto-indent
Auto-indent is a great feature because it allows you to follow the indent of the last line when you press the
RETURN
or
ENTER
key. Instead of moving the cursor to the first position in the line, it goes to the column that matches the indentation of the previous line. You can use spaces or tabs to increase the indentation. If you use tabs, you can use
SHIFT indentation.
+
TAB
to decrease the
Setting the Line Termination Character
These file properties discussed above are common to all types of files. Local files have an additional option that controls which line termination character is used when a file is saved to disk. Qedit automatically detects which line termination was used originally and, by default, uses the same one when the file is saved. You need to change the Line termination character only when you want to explicitly change the file type.
66
• Creating & Opening Files
Qedit for Windows User Manual
Local file Properties dialog box
The Line termination list box offers the following selections:
• DOS (CR/LF)
• Macintosh (CR)
• UNIX (LF)
CR stands for carriage return and LF for line feed. This option only affects the way files are created on save operations. It is a useful feature when you know the file is going to be used on a different platform and want to ensure the file is created appropriately for the target application.
Notation in Host Operating Systems
Qedit for Windows can work on hosts with MPE, POSIX and HP-UX. To move through directories in each of these operating systems, you must be familiar with their file structures and notation conventions.
UNIX Notation
The directory structure in UNIX is hierarchical. The slash (/) at the beginning of a path name represents the root directory. There are two ways to specify a path name: absolute or relative. An absolute path name is the path relative to the root directory.
A relative path name is a path relative to your current working directory.
Each file name or directory name follows its parent directory and is separated from it by a slash (/). UNIX names, which can be in either case, are case-sensitive. These are some examples of valid path names: test/scrpt1
/users/bev/chk.txt
../src/abc.c.
Qedit for Windows User Manual Creating & Opening Files
• 67
MPE Notation
Names in the MPE namespace are always shown as uppercase. MPE file names are not case-sensitive (e.g., p@ is the same as P@). An MPE file called Cobol4 can be entered in either case. These are examples of MPE files: file file.group
file.group.account
To access a file by its hierarchical name on MPE, you must precede the name by a dot-dot (..) to go to the parent directory or one level up in the hierarchy, use dotslash (./) to go to the current directory, or use slash (/) to start at the root directory.
../group/file
./file
/Account/Group/File
POSIX Notation on MPE
With MPE/iX 4.5, HP introduced POSIX support. POSIX is an acronym for Portable
Operating System Interface. Because the POSIX standard is based on BSD UNIX and AT&T’s System V Interface, MPE has been extended to support an Hierarchical
File System (HFS) similar to the one found on UNIX hosts. As a result, UNIX file name syntax (with some restrictions) can be used to navigate the POSIX namespace.
Important Note: Some restrictions apply if your MPE host is running version 4.0 of the operating system. You can use the Directory dialog box to view and select files only in the logon group. Qedit uses a POSIX feature of MPE to move between groups and directories. Because POSIX is only available with MPE/iX 4.5 or later, you will not be able to switch to a different group dynamically. If you need to use the directory listing of another group, you have to create a separate connection that logs on immediately to the appropriate group.
MPE files are also accessible using this notation. Whenever possible, Qedit displays names using MPE notation. However, if you move to the POSIX namespace, Qedit adjusts the current working directory to POSIX notation. MPE names shown in absolute POSIX notation have the account name first followed by the group name and finally the file name. For example, the Cobol4 file is accessed via POSIX as
/Green/Pub/Cobol4.
Names in the POSIX namespace can be in either case, but they are case-sensitive.
POSIX directories end with a slash character (/).
POSIX names are identified by a leading
SLASH
character (absolute) or a leading dot-slash or dot-dot-slash (relative). If you don’t specify one of these prefixes, Qedit assumes you are trying to access a file in the MPE namespace. If you want to open a file using POSIX notation, you could enter /GREEN/PUB/COBOL4 or ./COBOL4.
You have to use MPE wildcards when you access the POSIX namespace. If you want to select all the files that start with a capital p on an MPE host using the POSIX notation, you would use the at sign (@) as the wildcard. So, you could enter ./P@.
Host Directories
When you want to open a single file and you know its name as well as the directory
in which it resides, you can use the Open command. See "Opening a Host File" on page 77.
68
• Creating & Opening Files
Qedit for Windows User Manual
Going into the file structure of a host, however, is useful in the following situations:
• you don’t know the exact name of a file
• you don’t know the directory in which a file resides
• to open multiple files at once
• to browse the contents of a directory
Accessing Host Directories
To access a host directory,
1. On the File menu, point to Open, and then click Host.
2. When the Open Host File dialog box appears, click Directory.
3. When the Directory dialog box appears, it will list the files and subdirectories in the current working directory or group. This dialog box also includes text boxes (File name and Wildcard) for searching a file and buttons to perform further operations.
NOTE: Currently, only MPE displays File Type information.
The Directory dialog box
The Directory Listing
The first entry in a directory listing is always two dots (..), which is the parent directory of your current working directory. Directories (parent or subdirectories) within the listing appear in color. The listing includes all files, even those starting with a dot; these files are usually hidden in UNIX.
The directory listing appears in alphabetical order. The listing includes the following information: the file Name, the File Type, the date and time Last Modified, and the Size of the file. Although the File Type column appears on both MPE and
UNIX systems, only MPE currently includes this information.
Qedit for Windows User Manual Creating & Opening Files
• 69
Order Selection button:
70
• Creating & Opening Files
The Last Modified date and time is based on the local time on your PC. Qedit assumes the clocks on all your computers are correct and takes care of adjusting the
time across different time zones. See “Time Zones” on page 221.
The Size column represents the number of records for MPE files and the number of bytes for UNIX files.
If you want to make sure you have the latest information in the directory listing, click the Refresh button. This forces the server to discard the current list and bring in the latest set of files. Note that the wildcard selection is ignored on a Refresh operation (i.e., Qedit displays a complete list of files in the current working directory or group).
Sorting the Directory Listing
By default, Qedit sorts files in ascending order. You can reverse the sort order by clicking the Order Selection button located on the right side of the heading line.
When the arrow on this button points up, the sort order is ascending; when the arrow points down, the order is descending. To change the default sort order, select the
Sort order command in the View menu.
You can sort the list on any of the headings (Name, File Type, Last Modified and Size) by clicking the column heading. The heading for the currently selected sort item appears on a darker background, as if the button was pressed down.
Searching for a File
These are some of the ways you can search for files on host directories:
• Scroll through the current directory. You can use your mouse or cursor movement keys to move through the list of files and subdirectories. The highlighted file indicates your current position within the list.
• You can go to other directories. See "Changing Directories" on page 71.
• If you know part of the file name, use the Wildcard text box to search through
the current directory. See "Using Wildcards" on page 70.
• For a more precise search, you can combine the File name and Wildcard text boxes. If you want to search another directory for example, enter its path name in the File name and use the Wildcard text box to narrow your search.
Using Wildcards
Wildcards are symbols that represent unknown characters. If you know part of the file name, use the Wildcard text box to find all files that match. Unless the File
name text box contains a different directory, Qedit will search in the current working directory.
Make sure you use the host-appropriate rules for wildcard characters because these rules are different for MPE and UNIX. Qedit does not do any validation on the string.
On UNIX for example, an asterisk (*) means one or more characters, and file names are case-sensitive. So if you want to see all files that start with a capital p, you would enter P*. Please refer to the appropriate host user manuals for details on using wildcards.
Qedit for Windows User Manual
The Listfile command with
Seleq parameter is not available on all versions of
MPE.
Qedit passes whatever is in the Wildcards text box to MPE’s Listfile command. If you specify a wildcard that does not start with an HFS prefix (slash [/], dot-slash [./] or dot-dot-slash [../]), Listfile assumes the information is for an object (file, group or account) in the MPE namespace. If you use one of the HFS prefixes, Listfile searches the POSIX namespace. Currently, there is no way to get a complete file list by searching both namespaces with a single wildcard string.
Under MPE/iX 5.5 (and perhaps other versions), you can use the Seleq parameter to further refine the requested file set.
For example, you could use the Code= option of the Seleq parameter to only select files of a certain type. You would then be able to select only Qedit files (code 111),
CM program files (code PROG), NM program files (code NMPRG) or COBOL source files (code EDTCT) using wildcards such as:
@;seleq=[code=111]
@;seleq=[code=prog]
@;seleq=[code=nmprg]
@;seleq=[code=edtct]
For a list of file types, refer to “Appendix B - File Types” on page 231. The Seleq
parameter has a lot of different options. Please refer to your host user manuals for details.
Changing Directories
Qedit displays directories (parent or subdirectory) in color. If you select a directory within the current working directory, it becomes the new current working directory.
You can look for a file by continuing to move to other directories in which you have read access.
It is important to remember that there is only one current working directory per connection. Even though you can go to the Directory dialog box from the Open
Host File and the Host Save As dialog boxes, you are really dealing with the same Directory dialog box. This means a change in the current working directory reflects on both host Open and Save As operations.
If you know the exact location of a directory, you don’t have to go through other directories to get to it. Just use the absolute (e.g., /users/demo) or relative (e.g.,
../demo) syntax of the path name in the File name text box and select the
Directory button.
For more host-specific information about file and directory notation conventions, see
the “Notation in Host Operating Systems” on page 67.
Selecting Files
Once you have found the files you need, they can be opened from the Directory dialog box. You can select a file by highlighting it in the listing (it then appears in reverse video) or by entering its name in the File name text box. To highlight a file, click it once; to remove the highlight, click it again.
If you want to open a number of files at once, you can highlight them in the listing.
You can select up to ten (10) files. When you select multiple files, the File name text box will display the number of files selected. You cannot use the
SHIFT
key to select additional files; you have to select them one by one.
Qedit for Windows User Manual Creating & Opening Files
• 71
Opening Selected Files
Qedit allows you to open files from the Directory dialog box. Once you have selected a file or a number of files, simply click the appropriate button.
When opening files on a UNIX host or in the POSIX namespace on MPE, Qedit prepends the file name with dot-slash (./) to indicate the current working directory, if the file name does not start with a dot (.) or a slash (/) that already indicate a relative or absolute path.
If you have an MPE file and a POSIX file that have similar names, the server might not open the file you expect. For example, let's say the MPE file is called MYFILE and the POSIX file is called myfile. Qedit does not prefix the POSIX file with "./" because it does not distinguish lowercase from uppercase letters. Aside from the case, the names are identical. In this situation, the server always finds files in the
MPE namespace first. Thus, if the filename is not explicitly identified with "./",
MYFILE will always be opened.
Printing a Directory Listing
You can get a copy of information displayed in the Directory dialog. Simply click the Print button. The listing can only be printed to a local printer.
Saving Host Files
If you have invoked the Directory dialog from the Host Save As dialog, the
Open button becomes Save. You can navigate through the directory structure until you get to the desired location. You can enter a new name or you can select one from the list. To save the file, click Save.
Opening a File
Very often, you will be working on existing files. In order to modify these files, you first need to open them. Qedit can open files in a number of ways, including some shortcut methods. Qedit always applies a file’s saved attributes from its document database, no matter how the file is opened.
Document Attributes Saved by Qedit
Qedit maintains a document database in which it stores document-specific attributes.
Document information is added or updated whenever files are opened, saved or closed.
Local file names are fully qualified including the drive letter. Host file names are also fully qualified including the connection name on which they were opened.
For each file in the database, Qedit keeps track of the following settings:
• the cursor position or selection active at the time of closing
• the display status of the Ruler bar and Record numbers
• current Tab settings
• current Guide settings
72
• Creating & Opening Files
Qedit for Windows User Manual
Qedit for Windows User Manual
• all of the check-box settings from the Options page of the Properties dialog box
• the font settings from the Options page of the Properties dialog box
• the document-specific COBOL tag
Qedit is careful to track only these 6 settings for each document. They are stored
locally in the database called Qwinddb.dat. See “Support Files” on page 11. Nothing
is stored on the server. That means you can copy the document database from one
PC to another and get the same attributes on all client machines (e.g., your home PC and your PC at the office). To have complete consistency between machines, you also have to make sure certain information, such as the connection names and available fonts, is the same on each machine.
Qedit saves the last selection position within the file as line and column coordinates in relation to the beginning of the file. If a file is modified with something other than
Qedit, next time you open the file with Qedit, it selects the same coordinates, but the selected text might be a completely different string.
If you open a host file and view the ruler, you will see the default tab settings specified in the host Qeditmgr files. If you close the file, exit Qedit, start it up again, and open the same file, you will continue to see the default host tab settings, even if these settings changed on the host.
If you open a document, view the ruler, and then change the tab settings, these become the new tab settings for the document. They override whatever default settings were specified in the host configuration files.
Similar rules apply to the font settings. If you never change the font of a document when you open it, you will view the document in the default font. If you do change the font of a document, the new font will be saved and it will be applied from that point onward. It does not affect other documents.
There is currently no way to reset all the local and host defaults for a modified document.
Opening a File from a Command Line
The command line interface feature in Qedit can automatically open a file at startup.
You can use this feature from a DOS prompt, in a DOS shell script, or in any other application that has a command line interface. You cannot create a new file from a command line; you can open only an existing file.
The command line feature uses the following syntax:
qedit <connection>:<filename>
Qedit is the program file name. In a Typical installation (on a stand-alone PC), the program file name would be Qwin32. Depending on the interface you use, you might have to qualify it with the letter of the drive, the full path name (e.g.,
C:\Robelle\Qwin32) and the file extension (e.g., Qwin32.exe).
Connection represents the valid name of a saved connection, which must be identical to a name in Qedit’s connection list. This means you must make sure all lowercase and uppercase characters are entered correctly, as well as any spaces and special characters.
Qedit assumes everything in front of the colon is part of the connection name. If it cannot find a corresponding name in the connection list, it assumes the file is local
Creating & Opening Files
• 73
74
• Creating & Opening Files and tries to open it as such. To open a local file, you can simply use the letter of the drive as the connection name. For example, you can enter qwin32 c:\windows\readme.txt
Everything after the colon is read as the file name. You can use relative or absolute notation, just the file name, or a fully qualified file name, but you must use the notation appropriate for the operating system on which the file resides.
Qedit tries to open the application window with the "restore" size from the last edit session. If the "restore" size is not large enough, Qedit will not start properly and display an error. To avoid this problem, you can use the "-m" argument to force it to start with a maximized window.
Opening Embedded Files
The fastest way to open a file which has its name embedded in your document (e.g., an Include file), is by highlighting it and entering
CTRL
+
D. Or you can open it by right-clicking on the highlighted selection to get the shortcut menu, and choosing the
Open command. You can also open it by selecting of the File menu, pointing to
Open, and clicking the Open command with the selected file name.
If the host file you are opening is not fully qualified, Qedit will look for the file in the current working directory (UNIX) or the current group (MPE) on the same connection as the current document.
If you want to open a file on a different connection, you can specify the connection name (as defined in the connection list) as a prefix to the file name, separated by a colon. For example,
Vancouver MPE:myfile.mygrp
Vancouver UX:/users/clerk/.profile
are valid file names. If you select one of these strings and use the Open selection command, Qedit will verify that Vancouver MPE or Vancouver UX is a valid connection name. If so, it will automatically try to connect to the corresponding host and open the file Myfile.Mygrp or /users/clerk/.profile.
Opening MRU (Most Recently Used) Files
Qedit maintains a list of the most recently used files. This list is accessible via the
Recent files command in the File menu. Local file names are fully qualified including the letter of the drive. Host file names are also fully qualified including the connection name on which they were opened. For host files, Qedit also keeps track of the options used the last time you opened the file (i.e., Read-only or Force
unnumbered).
To open a file in the list, select the Recent files command in the File menu. Qedit presents the list of most recently used files as a submenu.
Qedit for Windows User Manual
Shortcut: CTRL+O
Toolbar:
List of most recently accessed files
By defaut, Qedit for Windows displays 20 files. This number can be changed in the
General tab of the Preferences dialog. Simply enter the desired number of files in the Length of Recent Files or Favorites lists. You can enter a value between 5 and 50.
When the filelists are displayed, a shortcut character is assigned to the first 35 files.
This means you can select a file by combining the ALT key with corresponding character as in ALT+3 or ALT+B. The first are numbered from 1 to 9. The next 26 are labeled from A to Z. Files 36 through 50 do not have a shortcut character.
When you open a file, Qedit always applies the saved document-specific attributes from its document database, no matter how the file is opened. You do not have to use the Recent files command to take advantage of this feature.
Opening a Local File
Qedit can open local files, including text and HTML files. To open a local file on your PC or on a networked drive,
1. Select the File menu, point to Local, and click Open.
2. When the Open dialog box appears, it provides the following options:
• File name
• Files of type
By default, Qedit displays all files and folders available in the current directory. You can reduce the number of files by selecting one of the filters available in the Files of type list box. The default is All files (*.*). Click the list box to display available filters and select one. Note that the filters do not apply to folders in the directory. Only files are filtered.
Qedit for Windows User Manual Creating & Opening Files
• 75
76
• Creating & Opening Files
Select a file filter on local files
• Open as read-only
If you open a local file with write access (the default), you can, of course, make changes to it. If you save these changes, you effectively erase the old version of the file. You can, however, protect yourself from modifying a file by enabling the Open as read-only option before you open the file.
Windows will mark a file opened with write access as busy. In Windows
95, some applications automatically convert any subsequent opens into read-only mode. Qedit allows you to open the file again, but it will give you an “Error deleting a local file—permission denied.” error message when you attempt to save changes to the file. Qedit does not stop you from opening the file again.
Before you open a file, the buttons and the directory listing on the Open dialog box allow you to perform the following operations:
• navigate through folders
• create a new folder (Create New Folder button)
• list the contents of a directory (List button)
• list the details of a directory (Details button)
• display all files of a specific type
3. Open a file by double-clicking it or by entering a File name and clicking the
Open button.
You can also select multiple files and open them all at once. Qedit uses Windows’ standard way to select multiple items.
There is a limit to the number of files that can be opened in a single operation. The limit is not the number of files, but rather the number of characters that make up all these file names plus the drive letter, the current working directory and name delimiters. All these cannot add up to more than 2,048 characters. If you exceed this limit, Qedit displays an error message after you press the Open button.
Qedit for Windows User Manual
Internet Explorer Edit tool
Shortcut: CTRL+SHIFT+O
Toolbar:
Opening an HTML File
In recent versions of Microsoft Internet Explorer, you can edit the Web document that you are currently viewing. By default, when Internet Explorer opens an HTML file, it runs Notepad or Wordpad depending on the size of the document. To change the default editor for an HTML file to Qedit,
1. Start Windows Explorer (not Internet Explorer).
2. Select the Options command in the View menu.
3. Select the File Types tab.
4. Find Internet Document (HTML) or Microsoft HTML Document 4.0 in the
Registered file types list. The actual wording can be a little bit different. Just make sure the file extensions are HTM and HTML.
5. Select Edit in the Actions list. If it is not there, select New.
6. In the Application used to perform action text box, enter the fully qualified name for the Qedit program. You can select Browse to find it using
Windows Explorer.
You can edit a Web document by selecting the Page (Internet Explorer 4.0) command in the Edit menu or selecting the Edit tool. A new instance of Qedit will run automatically with the current document opened. You are then able to make changes to the document.
You can save your changes to local files without any problems. However, if the Web document is on a remote server (i.e., an MPE or UNIX host), Internet Explorer simply passes a temporary copy of the document to Qedit. In this case, the only thing you can do is to use the Save As command of the File menu and save the revised version under a new name on your local drive. You then need to transfer the file back to the server (e.g., using FTP).
Opening a Host File
Qedit can open MPE and HP-UX host files, Qedit workfiles as well as copies of these files.
To open an existing file on a host server,
1. Select the File menu, point to Host, and then click Open.
2. When the Open Host File dialog box appears, it provides the following options to either search for a file or to open it:
Qedit for Windows User Manual Creating & Opening Files
• 77
78
• Creating & Opening Files
Open Host File dialog box
• Connection
Select a connection from the Connection list. If you need a new connection to a host or you need to use a new login name, click the Create button. You can also use the Create button to set up a temporary connection.
If a host file is the active window when you access this dialog box, Qedit opens the file on the same connection as the active file. If no document is open or if the active window is a local file, Qedit uses the connection name that was used to open the last host file.
• File name
Enter the file name or choose a file from the most recently used (MRU) list.
This list includes files that have not been opened successfully, starting with the most recent name at the top of the list. The list is preserved from one
Qedit session to the next. The file names are recorded as you originally entered them, even misspelled files. Qedit does not keep track of the connection associated with a file name in the list.
If the file you want is not in your home directory on HP-UX or logon group on MPE, you can type the path name in the File name text box.
NOTE: Files opened via the Directory dialog box, the Open selection command (
CTRL
+
D
) of the File menu, or a shortcut menu (right-click) are not added to the MRU list. The list also does not include files saved by the
Save as command. However, all typed file names are added to the MRU list, which is available through the Recent files command in the File menu.
• Wildcards
Because the File name and Wildcards text boxes are also in the
Directory dialog box, read “Host Directories” on page 68 for general
information. For more host-specific details, read “Notation in Host
Operating Systems” on page 67 for the corresponding host: UNIX, MPE
with POSIX and MPE. These sections describe how to use the text boxes
Qedit for Windows User Manual
Qedit for Windows User Manual
along with the Directory button to quickly switch to other directories and groups, and to select only the files that you want.
• Directory
If you don’t want to type or you can’t remember the spelling of the directory or file, there is another way to find a file. Just click the Directory button. This will give you a list of files in the current directory and access
to other directories on the host. For more details, see “Host Directories” on page 68.
If you find the file through the Directory dialog box, you can open it from there.
• Read only
Sometimes you know that you just want to look at a file, but you don’t want to modify it. In this case it is better to enable Read only (
ALT
+
Y
) before you open it, which will protect you from making any accidental changes.
This option is also useful if someone else is editing the file you want to view. The Read only option is available in the Open Host File and
Directory dialog boxes. If you have selected multiple files in the
Directory dialog box, the Read Only option will apply to all of them.
• Open a copy
There are times when you want to modify a file, but you don’t want to lose the last version of it. To open a copy of a host file, enable the Open a
copy (
ALT
+
E
) option before opening the file. For more ways to copy a
host file, see “Copying a Host File to Another Host” on page 149.
• Force unnumbered
The server analyzes the last 8 columns of the first 5 lines in a file. If these columns contain only numeric digits and these digits are in ascending order,
Qedit assumes these are line numbers and should not be part of the data. In certain cases, this can cause problems because these numbers might very well be valid data.
To force Qedit to read these files as unnumbered, enable the Force
unnumbered option (
ALT
+
U
) before opening the file. The numbers will be displayed along with the rest of the text. You will also be able to edit these columns.
• Length
This option is available on HP-UX connections only and with version
5.3.13 or later of the server. If the connection has not been opened yet, the option is available but might be ignored by the server. If the connection is opened and the server does not support the feature, the option is not displayed at all.
If the file does not contain Newline delimiters at the end of each line, you can enter a maximum line length to break the file into pieces. In this case, all lines will have the same length except for the last one which might shorter. This would happen if the total size of the file is not evenly divisible by the specified length.
You can specify a maximum line length on a file that contains Newline delimiters. In this case, lines that are shorter than the specified length will remain the same. Lines that are longer than the specified length will be
Creating & Opening Files
• 79
80
• Creating & Opening Files broken up in pieces. If the existing line is not evenly divisible by the specified length, the last part of the line might create a line shorter than the specified length.
The file is going to be saved with the Do not write Newline delimiters option enabled whether the original file contained Newline delimiters or not.
3. Click the Open button to open the file on the host. Qedit will use your existing connection if you have one. Otherwise, it will establish a new connection.
Opening Files with Binary Data
Qedit can edit files that contain text information. It can also edit a binary file, although Qedit will likely corrupt these files so badly that you might not be able to touch them with the application that created them.
That is the case for documents created by word processing applications such as
Microsoft Word. Qedit can open these files and display their contents as best it can.
The document window, however, will probably contain all kinds of garbage characters that will not make any sense. Do not save the file, even if you have not
changed anything.
Server Warnings
The server might detect inconsistencies when opening host files and send warning messages to the client. The file is going to be open but might be different from what is the host. The user should then check the file and fix the problems before accessing them again.
Lines Exceeded Maximum Length
Some files must have specific attributes based on the language they correspond to.
One of these attributes is the Record Length. For example, COBOL source files are supposed to have fixed-length records of 74 bytes (Cobol) or 80 bytes (Cobx). If one or more lines exceed that size, Qedit displays the following warning:
Some lines exceeded the Language maximum line length. These lines have been folded. See line 15 (Server warning 1)
The server folds the overflowing lines. This means the server puts the characters exceeding the Record Length onto a separate line. Effectively, this means the file appears to have more lines than the original. The warning message shows the number of first folded line (15 in the example above). The user should examine that line and determine if the file can be fixed and saved without losing or damaging the original file.
Server Ran Out of Line Numbers
The server requires line numbers to be able to edit host files. If the file does not already contain numbers, the server assigns them as it reads the file. It determines as precisely as possible the range and increment to use. For extremely large files, it is possible for the server to run out of line numbers.
Other files such as COBOL source files might already contain line numbers. In this case, the server uses these numbers. The server makes sure that the line numbers are valid (all numeric) and in ascending sequence throughout. If it encounters an invalid
Qedit for Windows User Manual
line number, the server tries to recover the error and starts assigning line numbers.
This could also cause the line number to exceed the absolute maximum.
In these situations, Qedit displays the following warning:
The server ran out of line numbers while texting the file. The file may be too large or contain invalid line numbers. See line 032980. (Server warning 2).
When the server runs out of line numbers, it simply stops reading the file. This means the file as seen in Qedit for Windows does not have all the original lines. The user should close the file immediately without saving it. The file should be examined closely to determine the cause.
The possibly invalid line number is displayed as part of the warning message after
"See line". In order to find the corresponding line, you should close the file without saving and open it with the Force Unnumbered option enabled.
Maintaining and Using a List of Favorites
The Favorites command on the File menu allows you create and maintain a list of files that you access most often. You can add filenames to the list. You can create groups to assemble files related to a project for example. Of course, you can remove them from the list. A file can only appear once in the list even if you use folders.
Adding to the Favorites
To add a file to the list of favorites:
1. Open the file
2. Click the right mouse button to display the shortcut menu
3. Click on (Insert here) to add the file at this level
Qedit for Windows User Manual
Adding a file to the top level Favorites
Creating & Opening Files
• 81
Adding to a Favorites Folder
You can organize the Favorites list into groups or folders. A folder could represent files needed for a larger project. You can also have multiple levels of folders. In other words, a folder can contain other folders.
To create a new folder and add a file to it:
1. Open the file
2. Click the right mouse button to display the shortcut menu
3. Click on (New folder). This should bring the New Favorites Folder dialog box.
4. Enter the name of the folder. The name can contain any character except a colon
":". It can be as long as needed.
5. Click OK. The folder is created and the filename is added to it.
Creating a new Favorites folder and adding a file to it
If the folder already exists, it's going to appear on the shortcut menu. To add a file to a folder, select the corresponding (Insert here) command.
82
• Creating & Opening Files
Qedit for Windows User Manual
Add a file to an existing Favorites folder
Opening a File from the Favorites
The filename now appears on the Favorites list. To open it, select the Favorites command on the File menu, find the file in the list and click on it. Because filenames can be very long, the name may be shortened in the list. Qedit replaces some characters in the middle with three dots. However, when you put the mouse pointer on a name, Qedit displays the fully-qualified name on the status bar.
Qedit for Windows User Manual Creating & Opening Files
• 83
84
• Creating & Opening Files
Opening a file from the Favorites
There's no limit to the number of files that can be added to the Favorites list and each folder. However, Qedit only displays a limited number of files. This limit can be changed in the General tab of the Preferences dialog. You can have between
5 and 50 files. The default limit is 20.
When the filelists are displayed, a shortcut character is assigned to the first 35 files.
This means you can select a file by combining the ALT key with corresponding character as in ALT+3 or ALT+B. The first are numbered from 1 to 9. The next 26 are labeled from A to Z. Files 36 through 50 do not have a shortcut character.
Removing from the Favorites
To remove a file from the favorites list:
1. Open the file
2. Click on the right mouse button to display the shortcut menu
3. Select Remove from favorites
You don't have to find it in the list. Since it can appear only once, Qedit is able to identify it unambiguously and remove it.
Qedit for Windows User Manual
Removing a file from the Favorites
Viewing the List of Open Files
Shortcut: ALT+W
If you have opened more than one file, you can view your list of open files by selecting the Window menu. The opened files and newly created files will be listed at the bottom of the menu list, and they will be numbered 1, 2, 3 etc. You can go to any of the files by typing its number or by selecting the file from the menu list.
Customizing Opening a File
Setting Default Options for New Files
If you want to set the default options for a new file,
1. Select the Preferences command from the Options menu.
2. When the Preferences dialog box appears, go to the appropriate tab for the platform where the file resides. The platforms currently supported are UNIX,
MPE and local files.
3. When you see the correct tab, select the options you want to use as defaults.
4. If desired, you can set the defaults for the other platforms at this point also.
5. Click OK to save the options as the new defaults.
Default options are used for new files, files that are not in the document database i.e.
have never been opened in Qedit or files in the document database but for which you have not specified custom settings.
Changes made in the Preferences dialog box are not applied to currently opened
Qedit for Windows User Manual Creating & Opening Files
• 85
This option is only available in version 4.7.04 and later.
colors list box. If you want to define a new color scheme or change an existing one, read the "Setting the Default Color Scheme" on page 121.
Loading Local Files into Memory
The Load local files smaller than ... K into memory option lets you control whether Qedit will load local files into memory. When this option is disabled
(default), Qedit brings only the necessary parts of the file into memory. As a result, you can edit local files that are much larger than your PC’s memory
If this option is disabled, Qedit keeps the original file open during the editing process and prevents other people from modifying the file at the same time. When
Qedit saves your changes, it merges the modified lines into the original file.
Reading the entire local file into memory, however, has other advantages. Editing is very fast because the text you work on is always present in memory. By releasing the file as soon as Qedit has finished loading it, the file becomes available to other people almost immediately and stays available until Qedit reopens it to save changes.
To specify which local files get loaded into memory,
1. Select Preferences from the Options menu.
2. When the Qedit Preferences dialog box appears, select Load local files
smaller than ... K into memory and specify a threshold file size. If a file is smaller than or equal to the specified value, Qedit will load the whole file into memory. If the file is larger, Qedit will load only the necessary parts of the file, which is how Qedit works when this option is disabled.
The minimum value (default) is 32K. The maximum value is 4,096K. For files below the configured threshold, Qedit allocates a memory block based on their size. If you open several large local files at the same time, you can quickly consume available memory. For this reason, we recommend that you use a conservative value for a threshold.
3. Click OK to save the option settings and close the dialog box.
If Qedit has difficulty loading a file because you don’t have enough memory, the result of an open operation is unpredictable.
This option also affects save operations. For more details, see “Saving & Closing
86
• Creating & Opening Files
Qedit for Windows User Manual
Pobierz
Reklama