UPD Update a File/Library Element/JV from EDT

Notes:

When reading a file or PLAM library element into EDT, CFS will store the date and time of the last modification. Before the UPD Action Code is performed, a check will be performed to see whether the file has been amended since it was read in. If it has been amended, the update operation will not be performed otherwise the previous amendment will be lost. The user will be notified with an appropriate error message.

When processing files with an EDT Action Code, the user should only use the UPD Action Code to rewrite the file. If the EDT Write command is used, CFS interprets this as an amendment by another user. If the Write command has already been used, the WPD Action Code should then be used instead of UPD.

If an amendment has been made by another user, the differences can be checked as follows:

- The current contents of the file (i.e. the modifications performed by the other user) can be read into a different EDT level by means of the EDTN Action Code (e.g. EDT1N).

- EDT Compare can be used compare the two versions of the file (e.g. COMP0;9 , if the user's own amendments are in EDT level 0).

- After consolidating the user's own amendments into the version of the file in EDT level 1 (in our example), the unified file can then be rewritten in a consistent state by means of the UPD1 Action Code.

The data consistency checks which are carried out prior to the UPD Action Code being performed can be switched off by resetting an option in the CFSMAIN initialisation module.

In the event of an unexpected loss of connection (generally: the occurrence of an ABEND as a STXIT result), all non-empty EDT work files are saved automatically to backup files. The backup files will be named as follows: CFS.EDTSAV [.job name].yymmdd.hhmm.x. The x represents the EDT work file number. If a name is specified in the LOGON, this will appear in the name of the EDTSAVE files.

The next time CFS is called under that same userid, and with the same job name, the user will be notified of the existence of these EDTSAVE files.

Once set, EDT parameters such as EDIT LONG, SCALE will remain valid for the entire CFS session. The same is true for the contents of each of the EDT work files, so long as no new data is read into this work file.

When reading in another file, the line and column position of the EDT window is set to the beginning of the file.

LOWER mode in EDT: If the CFS CAP mode is set (standard), a previous LOWER ON command will be reset (LOWER OFF) when a new file or library element is read in. If the CFS LOW mode is set, then the LOWER mode of EDT will not be changed. A LOWER ON command thus entered processing a previous file will remain valid for the current file. For further information, see page 18-.

If files/library elements/Job variables are read into various work files with EDT[n], then the user will be placed in the work file specified by the last file flagged with the Action Code.

If multiple data objects are marked with the EDT Action Code, the first object will be read into EDT level 0, the second into level 1 and so on.

If files/library elements are processed with the EDT Action Code, then CFS will issue an @FILE command with the names of the respective files/library elements. Users can thus save the file/library element themselves with the W[RITE] or SA[VE] statement, as well as UPD Action Code offered by CFS.

Non-standard Files (e.g. RECFORM=F files or ISAM files with KEYPOS /KEYLEN other than 5/8) can also be processed with EDT. A manual assignment via the EDTSAM/EDTISAM link names is not necessary, since this will be provided by CFS. The record length of these files is restricted to 256.

Multiple non-standard files can be read into different EDT work files with the EDT[n] Action Code. These files can also be rewritten with the UPD[n] Action Code.

ISAM files with a keylen > 8 and any keypos can be edited and rewritten with the EDT/UPD Action Codes. The ISAM key will then not be used as the EDT line number, but will be displayed as data in each record (LINK=EDTSAM).

The ISAM key of non-standard files can thus also be edited. However, in this case the user is responsible for maintaining the ascending sequence of the key.

PLAM library elements stored in Delta format may also be processed with the EDT/UPD Action Codes, if LMS Version 1.4 or above is available. A new element with a version number incremented by one is created when a UPD is performed.

Pressing the K1 key in Format mode will return control to CFS. K1 will terminate EDT without regard to any unprocessed changes on the current screen.

Pressing the K1 key inadvertently returns the user to the CFS mask with the Action Code UPDn already filled in. It is still possible to return to EDT at the point at which it was interrupted by pressing the F1 key. This will work so long as a new file list has not been selected (NP command).

After a second exit from EDT - that is, if the user returned to EDT with F1 - the UPD Action Code will not be supplied by CFS. This must be supplied by the user if required.

If the TOM-TI editor is available in addition to EDT, the CFS system administrator can generate CFS such that the TOM-TI Editor is called instead of EDT with the EDT/EDF Action Code. In this case, the user has a number of additional commands available, such as SORT, COL, REF, DOC, FETCH.

The UPD Action Code does not have to be carried out immediately after exiting EDT. Any number of functions can be performed (including changing the list with an NP command) before UPD is executed, so long as the relevant EDT work file has not been overwritten. It can also be performed on another file in the list, or to the same file, but from a different EDT work file. The EDT work file can thus be used as a temporary storage area during a CFS session.

In Format mode of EDT, the user returns to CFS either by pressing the K1 key, or by entering the HALT command. It is also possible to add a parameter to the HALT command as follows: H [ALT] cmd. This cmd option will be interpreted as a CFS command.

Example: H CC1 Jump directly from EDT to Connection 1.

A quicker switch between EDT and Connections is possible as follows: entering the EDT command 'H n', the user will jump directly to the Connection number n. A direct return to the last EDT work file left with the H n command is achieved by pressing ^F1. Entered in a connection, ^F1 has the same effect as if F1 was pressed in the basic CFS task (Description of the F1 key - see above).

When leaving EDT with the H [ALT] cmd command, the file is not automatically updated. The user must enter UPDn if required.

THe EDT/EDF Action Codes and the EDT/EDF/EDL commands call two completely separate copies of EDT. The memory of the version of EDT called from the command line can be used as described above as another temporary storage area. The Action Codes EDT and EDF, however, use the same area of EDT.

In CFS, the INTR STXIT routine of EDT is not activated, i.e. the INTR command functions identically to the /R[esume] command.

This differs from calling EDT using using a BS2000 command in the command line: /EXEC $EDT.

If the EDT processing is interrupted by the Job Report mask, then, after ending the Job Report (K1 key, END, N), the original contents of the EDT screen may be displayed by pressing the K3 key (EDT refresh).

If the EDT/EDF Action Code is entered for a data object, then internally, the respective EDT level is first erased (@DELETE). The file is then read in, or the library element is transfered record for record into EDT memory. If, after exiting EDT, the EDT/EDF Action Code is entered next to the same data object again, then the existing EDT contents will be used (i.e. no @DELETE followed by renewed loading).

If CFS detects an empty file when performing the EDT/EDF Action Codes, or if the EDTN/EDFN (N=New) Action Codes are entered, then the object will be read in again regardless.

If the QR mode is set in CFS (standard), the virtual EDT memory is erased after an update. CFS therefore has no knowledge of whether the update was successful or not, and the virtual EDT memory is also erased if the update was not successful.

The NQR command can be used to prevent the automatic erasure of the EDT virtual memory following UPD.

Any library element type can be processed with the EDT/UPD Action codes, also R (object module) and C type (bound program) elements. C and R type elements are displayed by CFS in a special format.

Program library elements processed by EDT normally have a record type 01. If an object contains records of another type, such as those contained within R type elements (object modules), then these records will be displayed in EDT with the prefix "$RT=xxx:", where xxx is the record type. Record types range: 1 <= xxx <= 255.

Program library elements containing Format A records longer than 255 bytes, and/or Format B records can be processed by the EDT/EDF Action Codes. These records longer than 256 bytes are first split into partial records before being passed over to EDT. Trailer records will be prefixed with "$RT=CNT:". Format B records are also split into partial records before being passed over to EDT. The first EDT record for a B format record will be prefixed with "$KEY=xxxxxxxx:", where xxxxx is the record Id. The second and following EDT records making up the B Format record will be prefixed with "$KEY=Cxxxxxxx:", where xxxxx is the column number relative to the beginning of the record. When amending the data it must be remembered that the total length of the data content of a B format record must be a multiple of 2048 bytes.