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, Limit, Name, Num, Var, Cobfree and Bytestream.
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: OFF)
Qedit uses the file code (EDTCT or 1052) for an MPE file or the file extension (.cbl, .CBL, .cob or .pco) for a Posix file, to identify COBOL source files. The .pco
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 Limit [ Free | Save | Percent pp | Plus nn ]
(Initially: <Default>)
The Set Keep Limit option allows you to control how the file limit of a Keep file is derived from the current number of lines in the file or the original Text file.
Once a Set Keep Limit option is selected, it is applied to all subsequent Text operations, but not to currently open files or existing workfiles. The options are designed so that you can put them in a Qeditmgr configuration file and apply them to all Text and Keep operations, even in Qedit for Windows. However, you can also set the options before each Text and Keep sequence if you prefer to apply them only to individual files. You simply need to look at the current setting, change it to the desired value, use the Text command to access the file and make the changes to the file. Once you are done, use the Keep command to save the file and return Set Keep Limit to its original value.
If you enter Set Keep Limit with no parameters, you are selecting the default operation. This option truncates the Keep file to the current number of records, except that any expansion space beyond the EOF and File Limit of the original Text file is carried over to the new Keep file. However, Qedit does not allow the expansion space (EOF – FLIMIT) to exceed 2,000,000 records.
For example, if you use the Text command to access a file that currently contains 50 records (EOF) and has room for 100 (Limit), Qedit preserves the number of available records. If you then delete 10 lines, the new Keep file would have 40 records (EOF), but would allow up to 90 (Limit). Because the file is truncated to the current end-of-file, you cannot use a :File command to override the limit.
On the other hand, if a file contains 10 records (EOF) and has room for 3,000,000 (Limit), the limit would change to 2,000,010 after a Keep.
The Set Keep Limit Free option sets the limit to the current number of lines in the file. If you use the Keep command only on a subset, the limit is not truncated to the end-of-file. This option allows you to use a :File command to specify an explicit Limit for the Keep file.
file xyz;disc=10000 /keep xyz
The Set Keep Limit Save option retains the Limit of the original Text file as the minimu
m, even if you delete some lines while editing. If you add lines to the file, the original limit is increased to match the current number of lines.
The Set Keep Limit Percent option calculates the limit as a percentage of the current number of lines. The Percent value can range from 100 to 1,000. For example, if Percent is 200 and you have 50 lines in the file, a file saved by the Keep command will have a Limit of 100 lines.
The Set Keep Limit Plus option sets the Limit of the Keep file to the current number of lines plus the value specified as a parameter. The value can range from 1 to 30,000. For example, if the Plus value is 500 and you have 100 lines in the file, a new Keep file will have a limit of 600 lines.
Set Keep Name [ filename [,Temp] ]
(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. If the last Text or Keep was a temporary file, the default will also be temporary. The default is invoked when you do a Keep without any parameters. You can set the default name with this command. To force the file to be created as a temporary file, append the Temp keyword to the file name.
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: OFF)
MPE files may have fixed-length records or variable-length ones. Qedit will duplicate whatever the Text file had, but the default is to create fixed-length records. Files with variable-length records are handy as job stream files because they allow you to duplicate terminal input more precisely (e.g., you can have lines with length of zero, the same as pressing only a Return on the terminal). When Keeping Var files with line numbers, the 8 digits of the line number will immediately follow the last character in the line.
/t qnews=news;set keep code 112 var on; verify keep Set Keep Ascii ON Cctl OFF COde 112 Num OFF Var ON NAme NEWS /keep vnews;:listf @news,2 ACCOUNT= GREEN GROUP= BOB FILENAME CODE -------LOGICAL RECORD------- ----SPACE---- SIZE TYP EOF LIMIT R/B SECTORS #X MX NEWS 80B FA 411 411 16 135 2 2 QNEWS * 111 256W FB 26 642 1 84 2 31 VNEWS 112 1276B VA 411 7 1 40 8 8
Note that while Qedit makes every attempt to preserve file attributes when you Text and Keep a file, Qedit is unable to retain the record size of a variable-length file. A Listf before and after may show a different record size. The data in the file, however, is the same. Application programs reading the files will read the same data.
/listf myfile@,1 ACCOUNT= GREEN GROUP= MIKE FILENAME CODE ------------LOGICAL RECORD------- SIZE TYP EOF LIMIT MYFILE 1276B VA 142 5 /text myfile /keep myfile2 /listf myfile@,1 ACCOUNT= GREEN GROUP= MIKE FILENAME CODE ------------LOGICAL RECORD------- SIZE TYP EOF LIMIT MYFILE 1276B VA 142 5 MYFILE2 1020B VA 142 6
Notes About Set Keep. Normally, Keep truncates the Limit of your new file to the EOF, so no disc space is wasted. However, if you Text a file whose LIMIT is greater than its EOF, Keep will retain the same difference on the new file. In that case, Keep “trims” your file of any unused disc space in the last extent (up to 2000 sectors). You can still add to the file, however, since the EOF is still less than the Limit.
The record size of the Keep file comes from Set Language (SPL, FORTRAN, and Pascal equal 72 bytes, JOB and RPG equal 80 bytes, COBOL equals 66 bytes, COBOLX equals 74 bytes. For Text and Data the precise length is specified with Set Length. For Text the maximum is 256, and for Data it is 8,172. COBFREE file attributes are similar to Text files (i.e., they have the same maximum length). If Set Left/Right have been done, the record size is Right-Left+1. If Set Keep Num is ON, Qedit adds 8 bytes to the record size (6 for COBOL).
There are a number of attributes of a file that are not retained when you do a Text and Keep: message file, circular file, KSAM file, user labels (unless Set Work Labels On), security, block size (Qedit selects an appropriate one), number of extents (see Set Extentsize), and logical device.