Saving & Closing Files. Robelle Solutions Technology Inc. Qedit for Windows 5.9.13
Mainos
Mainos
Saving & Closing Files
Overview
You can quickly save and close files in Qedit, both explicitly and implicitly. The familiar Windows interface makes saving local files an easy routine to develop.
Changes to Qedit workfiles are immediately posted to the hard disc, so your work is automatically saved. Closing files is equally simple. Whether you close individual files or the program itself, you are prompted with saving options before a file is closed.
Saving a File
Qedit for Windows User Manual
Which files do you need to save?
Just because you typed some lines into a new or existing file, does not mean that your work has been saved. If there is a problem with the PC or the server, or the
TCP/IP connection between them stops, it is possible that you will lose the work you have done.
That is why Qedit for Windows has a save function accessible in many different ways. Most local and host files have to be saved explicitly, individually or all at once. Local files also have an auto-save feature. Of course, if you are using Qedit workfiles, you do not have to worry about explicitly saving all your changes.
Auto-Saving Local Files
If you want to worry about saving your work, you can automatically save changes to
local Qedit files at regular intervals. See “Saving Changes at Regular Intervals” on page 162.
Saving a Qedit Workfile
If you are working on a saved Qedit workfile, you do not need to perform an explicit save to protect your work, because workfiles are directly connected to the host so that changes are posted immediately. If you are editing a copy of a Qedit workfile, you must save the copy by performing a Save As command. If the connection is lost before you save the copy, only the changes that were made after the file was
Saving & Closing Files
• 157
Shortcut: CTRL+S
copied might be lost. Under most circumstances, it is possible to recover your changes, see "Recovering a File" on page 219.
If you are working on a Qedit workfile and you want to save it as a regular file, you need to open a copy of the workfile and then save it under a new name. If you do not open a copy of a workfile, a Save As command simply renames the workfile.
Saving an Existing File (Local and Host)
To save changes to an existing file, whether host or local, use the Save command.
Save is also one of the standard buttons on the toolbar. This menu choice is unavailable if you have not made any changes since the last save, if your file does not have a name yet (Copy or New), or if you opened the file with Read Only access.
If the file has been modified by someone else since you opened it or last saved it,
Qedit will warn you and suggest not doing the Save. This option can be disabled in the Preferences dialog box in the Options menu.
The Load local files ... K into memory option also affects how Qedit saves changes to a local file. If you enable this option, modifications to a local file that is smaller than the configured threshold are saved only when you perform a save operation. When Qedit opens these files, it reads the text into your PC’s memory and closes the original file. If, however, a file is larger than the configured threshold or this option is disabled, Qedit treats the file like a host file and continually saves your
changes to the original file. For more information, see “Loading Local Files into
Saving a New Host File
To save a new host file once you have created it,
1. Select the Save or Save As command of the File menu.
2. When the Host Save As dialog box appears, enter the new file name. Qedit will save this file in the current directory. If you want to save the file in a different directory, enter a path to another directory including the new file name.
See “Notation in Host Operating Systems” on page 67 for more details.
If you do not remember the path name to the new location, you can use the
Directory button and go to the Directory dialog. There, you can navigate the directory structure until you get to the desired location.
158
• Saving & Closing Files
Qedit for Windows User Manual
Qedit for Windows User Manual
Host Save As dialog box
• If the new file name already exists, Qedit asks if you want to overwrite the existing file with the new one. Check whether you are really in the directory you think you are before clicking OK. The
ESCAPE
key or Cancel button is always safer!
If you already have a file with the new name, Qedit gives you an option to overwrite its contents, eliminating the confirmation message.
• Qedit also gives you an option to save the new file as a Qedit workfile.
• Enable Do not write Newline delimiters to save the file without any
Newline delimiter. This option is automatically enabled if the Length option has been specified on the Open Host File dialog box. This option is only available with the HP-UX server version 5.3.13 or later.
• Enable Fixed-length records if you wish to save the file with lines of equal length. This option is automatically enabled and can't be disabled if the CobolFixed server setting is enabled and you are editing a Cobol source file. This option is only available with the HP-UX server version
5.3.13 or later.
3. Click Save to finish saving the file.
Saving a New Local File
To save a new local file once you have created it,
1. Select the Save or Save As command in the File menu.
2. When the Save As dialog box appears, give the file a name and select the directory in which you want to save it.
3. Click Save to finish saving the file.
If a file has not been saved yet or you use the Save As command on an unsaved file, a Save As dialog box will appear so that you can select the drive, folder and file name.
Saving & Closing Files
• 159
Saving All Opened Files
If you want to quickly save your changes to all the files currently opened, just select the Save All command in the File menu. If you have newly created files, Qedit will prompt you for new file names. If you were working with existing files, the changes are simply written to disk.
Closing a File
Close button in Windows 95 has an X.
Explicit vs. Implicit Close
When you close a file, Qedit posts all changes to it, releases any exclusive-access claims you have on it, and closes its document window. Of course, there is an explicit Close command on the File menu, but there are also implicit closes.
Implicit closes occur when you Exit from Qedit or when you Disconnect from a host.
Closing a File
In both local and host files, you can explicitly close the currently active edit window by using the Close command in the File menu. There is no corresponding toolbar button. In Windows 95, you can use the Close button in the top right corner of the window. You can also use the
CTRL
+
F4 shortcut. The edit window you closed should disappear and, if you have other files opened, another one will take its place on your screen.
What if there are unsaved changes?
If you have made changes to the file and not saved them, Qedit will ask you if you want to save your changes.
160
• Saving & Closing Files
Save confirmation dialog box
You have three ways to respond:
• Yes - Qedit saves the file. If the file has not been named yet, Qedit also prompts you for a file name as if you had selected the Save As command.
• No - Qedit closes the file and your latest changes are lost.
• Cancel - Qedit cancels the close operation and brings you back to the edit window.
Qedit for Windows User Manual
What happens to connections when you close a file?
When you close a host file, Qedit usually leaves your connection to that host active, in case you want to open another file on the same host. For more information, see
“Closing a Connection” on page 59 and “Closing Connections without Open Files” on page 59.
Forcing a Close on a Host File
Qedit always keeps track of what is going on with the server. The server always acknowledges each transaction that it receives. If a transaction is critical, Qedit will not continue until it receives a confirmation from the server.
When a file is closed, for example, the document window remains on the screen until the server confirms that the file has been closed properly. If there is a problem and Qedit does not receive an acknowledgment, a document window might remain open. If a user tries to repeat closing the file, Qedit will display a Force Close dialog box because it is waiting to finish processing the first request. Another symptom of an incomplete close operation is the continued appearance of transmission arrows. If Qedit receives another close operation while an earlier close operation is still in progress, you might see one of the following error messages in the Force Close dialog box:
Error closing connection name: filename. Close anyway?
Some information may be lost.
Unknown error closing filename. Close anyway? Some information may be lost. (Server error error number.)
Connection name has not finished operation the file.
Do you want to close anyway? Some information may be lost.
Select OK if you want Qedit to close the file without waiting for the server to respond. As mentioned in the message, you will be interrupting a transaction. If data movement is involved, you run the risk of losing data. You should only select OK when you are sure the connection with the server has been broken and the transaction cannot be completed.
If you want to give the transaction a bit more time, select Cancel.
Customizing Saving and Closing Files
Automatically Posting Qedit Workfiles on the
Server
To post the latest changes to all workfiles when you go to another Windows application, select Preferences from the Options menu, and enable the
Automatically post Qedit workfiles option. Qedit offers this option in case another application needs to use the file. If you disable this feature you can lose some changes to the file.
Qedit for Windows User Manual Saving & Closing Files
• 161
Comparing Timestamps Before Overwriting Host
Files
By default, Qedit does not save your edited file on the server if someone else has modified the file after you got your copy of it. If you choose the Compare
Timestamps before Overwriting on Server option, Qedit allows you to write over other people’s work without receiving a warning. To change the default, simply select Preferences in the Options menu, and enable this option.
Saving Changes at Regular Intervals
Qedit can now automatically save the latest changes to a file at regular intervals. To use this feature, you have to enable the Save automatically option in the General tab of the Preferences dialog box. Then specify the number of minutes between
Save operations. If you are working with text files (as opposed to Qedit workfiles), your work is regularly saved. If you lose your connection, you only lose your work from the last automatic Save operation.
When this feature is enabled, all changes to all your currently opened files are saved
at the same time. Qedit does not allow you to set different intervals for specific documents.
162
• Saving & Closing Files
Qedit for Windows User Manual
Lataa
Mainos