QEDIT/UX Version 5.1 Full-Screen Text Editor for HP-UX Change Notice Installation Instructions Addendum to 4.8 User Manual Robelle Solutions Technology Inc. Suite 201, 15399-102A Ave. Surrey, B.C. Canada V3R 7K1 Toll-free: 1.888.robelle (1.888.762.3553) Phone: 604.582.1700 Fax: 604.582.1799 E-mail: support@robelle.com Web: www.robelle.com February 2001 Program and Manual Copyright Robelle Solutions Technology Inc. 1977-2001 Permission is granted to reprint this document (but not for profit), provided that copyright notice is given. QEDIT and SUPRTOOL are trademarks of Robelle Solutions Technology Inc. Windows is a trademark of Microsoft Corporation. Other product and company names mentioned herein may be the trademarks of their respective owners. Introducing Qedit/UX Version 5.1 * Qedit for Windows * Change Notice and Addendum to Manual * Highlights * Compatibility * CPU Serial Number (uname) * Known Problems * Documentation * Documentation in WinHelp Format Qedit is our fast and efficient full-screen editor and development home base for HP-UX systems, both workstations and minicomputers. One of our objectives for Qedit is to give PowerHouse and COBOL developers all the necessary capabilities to perform their work from a single program. We are constantly enhancing Qedit with new features and fixes requested by users. Not only does this change notice include a description of Qedit's enhancements, it includes detailed installation steps and a list of other changes for host-based Qedit. This change notice also includes a description of the server portion of Qedit for Windows. Host-based Qedit is also available for MPE, with virtually identical features. If you would like more information, please contact Robelle Solutions Technology Inc. Qedit for Windows Our newest editor, Qedit for Windows, now gives you the familiar Windows interface for editing both MPE/iX and HP-UX files, all from a single program. Qedit for Windows is the next generation of our popular editor, which consists of a Windows editing client and either an MPE/iX or HP-UX editing server that work together to edit host files. Since its release, we have focused our development efforts on Qedit for Windows, adding more functionality and continuing to expand its capabilities. If you would like to upgrade to Qedit for Windows, please contact Robelle Solutions Technology Inc. Change Notice and Addendum to Manual This document has two purposes: * It describes the enhancements made to host-based Qedit and the server portion of Qedit for Windows, since the most recent full production release of Qedit/UX, version 5.0. These will be shown as Changes After Version 5.0. * And because the user manual has not been reprinted since version 5.0, this document describes the enhancements made after 5.0 through to the 5.1 production release. These will be shown as Changes Up To Version 5.1. For information about enhancements to the client portion of Qedit for Windows, see the Qedit for Windows User Manual. Changes After Version 5.0 These are the changes made to Qedit since the last major release (version 5.0). Highlights In Version 5.1 * The Setincr option of the Text command requests that the current Set Increment value be used when reading the file in. The default is for Qedit to decide which increment to use. Highlights In Version 5.0.12 * When returning to line mode, full-screen mode sets the display width back to its original setting. * The Setincr option of the Text command requests that the current Set Increment value be used when reading the file in. The default is for Qedit to decide which increment to use. * The Glue command left an empty line behind in some cases when working with CobolX source files. * Qedit is doing a better job at handling incorrectly numbered Cobol source files. Highlights In Version 5.0.11 * Keep without an explicit name is now an error if the Browse option has been used on the Text or Open command. Highlights In Version 5.0.10 * A rangelist can now contain up to 10 different strings to search for. Each string in the list can have different search settings such as column range and options. String are separated from each other by OR keywords. * The new Tag option on the Change command allows modification of only the Cobol tag in columns 73 to 80. Change commands without this option affect only the text area, columns 7 to 72. * It is now easier to determine which version of Qedit is installed. Simply use the UNIX what command to display the version information. * If the ROBELLE variable is not set, Qedit determines the location where it is running from and adjusts the location of its support files (e.g., online help for host-based Qedit, log files for the server). This lessens the need to set the ROBELLE variable and makes the support files available in most situations. * If you want to know where you are running Qedit from, do a Verify Program. Qedit displays the fully-qualified filename current executing. * The ROBELLE variable now allows the pathname of support files to have 240 characters. That limit used to be 36 characters. * A backreference (e.g. \1) in the replacement string used on a search for a regular expression without a subpattern fixes the text correctly. In this case, the replacement string is used as a literal. This problem has also been fixed in the Qedit for Windows server. * Set X without parameters now resets the COBX tag settings. Changes Up To Version 5.0 There were no changes made to Qedit since the user manual was last printed (for version 5.0), up to and including the most recent major release (version 5.1). Compatibility Qedit/UX is compatible with most versions of HP-UX 10.20 and later. IMPORTANT: As of HP-UX 11.0, HP has dropped support for block-mode terminals. For this reason, full-screen editing is only available in Screen mode on HP-UX 11.0 and later. In the examples in this document, we have used HP-UX 10.20 conventions and assumed Qedit is installed in the /opt/robelle directory. CPU Serial Number (uname) Qedit/UX runs only on CPUs whose serial numbers (the "uname" on HP-UX) have been encoded. If it fails to run and you see an "invalid HPSUSAN" error message, call Robelle for assistance. Known Problems There are currently no known problems. Documentation Extra printed copies of the Qedit User Manual can be ordered directly from Robelle or one of its distributors. The complete user manual is also available in on-line Help. Documentation in WinHelp Format Both the MPE and HP-UX editions of the Qedit User Manual are now available in the popular WinHelp file format of Microsoft Windows. Your tape includes a WinHelp file, which is a self-extracting compressed file that contains all the Help files and a Setup program. Use the installation instructions in this change notice to install the files on your PC. Installation If you are a new Qedit/UX user, please follow the installation instructions in the Qedit User Manual. The notes below assume that you are an existing Qedit/UX user who is upgrading to version 5.1. To install this upgrade of Qedit, follow these steps: 1. You must log on as root. 2. Create the correct directory structure. 3. Restore Qedit/UX and its associated files from the distribution tape. 4. Set up variables to let Qedit know where some of its supporting files are located. 5. Set up a link between /var/tmp and /usr/tmp if you are installing on HP-UX 10.x. 6. If you have the Qedit for Windows server, you need to start the daemon process. (optional) 7. You can install WinHelp documentation files. (optional) The installation should take about half an hour, during which time no one can use Qedit. Installation Assistance If you have any questions about the upgrade or run into any problems, please call us. Technical support is available on weekdays from 7 a.m. to 4 p.m., Pacific time. Step 1: Log On as Root There are two ways you can log on as root: a. Exit from HP-UX and log on with root as the user name. b. If you are already logged on, you can execute this command: su - In either case, you have to know and supply the user password for root. Step 2: Create Robelle Directory Before restoring files, you must first create the directory in which Qedit will reside: mkdir /opt/robelle Step 3: Restore Files Use the following command to restore the Qedit/UX files from the distribution tape: tar xv /opt/robelle This command assumes your tape device is /dev/rmt/0m. If it is not, you need to specify your tape device using the "f" option in the tar command. For example, if your tape device is /dev/rmt/1m, you need to use the following command to restore the files: tar xvf /dev/rmt/1m /opt/robelle Step 4: Setting Up Variables You can set up numerous variables to make running any of the Robelle products easier. The three variables that we recommend setting are ROBELLE, PATH and MANPATH. * The ROBELLE variable tells the Robelle products where it's supporting files are located. * The PATH variable, when set, allows the user to run Qedit by just typing "qedit" instead of the fully qualified program name. * The MANPATH variable, when set, allows users to access the manpage (Help page) for Qedit. You can invoke Qedit with the following command: /opt/robelle/bin/qedit The easiest way to add variables accessible to all users is to set the variables in the global exec file for the shell you use. For the Bourne and Korn Shells we recommend the following additions: export ROBELLE=/opt/robelle export PATH=$PATH: $ROBELLE/bin export MANPATH=$MANPATH: $ROBELLE/man Remember to delete any PATH or MANPATH settings in /etc/d.profile, so that new users do not override your changes. You also have to warn existing Bourne and Korn shell users to change their .profile file in their home directories. For the C Shell we recommend that you add the following commands after any existing PATH or MANPATH statements in the /etc/csh.login file: setenv ROBELLE /opt/robelle set path=($path $ROBELLE/bin) setenv MANPATH "$MANPATH": $ROBELLE/man Remember to delete any PATH or MANPATH settings in both /etc/d.login and /etc/d.schrc, so that new users do not override your changes. You also have to warn existing C shell users to change their .login and .cshrc files in their home directories. Step 5: Setting Up Links When you run Qedit, it creates and uses certain temporary files. On HP-UX 10.x systems, temporary files are generally created in the /var/tmp directory. To get Qedit to keep an undo log and redo stack, you must set up a link between /usr/tmp and /var/tmp. To check whether this has already been done, enter ls -l /usr/tmp If a link exists, you will see a line such as this: lrwxrwxr-t 1 root sys 8 Aug 16 1996 /usr/tmp -> /var/tmp If the link is not set up, you can create it by entering ln -s /var/tmp /usr/tmp Step 6: Start the Qedit for Windows Server (optional) If you have the Qedit for Windows server software, you must start the Qedit/UX daemon process before any Qedit clients can connect to your HP-UX machine. To allow users to connect to the Qedit/UX daemon process, you must log on as root and issue this command: qedit -d The Qedit server process requires three log files. By default, these files are located in the following directory: /opt/robelle/log/qedit/ If you have moved Qedit to a different directory, you will have to perform the following steps: 1. Set the ROBELLE environment variable with the new directory name before you start the Qedit server process. 2. Make sure the new directory has exactly the same structure as the /opt/robelle directory. Step 7: Install WinHelp Documentation Files (optional) The Qedit documentation for both MPE and HP-UX is now available in the WinHelp format of Microsoft Windows. You can only use these files if you have Windows 3.1 or later. To install the WinHelp files on a PC, follow these instructions. Make a Temporary Directory for the Setup Program From either DOS or the File Manager, make a directory into which you can copy the installation files. mkdir \robtemp You can remove this directory after installing the files. Download the Compressed File If you use the CD that is included in the Qedit User Manual to copy the Help files to your hard drive, proceed to "Run the Setup Program" below. Otherwise, use Reflection to download the self-extracting Zip file to your PC and continue with these steps. The file on the HP 9000 is /opt/robelle/winhelp/qedhelp.exe From the /opt/robelle/winhelp directory, press Alt-Y to go to the Reflection Command Line window. Then use the following command to download the file as a binary transfer: receive c:\robtemp\qedhelp.exe from /opt/robelle/winhelp/qedhelp.exe binary Expand the Compressed Files You only need the following commands to extract the files because we provide both the Setup program and the Help files in one self-extracting Zip file. From the DOS prompt, type the following commands: cd \robtemp {go to the new Robtemp directory} qedhelp.exe {extract the Help files} Run the Setup Program To run the Setup program, select the Run command from the Start menu. When the Run window appears, enter c:\robtemp\setup and follow the instructions in the Setup program. When the Setup program ends, you can access all of the Qedit documentation by selecting any of the icons in the "Robelle Help" Program Manager Group. Remove the Robtemp Directory Before you remove the WinHelp files, you can copy them to a diskette and distribute them to other Qedit users. To delete all the WinHelp files and remove the Robtemp directory, use either the File Manager or the following DOS commands: cd \robtemp del *.* {delete all the files in Robtemp} cd .. rmdir robtemp {remove the Robtemp directory} Enhancements Since Version 5.0 The following sections describe the new enhancements to Qedit/UX since the last major release. * A rangelist can now contain up to 10 different strings to search for. Each string in the list can have different search settings such as column range and options. String are separated from each other by OR keywords. * The new Tag option on the Change command allows modification of only the Cobol tag in columns 73 to 80. Change commands without this option affect only the text area, columns 7 to 72. * If the ROBELLE variable is not set, Qedit determines its current location and adjusts the location of its support files (e.g., online help for host-based Qedit and log files for the server). This lessens the need to set the ROBELLE variable and makes the online help available in most situations. * If you wish to know where you are running Qedit from, do a Verify Program. Qedit displays the fully-qualified filename current executing. * The ROBELLE variable now allows a total length of 240 characters, increased from 36. * The Setincr option of the Text command requests that the current Set Increment value be used when reading the file in. The default is for Qedit to decide which increment to use. Setincr Option on Text Command [5.1] By default, on a Text command, Qedit looks at the file attributes and, if the file does not have line numbers already, tries to determine the best line number increment to accommodate all the lines. In most cases, this works perfectly fine. However, in a few cases, this value can not be determined with enough accuracy causing some commands to fail because Qedit ran out of line numbers. Up to version 5.1, there was no way to override the calculated increment. Starting with version 5.1, you can use the Setincr option on a Text command to force Qedit to use the current Set Increment value. This way, you can override the calculation based on your knowledge. /Text bigfile Uses automatic calculation /Set Increment .01 Set increment to a different value /Text bigfile,setincr Use the current Increment value Keeping Files in Browse Mode [5.0.11] The Browse option of the Open and Text commands allows you to open file as read-only mode. This way, file timestamps are preserved and it prevents accidental modification. If you try to Keep the file with its original name i.e. you enter a Keep without a filename, you will get an error. /Open workfile,browse /Verify Keep Set Keep Name txtfile /K File opened with Browse, please specify a Keep file name You can still force a Keep by specifying an explicit filename as in: /Text txtfile,browse /Keep txtfile TXTFILE.DATA.ACCT,OLD 80B FA of records=16 Purge existing file [no]? y Support Files Location [5.0.10] Qedit can determine the location of its program file. It can then adjust the location of its support files such as the online help. It assumes the program file is at the same level in the file system's directory tree as the help files. For example, the default installation puts the program file in the /opt/robelle/bin/ directory and the help files in the /opt/robelle/help/. If you install Qedit at a different location, it will make a similar assumption. For example, if you install it in /home/apps/robelle/bin/, the help files should be in /home/apps/robelle/help/. The same logic applies to server log files. In this situation, the logfiles would be in /home/apps/robelle/log/qedit/. If you want to override the default location, you can set the ROBELLE variable with the correct location. For example, you could accomplish the same thing with: $ export ROBELLE=/home/apps/robelle $ qedit The automatic detection simplifies the installation procedure because you do not have to remember to set the ROBELLE variable. To determine where Qedit looks for the support files, do a Verify Filename. Similarly, if you wish to know where Qedit resides, do Verify Program. The total length of the fully-qualified support filename (e.g., /opt/robelle/help/qedit) has been increased to 240 characters from 36 characters. So, in order to determine the location of support files, Qedit goes through the following: 1. Uses the ROBELLE variable, if it exists. 2. If the ROBELLE variable does not exist, Qedit tries to identify the location it is running from and, if successful, determines the location based on that information. 3. If the information from the previous steps is not available, Qedit assumes the files are in the /opt/robelle directory. Location of support files can be checked using the Verify Filename command. The current program file location can be checked using the Verify Program command. ChangeT Edits Cobol Tags [5.0.10] Cobol tags are short strings stored in columns 73 to 80 of CobX source files. The Cobol tag value is defined using the Set X command. Once enabled, updated lines and added lines are automatically updated with the tag. They can also be modified manually with custom tag values. In the past the Change command also affected the CobX tag in the file. This was not desirable, as typically only the actual text should have changed. Some Change commands even caused the tag to shift into the text area, causing compiler errors. To work around these problems, the Change command now uses the T suffix. You can think of it as the Tag option. A regular Change command makes changes in the text area only, that is columns 7 to 72. The Tag option only operates on the tag area itself, columns 73 to 80. /change "CUST" "SUPP" all {change cust to supp in all lines. } { cust must be between columns 7 and 72. } /changeT "CUST" "SUPP" all {change cust to supp in all lines. } { cust must be between columns 73 and 80. } To do this, the Tag option temporarily changes the margins to (73/80). Qedit displays a warning every time this option is used. Because the margin values have changed, explicit column range in a Window can only be between 73 and 80. /changeT "CUST" (50/60) "SUPP" all Warning: ChangeT: editing the Cobol tag area only (73-80). Error: Window /changeT "CUST" (73/80) "SUPP" all Warning: ChangeT: editing the Cobol tag area only (73-80). 10 SUPP0102 1 line changed Multiple Search Strings [5.0.10] A rangelist can be specified on most commands to identify which lines to operate on. Until now, a rangelist could only contain one search string. In Qedit 5.0.10 and higher, a rangelist can now have up to 10 strings. Strings are separated from each other by an OR keyword. Each string can have its own search set such as column range and options. For example, /List "abc" or "xyz" { search for abc or xyz } /C 1/2 "ME" "abc" (u 30/35) or "xyz" (50/60 s) { search for caseless "abc" in columns 30/35 or } { smart "xyz" in columns 50/60 } Each string is compared in turn against the text. As soon as a match is found, the line is selected. Thus, the most commonly found strings should be placed at the beginning of the list to increase speed. The complete rangelist is saved and used when the "previous string" syntax (i.e., a null string) is entered. For example, /List "". Enhancements Since Version 4.8 The following sections describe the new enhancements to Qedit/UX since the last reprint of the user manual. * The server can execute host commands such as compiling on behalf of the client. * the redo stack can be saved and re-used in subsequent Qedit sessions. * The $columns option of the List command can display only specified columns (up to 4 ranges). * The $rightby option of the List command allows you to shift an output listing to the right by a specified number of columns. * New RR/Rn cut-and-paste codes in full-screen mode can be used to replicate a block of text up to 9 times. * In full-screen mode, HJ in the cut-and-paste columns marks a block to be appended to the Hold file. * In full-screen mode, JJ in the cut-and-paste columns marks a block of text to Justify. * Escaped characters can now be used in the replacement string of a Change command with regular expressions. Host Commands from the Client Until now, the Qedit for Windows client could be used only to edit files. If you had to pass your changes to host applications, such as compilers, you had to have a terminal session on the same host. The client can now send host commands to the server on which they are going to be executed. The server then returns the output, if any, back to the client for viewing. No more switching to a terminal emulator for these tasks. This feature adds considerable ease-of-use, productivity and integration to the client. To prevent some users from accessing host commands, insert Set Limits Sys Off in one of their Qeditmgr files. Persistent Redo Stack Commands entered at the Qedit prompt are saved in something called the redo stack. You can recall commands from this stack by using other commands such as Before, Do and Redo. By default, the redo stack is stored in a temporary file and discarded as soon as you exit Qedit. This temporary stack is not preserved across Qedit invocations. The new Set Redo command assigns a permanent file as the redo stack, allowing the stack to become available for future Qedit invocations. For example, to assign the Myredo file as a persistent redo stack, enter /Set Redo Myredo If the file does not exist, Qedit creates it. Otherwise, Qedit uses the existing file. All your subsequent commands are written to the persistent redo stack. The setting is valid for the duration of the Qedit session. As soon as you exit Qedit, the setting is discarded. Next time you run Qedit, you will get the temporary stack. If you prefer to use a persistent stack every time you run Qedit, insert the Set Redo command in any of the Qeditmgr files. If the file name is not qualified, the redo stack is created in the logon group and account. This may be desirable if you want to have separate stacks. If you want to always use the same persistent stacks, you should qualify the name. The Verify command shows which stack is currently in use. If it shows , then Qedit is using the default stack. Anything else is the name of the file used on the Set Redo command. When Qedit uses the default, the temporary stack is only accessible to that particular instance of Qedit. You can run as many Qedit instances as you need, and each one gets its own redo stack. You will never have concurrency problems. If you start using a persistent redo stack, however, you might start running into concurrency problems. A persistent redo stack can be used only by one Qedit instance at a time. If you try to use a persistent redo stack that is already in use, you will get the following message: /Set Redo Myredo EXCLUSIVE VIOLATION: FILE BEING ACCESSED (FSERR 90) Unable to open file for REDO stack In this situation, Qedit continues to use the redo stack active at the time and lets you continue working as normal. Listing Column Ranges The List command now has an option to display only certain columns. With the $columns option, you can specify up to four column ranges. The ranges have to be enclosed in parentheses and can be separated by commas or spaces. A range must have a start column and, optionally, an end column. If only a start column is specified, the end column is assumed to be the same. In this case, Qedit lists only one column. For example, /List $columns (5) {lists only the contents of column 5} /List $columns (5/10) {lists the contents of columns 5 to 10} /List $columns (5 20/30) {lists column 5, and columns 20 to 30} Column numbers must be valid for the Language of the file. For most files, the first column is 1. For COBOL-type files, the first column is 7. Column numbers must also be within the current left and right margins. The column numbers do not have to be entered in a particular order. For example, the column numbers in the first range can be greater than the column numbers in the second range. The text appears in range order (i.e., range1, range2, range3 and range4). The same column can be included in multiple column ranges. The total number of columns listed cannot exceed the absolute line length maximum (8,172 characters). Although a template Listing is allowed with $columns, the output might not be very helpful. For example, /LT $column (15/20) +....2 1 O 2 pp 3 QQQ 4 rrrr List $include is supported with $columns, but Include files are treated as if they are of the same type as the main file. For example, if you include a COBOL file within a Data file, the COBOL file will start at column 1. You can also specify a rangelist (e.g., a search string with $columns). Qedit first searches for the string, which can appear anywhere on the line, then applies the $columns specification. Shifting Output Lines The $rightby option of the List command works like the $shift option. It allows you to shift the printed output to the right. The $shift option shifts the output by four spaces. The $rightby option allows you to specify the number of spaces by which the output is shifted. This number can be between 1 and 30. /List $shift LP {shifts output by four spaces} /List $rightby 4 LP {also shifts output by four spaces} /List $rightby 20 LP {shifts output by 20 spaces} Replicating a Block of Text In full-screen mode, it is now possible to replicate a block of text up to 9 times in a single operation. This feature uses similar syntax to marking a block of text for deleting (DD) or copying (CC) and combines it with the cut-and-paste codes for replicating single lines (e.g., R5). To use this new feature, mark the beginning of the block with RR and the last line of the block with Rn, where n represents the number of times you want the block replicated. For example, to replicate the same block five times, you would enter R5. The new blocks are inserted immediately after the last line of the copied block, where Rn has been entered. Because Rn has room for only one digit, the maximum number of replications is nine (9). Justifying a Block of Text Justification in text alignment is now available in full-screen mode. To justify a block of text, simply mark the first and last lines in the block with the JJ indicator. If Qedit uses any justify default settings, they are defined by the Set Justify command. If there are no default settings, Qedit assumes the text should be justified within the current display width. The justified lines are written to the Hold0 file. A single J indicator is not valid. Appending to the Hold File The HoldJ Line-mode command allows you to append one or more lines to the Hold file. A similar feature is available in full-screen mode. Mark the first line of the block with HH or HJ. The last line of the block must be marked with HJ. HJ by itself is not allowed, which means you can append only two or more lines. Escaped Characters in Replacement String Escaped characters in regular expressions are used to specify nonprinting characters. For example, \n represents a line feed character. Until now, these characters were only recognized in regular expression search operations. Now they can also be used in the replacement string of a Change command, making it easier to insert these special characters. All escaped characters allowed in regular expression searches are valid in the replacement, except for octal values (these are coded using octal digits). For example, \007 can be used to represent the Bell character. However, backreferences in the replacement string are represented by \n, where n is a digit from 0 to 9. Because of that, \007 might be interpreted as backreference \0 followed by the literal 07 (Bell character). To work around this limitation, a backslash followed by a digit is always assumed to be a backreference. To specify special characters using numeric values, you should use hexadecimal notation (e.g., \x007). Qedit for Windows Qedit for Windows lets you edit local MPE/iX and HP-UX files from a single MS Windows program. It consists of a Windows editing client and either an MPE/iX or HP-UX editing server that work together to edit your host files. To take advantage of Qedit for Windows, you need both the Qedit client and the Qedit server. Qedit for Windows uses the popular TCP/IP protocol for communicating between the client and the server (this is the same protocol that you use to access the Web). Configuring the Qedit server software requires creating the correct TCP/IP environment for Qedit for Windows. Server Process Qedit clients can connect to Qedit/UX only if the Qedit/UX daemon process is running (the Qedit/UX daemon process cannot be started from inetd). This process listens for connections on a registered port number (described below). To allow users to connect to the Qedit/UX daemon process, you must log on as root and issue this command: qedit -d The Qedit/UX daemon process should always be running, so it is a good idea to automatically start the daemon as part of the system startup process. On HP-UX 9.0, this is done by adding the following command to the file /etc/rc: /opt/robelle/bin/qedit -d HP-UX 10.20 On HP-UX 10.20, you do not modify the startup shell script. Instead, you need to create a number of files. HP-UX 10.20 documentation states that the following characters cannot be used as part of the file names: [.,~#]. Otherwise, you can choose any name for these files, as long as the names are consistent throughout the process. In our example, we use qedit_server. You first need to create a control file in /etc/rc.config.d. This file sets a control variable that will be checked by the startup script. If the control variable is set to 1, the server will start; if it is not equal to 1, the server will not start. We will use QEDIT_SERVER as our variable name. The /etc/rc.config.d/ qedit_server control file will now contain the following: # ****** File: /etc/rc.config.d/qedit_server ****** # Qedit for Windows server configuration. # # QEDIT_SERVER: Set to 1 to start # Qedit for Windows server QEDIT_SERVER=1 Next, you need a shell script that will actually start the server. You can copy a template of the shell script from /sbin/init.d/template. cd /sbin/init.d cp template qedit_server Modify the file so that it contains the necessary commands to start the server. You have to change all occurrences of CONTROL_VARIABLE to the variable name you used in the control file (i.e., QEDIT_SERVER). You also need the execute command for the server program. Insert this command (underlined below) in the section after the 'start') string. The section looks like this: 'start') # source the system configuration variables if [ -f /etc/rc.config ] ; then . /etc/rc.config else echo "ERROR: /etc/rc.config defaults file MISSING" fi # Check to see if this script is allowed to run... if [ "$QEDIT_SERVER" != 1 ]; then rval=2 else # Execute the commands to start your subsystem /opt/robelle/bin/qedit -d fi ;; Finally, you need a symbolic link to specify when the script in /sbin/init.d will be executed at boot time. Typically, you would start the server as the last step at run level 3. Get a list of all the startup files in /sbin/rc3.d with ls /sbin/rc3.d/S* Link names in this directory follow a set of conventions. The names start with the letter S or K. S links are startup scripts; K links are shutdown or "kill" scripts. The next three characters in the name represent an execution sequence number. This number must be 3 digits, and its value should be a number greater than the highest value on the ls listing. For example, if the last link is called S100nfs.server, you could use S111qedit_server. Create the symbolic link with ln -s /sbin/init.d/qedit_server /sbin/rc3.d/S111qedit_server For the time being, you do not need a "kill" link. Port Number By default, Qedit/UX listens on port number 7395. This port number has been registered with the Internet Naming Authority, so you should not have any conflicts with other HP-UX tools for the same port number. If there is a conflict, you can start the Qedit server process with a different port number. For example, qedit -d5678 tells Qedit to listen to port number 5678 instead of the default number (7395). If you change the port number on the Qedit/UX server, you must also change the port number on every Qedit client to the same value (5678 in this example). Client port numbers can be changed in the Server Settings dialog box of the Options menu. If you want listings from netstat and other networking tools to identify the port number as "qwin" instead of just "7395," you have to change the /etc/services file so that it includes the Qedit port number. qwin 7395/tcp #Robelle Qedit for Windows Log Files The Qedit server can communicate only with Qedit clients. To help system managers track Qedit processes, Qedit for Windows writes to three log files: the access log, the error log, and the trace log. Console Messages If Qedit cannot access any of its log files, it writes the log message to the system console. You can also enable console logging with the Debug command in the Option menu of the Qedit client. If someone is having trouble establishing a connection and the Qedit log files on the host do not include a message for this connection, check the system console. If Qedit was unable to open the log files, it probably reported the message on the system console. Access Log Every time a Qedit client makes a connection to the server process, an entry is written to the access log file, which is where the IP address of the client is logged. Qedit attempts to find the symbolic name of the client IP address by reverse name DNS lookup. If this lookup is not enabled, Qedit writes the numeric form of the IP address to the log file. Error Log Any error conditions encountered by the Qedit server process are written to the error log file. If you suspect a problem between the client and the server, start your diagnosis by looking at the end of this log file. Trace Log By default, Qedit does not log messages to the trace log file. However, you can enable trace file logging by using the Debug command in the Options menu of the Qedit client. The trace log file can grow and become very large because Qedit messages are constantly being added to it. These messages assist in understanding the communication between the Qedit server process and the Qedit client. In many cases, the detailed information in these messages is the only way to diagnose a problem. Log File Names By default, the Qedit server assumes that the log files are located in this directory: /opt/robelle/log/qedit/ If you have installed Qedit in a different directory, Qedit should be able to detect its new location automatically and adjust the log files location accordingly. If you prefer, you can explicitly change the default directory of the log files by using the ROBELLE environment variable. The three log files are called: access.log error.log trace.log Like most UNIX log files, these files will continue to grow until you run out of disc space. We recommend archiving the log files in a separate directory and saving them each week. After archiving, you can remove everything from the log files with these commands: cp /dev/null access.log cp /dev/null error.log cp /dev/null trace.log Bugs Fixed Since Version 5.0 Invalid Line Numbers in Cobol Files Qedit expects valid line numbers in most Cobol source files. If it encounters invalid line numbers, it tries to recover as gracefully as possible. In some cases, however, the numbering recovery procedure was not working properly which caused some lines to be lost. [5.0.12] Empty Line After Glue Operation A Glue command left an empty line behind if you were working on a CobolX file with no Cobol tag defined but the List option enabled as done with: Set X "" List ON Tab OFF For example, suppose the file contains 4 Author. Francois Desrochers. 5 Remarks. 6 Environment division. If you did Glue 4, the result would have been 4 Author. Francois Desrochers. Remarks. 5 6 Environment division. The correct result is now 4 Author. Francois Desrochers. Remarks. 5 Environment division. [5.0.12] Display Width When going in full-screen mode, Qedit adjusts the display width to match the file attributes as closely as possible. It resets the display width to its original value upon exit from full-screen mode. The reset function was not working properly on some versions of Reflection for Macintosh and Windows. [5.0.12] Replicating Block of Text If you marked a block of text to replicate in 2 steps using the RR/Rn construct of full-screen mode, the lines were highlighted but they would not be replicated. This would happen if you entered RR on a line, hit ENTER, moved the cursor to some other line and entered Rn. [5.0.11] Incorrect Replace With Regular Expression In certain situations, a Replace operation using a regular expression caused incorrect text to be inserted. The problem could occur if you specified a backreference e.g. \1 in the replacement string while the regular expression to search for did not have any subpattern (enclosed in parentheses). In such case, the replacement string should be used as a literal. This problem has also been fixed in the Qedit for Windows server. [5.0.10] Resetting COBX Tag The following commands can be used again to reset COBX tag settings: Set X Set X "" Set X Null [5.0.10] Bugs Fixed Since Version 4.8 Losing Track of Line Positions The Qedit for Windows server no longer loses track of line positions in a file after using the List $include script under certain conditions (e.g., locating text when searching for a string). Infinite Loop On Replace If you use a regular expression to perform a replace operation, and the replacement string contains an escaped character (e.g., \t), Qedit no longer goes into an infinite loop. For example, the following command would not run into this problem: /Change "#" (r) "\t" @ File Corruption During Paste Operations Pasting text in Qedit for Windows no longer causes the host file to be updated incorrectly in some circumstances. For example, one line may be missing and one or more lines may appear in the wrong place during a paste operation. This did not happen immediately; it occurred only if you continued to make changes in the same general area. Even though the host file was incorrect, the incorrect data would not appear in the Qedit for Windows document window. The problems would, however, become evident if you tried to use the file on the host (e.g., compiling a COBOL source or next time the Qedit for Windows cache was refreshed). This problem has now been corrected. COBOL Tags The tag value can now be set to blanks. This is different than setting it to Null or empty string. Set X " " {tag set to blanks} Set X Null {tag set to Null} Set X "" {tag set to empty string, equivalent to Null} If set to Null, tags on modified lines are not changed. They retain whatever value they had. If set to blanks, tags on modified lines are cleared. Because Set X " " was equivalent to Null, this caused some edit commands, such as Change and Modify, to report a line overflow on existing tagged lines. Using the Glue command with a COBX file no longer causes the tag value to shift in the text area. This used to happen with the column list option in Line mode /Glue (4 10) 2.3 or field separators (~) in full-screen mode. Set X Date now returns the system date in DDMMMYY format, where MMM is the month in uppercase. The month is no longer returned in mixed case (e.g., Dec). Set X "" and Set X Null are now resetting the COBOL tag value. The Qedit for Windows server no longer updates the COBX tag value on one extra line when pasting a block of text in certain cases. Switching to a COBOL Language Changing the Language of a file from any non-COBOL type to a COBOL variant no longer causes the loss of data. If the file in question contains more than 1,000 lines, changing the Language to COBX, for example, and saving the file back now keeps not only the first 1,000 lines, but all lines greater than 1,000. Shifting Text Shifting text to the right from the Qedit for Windows client ultimately results in right-justified lines. The server problem with the shift operation causing data corruption has been fixed. Full-screen Mode Qedit now reports a workfile overflow immediately after adding lines in full-screen mode. The latest changes are no longer lost without the user knowing about it. The problem only happened if the added lines forced Qedit to renumber existing lines and the workfile got full during this operation. There is also the possibility that this problem caused workfile corruption later on in the editing session. Pasting a Partial Line If the Clipboard ends with only part of a line, pasting the Clipboard at the beginning of another line no longer causes the server to create a separate line for the partial text. Multiple Paste Operations. The server no longer removes the wrong line when pasting the Clipboard in an area where numerous line insertions and pastes have been done. Problems with Regular Expressions A number of problems have been fixed in regular expressions. Character Range. A range in a character class is generally specified by entering the smallest value (based on the ASCII character set) as the start character and the largest value as the end character (e.g., [a-z]). However, Qedit allowed a range to have the largest value first followed by the smallest value (e.g., [z-a]). In this situation, Qedit internally reversed the order. However, in doing so, the range was "truncated" at the beginning of the range. In the previous example, Qedit would select characters b through z. The letter a would not be included in the range. Qedit allowed extending a character range using the end character of a range as the start of the next one. For example, [a-m-z] was internally equivalent to [a-mm-z]. Although it might seem like a feature, we see this as of limited use and more likely to cause confusion when interpreting the regular expression. This expression now resolves to a character range [a-m], a hyphen or the letter z. Closing Bracket. The regular expression [a-] was interpreted as a range from the lowercase a through to the closing bracket (]). This is incorrect. It is now correctly interpreted as a lowercase a or a hyphen. To search for a closing bracket character in a character class, the character must be escaped with a backslash, as in [a-\]]. Qedit used to accept a character class without a closing bracket, as in [a-. The regular expression was not rejected. Qedit assumed the next character in memory, typically a Null character, as the end character. This returned unexpected results as a Null character is the smallest possible value. The expression would be interpreted as a range from Null character through to lowercase a. Qedit now assumes the closing bracket is always present. The previous expression is then equivalent to [a-] (i.e., a lowercase a or a hyphen). Octal Values. Valid octal values are 1 to 3 octal digits. When octal values are used, the Bell character could be coded \7, \07 or \007. The problem that caused the first character to be skipped and produced unpredictable results has been fixed. Escaped Characters. You should be able to use escaped characters, including octal values in a character class. Qedit had a couple of problems with this format. Qedit used the last character of the start escaped sequence as the start of a different range. For example, the [\t-z] should search for characters from a horizontal tab character through to a lowercase z. Qedit, however, ended searching for a horizontal tab character or any character from lowercase t through to lowercase z. Escaped sequences can also be used in a character class to define a range, as in [\007-\027]. Qedit did not expect the end character to be an escaped sequence. Combining this problem with the problem described in the previous paragraph, this expression would evaluate to the Bell character, a range of characters from the digit 7 (from \007) through to the backslash character or the 0, 2 or 7 digits. Wildcard in the Directory Window If the wildcard in the Directory window contains a dot-slash (./) or a dot-dot-slash (../) prefix, the server no longer removes the first two files from the list.