Editing Data Files
Any external file that Qedit cannot classify as a programming language such as COBOL is tagged either as a JOB file (80-byte records, unnumbered), or a Text file (any record up to 8,172 bytes, numbered or not, ASCII or Binary, CCTL or not, etc.). See the Set Keep and Set Length commands. When working with record lengths of greater than 80 columns, you may find it easier if you set margins with Set Left and Set Right.
Warning: If you Text and Keep a file with a record length greater than 8,172 bytes, Qedit truncates the file to 8,172 bytes per record.
Copying and Shifting Columns
To copy columns of data, use Hold plus Set Left and Set Right to save the column in the Hold file. Then change the margins and use Replace $hold to copy the lines from the Hold file into another column. See the Replace command for an example.
To shift columns right, use Change col ” ” to insert spaces in front of a column. To shift columns left, use Change col/col “” to remove columns. To erase a column, use Set Left x, Set Right y, and Change x/y “”.
Weird Line Numbers or Losing Eight Characters
Sometimes you try to List or Text a data file, and Qedit appears to lose the last eight characters of your record, or show you line numbers that seem crazy. The reason may be that the data file contains digits in the last eight columns of the record, so Qedit assumes that these digits are the record line numbers. The solution is to remember to List or Text these files using the UNN option. For example, the file is a list of the following ten-digit part numbers:
0004001007 0004001010 0004002059 /list thefile 4001.007 00 {The file is interpreted as a} 4001.01 00 {two-character file with} 4002.059 00 {eight-digit line numbers.} /list thefile,unn 1 0004001007 2 0004001010 3 0004002059
CCTL Files
When you are working with CCTL disc files, remember that List prints the first column, the one with the carriage control, as data, while ListQ sends it to MPE to control spacing of the listing.
If you change your terminal width and want that new width to be used in the List command (especially LISTQ of CCTL files), you must do a Set Vis Stop command to force Qedit to re-query the terminal for its width.
When you do a List-Quiet of a CCTL file, the goal of Qedit is to reproduce as closely as possible the result of originally directing the output to a printer instead of a disk file. The first character in each line directs whether that line is single-space printed, overprinted, or page-ejected.
The listing is written to a file, either QEDLIST or LP ($LP). The record width of that file is very important. For LP, the record width comes from the device specification of a :FILE command with a REC= parameter.
QEDLIST is a file that is opened in Qedit for the $STDLIST device. The default record width is 80 characters. However, if you are logged on interactively, Qedit knows that your “CRT” or Reflection may have more than 80 columns of display. Therefore, it checks your terminal at startup and uses the CRT width at that time as the record size for QEDLIST.
When you List a file with lines longer than the QEDLIST record size, Qedit normally folds those lines for you. However, on a ListQ of a CCTL file, Qedit does not do any folding. It leaves the treatment of the lines completely to the MPE file system. MPE itself breaks up the lines in its own way if necessary, which seldom looks the way you want for CCTL files. Therefore, if you have widened the CRT width, you must let Qedit know about that change. You can do this with Set Vis Stop, which forces Qedit to re-iniitalize all knowledge of the CRT on the next command. This also closes and re-opens a new QEDLIST file with the new terminal width.
You can confirm the current CRT width by doing Verify Visual – if the CRT is open, it will appear in a comment like this:
{Reflection=500W Col=80}
Or you can do a SHOWJCW RCRTWIDTH. Set Vis Stop will reset both values to 0 or null.
If you do List-Template, then you obviously do not want an exact reproduction of the original report, since it did not have a template. Therefore, Template disables the special Quiet treatment of CCTL files. Similarly, a non-quiet list also cannot look like the original report, so the special processing is not done in that case either.
File Size
When you Text a data file into a Qedit workfile, Qedit remembers whether the original file had space available beyond the end-of-file. If it did, when you Keep the data file again, Qedit adjusts the limit of the new file to ensure that the same free space still exists.
Texting a File with User Labels
When you edit a file with user labels (e.g., a PowerHouse subfile), use Text file,Labels to retain the contents of those labels in the workfile. When you do a Keep, Qedit writes the labels to the new file. There is no way to edit the labels, but you can remove them by doing Keep file,Nolabels. To retain the user labels by default, use Set Work Labels On. Many PowerHouse sites put this command in their Qeditmgr file, since they edit PowerHouse subfiles in Qedit.