Keep

Qedit 5.7 for HP-UX

Home Previous Next


Keep

Set Keep [ option value ]...

(Default: same as Text file)

Determines the format of the next Keep file. Attributes are taken from the previous Text or Keep, or they are based on the current Set Lang value. Qedit attempts to duplicate the Text file as much as possible when doing the Keep. Use Verify Keep to display the current Set Keep values, including the default file name.

The options you can set for the Keep file are ASCII, CCTL Checktimestamp, Code, Lab, Name, Num, Var, Cobfree and Bytestream. All options are accepted by Qedit/UX for compatibility with the MPE version of Qedit. However, you should only use the CHECKTIMESTAMP, NAME, NUM and VAR options.

Set Keep ASCII ON|OFF

(Initially: ON)

Files can be either ASCII or Binary. Qedit takes this value from the file that you Text, but will revert to ASCII ON for any new workfile. Even though Qedit will create binary files with Keep, it is not recommended for use in editing binary files. The reason is that Qedit treats Carriage Return as end-of-line, which may truncate some records. ASCII files have their records padded with blanks; Binary files are padded with zeros (nulls).

Set Keep Bytestream ON|OFF

(Initially: OFF)

POSIX introduces a new type of file called Bytestream. These files do not necessarily have record structures that are similar to typical files on MPE. Bytestream files come from the UNIX environment. To application programs, they simply appear as a stream of bytes (hence the name). To MPE, these are variable-length files in which each record contains only one byte.

When a Text command is used on an existing bytestream file, Qedit is able to recognize the file and preserve its attributes on a Keep command. To create a new bytestream file, you have to use Set Keep Bytestream On.

Because bytestream is sort of an extension to variable-length files, these two options are closely linked. If you use Set Keep Bytestream On, the Variable option is also enabled. If you use Set Keep Bytestream Off, the Variable option is also disabled. If you use Set Keep Variable Off, the Bytestream option is also disabled. You can still enable Variable by itself, without enabling Bytestream.

Set Keep CCTL ON|OFF

(Initially: OFF)

Ordinary ASCII files have the CCTL value OFF. When CCTL is ON, the first column of each record must contain a carriage control value. Some of the common values are "1" for new page, "+" for overprint, and " " for normal single-space. When Qedit prints a file with CCTL in quiet-mode (i.e., no line numbers and no template), it interprets the carriage control values.

Set Keep Checktimestamp ON|OFF

(Initially: ON)

Qedit stores the file modification timestamp in the workfile. It uses the timestamp to determine whether the file has been modified since either the initial Text command or the last Keep command was used. By default, timestamp checking on Keep is enabled.

If you want to disable this feature, type

Set Keep Checktimestamp Off

If you wish to see the current saved timestamp, you have to use Verify Info.

Saved modification timestamp 2005/10/14  18:29:02
Trailing spaces in workfile are trimmed

Set Keep Cobfree ON|OFF

(Initially: On)

Qedit uses the file extension (.cbl, .CBL, .cob or .pco) to identify COBOL source files. The .pco extension is typically used to identify Cobol source files that needs to be processed by the Oracle pre-compiler.

If Qedit detects this attribute, it assumes the lines have a specific format. In particular, it looks for the presence (or absence) of sequence numbers in the first six (6) columns of each line.

If these columns do not contain numeric digits or spaces, Qedit assumes the file is a free-format source file without a sequence number. The file is then assigned the COBFREE language.

The Set Keep Cobfree option controls the format of the file when you Keep it back. If this option is enabled (On), it means you allow Qedit to save files in the COBFREE format (i.e., without sequence numbers). If this option is disabled (Off), it means you don't want to create COBFREE files. When this option is disabled, Qedit converts the file to COBOL, assigns it sequence numbers and writes them to the saved file. A warning is displayed before this occurs.

/Keep
Warning: Lines are now numbered.
         Language changed from Cobfree to Cobol.
COBFON.COBSRC.APP,OLD EDTCT # of records=26
Purge existing file [no]?

Set Keep Code nnn

(Initially: <null>, 0)

Any file can have a special file code to help identify what kind of data it contains. Qedit workfiles, for example, always have a Code of 111, while COBOL source files have a Code of 1052 (EDTCT).

You can create files with any code you like using Set Keep Code and the Keep command. However, the file code cannot be changed if the Language is COBOL or COBOLX.

Set Keep Label num

(Initially: 0)

This value is set to the number of user labels attached to the file, when you Text it. Text filename,Labels will copy the user labels into the new file. Keep will append those labels to the file, unless you do Keep filename,Nolabels. If you want to change the number of user labels to be created on the new Keep file, do Set Keep Label n.

Set Keep LF ON|OFF

(Initially: ON)

To write Newline delimiters, use Set Keep LF ON. A delimiter is added at the end of each line whether there was one or not in the original file.

To create a file without Newline delimiters at the end of each line, use Set Keep LF OFF. The only Newline characters written to the file are the ones included in the data.

Set Keep Name [ filename ]

(Initially: <null>)

The default name for Keep is the same name as the last Text or full Keep command, if any. A "full" Keep is one without a limiting range or margins. The default is invoked when you do a Keep without any parameters. You can set the default name with this command.

If you do not specify a file name, the default Keep name is erased as if this was a brand new file. If you erase the default Keep name or replace it with a new name, the saved modification timestamp is erased.

Set Keep Num ON|OFF

(Initially: ON)

Keep files may or may not have sequence numbers. In standard COBOL files, the sequence numbers are in columns 1 through 6. In all other files they are in the last eight columns. When Qedit copies in an external file it remembers whether that file was numbered or not (if not, new sequence numbers are assigned to each line in the workfile).

When you set the language to Job or Text, Qedit turns the Num flag Off. This means that default Keeps of these files will be without sequence numbers. You can always override the Qedit default by doing an explicit Set Keep Num prior to the Keep.

Set Keep Var ON|OFF

(Initially: ON)

All HP-UX files are inherently variable-length. However, if you turn Set Keep Var Off, Qedit/UX will keep your file with trailing spaces appended to each record to fill them out to the current Set Length value. There will still be a newline character at the end of each record. This appears to be what COBOL expects for a data file.


Home Previous Next