![]() |


With a mouseclick you get a describtion of the screen item.
All data objects supported by CFS (files, Job variables, library elements) can be displayed and modified. The Display mode by entering the Action Code D (Display) or M (Modify) in the field of the required data object. In Display Mode, all valid commands can be entered in the command field. In addition, there are a number of additional Display commands available. These are described in more detail in the following section.
Unprintable characters are represented in the CFS Display mode by the "smudge character" X'07'.
The decision on which characters are printable is taken by referencing an internal conversion table. This conversion table can also be loaded from an external file.
A file containing an external conversion table is linked with a file command as follows: /FILE file,LINK=CFSDISPT. If a file is not assocaited with the CFSDISPT link name, then a search will be made in the CFS installation userid for a file named CFS.DISPTRTAB. If this file also does not exist, CFS will use the default internal conversion table.
The CFS.DISPTRTAB file determines which characters will be displayed on screen as text, and which will be displayed as smudge characters. If umlauts should not be displayed as such, on account of the computer centre CCS (Coded Character Set), the system administrator still has the opportunity to override this by modifying the respective values in the conversion table. Two sample conversion tables, including explanatory comments, are available, They are X/CFS.DISPTRTAB (which is the default CFS conversion table) and X/CFS.DISPTRTAB.EDF041 (for CCS=EDF041), both of which are in the CFS.S.LMSLIB PLAM delivery library.
A copy of the default CFS conversion table will always be used in Modify mode of the CFS Editor. Therefore, characters that appear in non-Modify mode as special characters (such as umlauts) can suddenly be replaced in Modify mode as smudge characters.
The default conversion table can also cause lowercase characters to be displayed on screen as such, even though LOW mode is not enabled (see the commands CAP/LOW).
Commands for Modifying Data Objects
Additional Editing Functions for Sequential Files/Library Elements
The SAM file/library element displayed on screen is provided with an ISAM key. This is achieved by converting the file to a temporary ISAM file.
ISAM format allows, in addition to 1 to 1 changes, extended editing functions such as copying, inserting and deleting of records, and inserting and deleting column blocks.
Specifying an optional PVS (:x:), or a private disk (vsn/device) will cause the temporary file to be created on the specified PVS or private disk. The :x: or vsn/device parameter is saved, and will be used for all additional conversions, so long as no other values are specified.
step Increment for generating the ISAM key. The standard value for the 8 byte key in the temporary file is an increment of 100. To convert sequential files containing more than 1,000,000 records to a temporary ISAM file, an increment of 10 should be specified in the IS command.
The value for the increment is stored internally, and is used for all subsequent conversions, so long as no other value is specified.
SAM Convert the temporary ISAM file created with the IS command back to its original sequential format.
Terminating the Display Mode by pressing the K1/F1 keys has the same effect as the SAM command. The user is asked if the open ISAM file should be converted back to its original SAM format. If the user does not wish to overwrite the SAM file with the ISAM file, then the SAM file will remain unchanged and the temporary ISAM file will not be erased.
Lowercase in Modify Mode / Search Command
LOW | CAP Lowercase / Uppercase.
LOW CFS Editor: No conversion from lowercase to uppercase takes place during the Modify process.
Entering file documentation (Action Code IM): The text is stored in uppercase or lowercase, as entered.
Search command, User Option FIND, Variable Action ONXFIND: No conversion from lowercase to uppercase will take place in the search string. This function can also be achieved by entering the search string in the form L'....'.
Action Code EDT: When reading in another file or library element, the LOWER mode of EDT remains unaltered. A LOWER ON command entered for a previous file remains in operation.
CAP | NLOW CFS Editor: When modifying, lowercase characters are converted to uppercase before rewriting the file.
Entering file documentation (Action Code IM): The text is converted to uppercase.
Search command, User Option FIND, Variable Action ONXFIND: The search argument ([C]'item') is converted to uppercase.
Action Code EDT: When reading in another file or library element, the LOWER ON mode of EDT is reset (LOWER OFF).
Instead of CAP, the command LOWO (LOW Off) can also be given.
Standard: CAP.
Note: LOW or CAP may not be chained with additional commands. For example, the command sequence LOW;M is not permissible.
Release Data Objects for Modification
The contents of the data object (File/Job variable/Library element) flagged with the Action Code D (Display) is released for modification. If the data object is marked with an M as Action-Code, the M command is implicit. For files and Job variables, the modification takes place immediately after a data transfer key is pressed. With library elements, the modifications are only carried out after terminating the Modify mode.
Modify Mode is switched off with the NM (No Modify) command.
In general, sequential and PAM files can only be modified in 1 to 1 mode by the CFS Editor. Extended editing functions are available for ISAM files. These are described in the section entitled "Editing ISAM files of any format". Sequential files can also be edited using these extended editing functions in ISAM format. More about this on page 8-.
Notes:
The Delete key AFG may not be used when modifying files using the CFS Editor, since all the data displayed on screen will shift.
When modifying in hexadecimal mode, data may also be entered in character format.To do so, enter the required character in the first half byte. Insert a blank in the second half byte.
Example: To enter the character 'F' (X'F6'), the original value of CA in this position can be replaced by F_ .
Lowercase letters can also be entered using this technique. LOW Mode must be switched on.
It should be noted that, in contrast to EDT, existing lowercase characters in CAP mode are displayed as such; Entered lowercase characters are converted to uppercase.
In contrast to earlier versions of CFS, the following character conversion in CAP mode does not take place in CAP mode on German keyboards:
'{' ( 'ä' ) --> '[' ( 'Ä' )
'|' ( 'ö' ) --> ' ' ( 'Ö' )
'}' ( 'ü' ) --> ']' ( 'Ü' )
To shorten Job variables, LOW mode (see above) must first be switched on. The data to be erased from the Job variable (to the right of the relevant data) is then overwritten with the null character.
When modifying ISAM files, the positions from the end of the record to the end of the screen are padded with overwritable null characters. The records can thus be extended beyond their original length by overwriting these null characters.
Shortening a record by padding with the null character is not possible.
Commands for Displaying Data Objects
Scroll the Display Window horizontally/vertically
+ | - Scroll the window by one screen forwards or backwards.
An empty command field (transmitted with DUE1) can be used to page forward, as well as "+".
++ | -- Position the window at the beginning or end of the file.
Data security: Entering ++ when displaying PAM files will position the window only at the last writable data block. Under TSOS, the window can be positioned at the PAM page on the other side of the Last Page Pointer.
Notes:
When Positioning to the end of a very large SAM file, long wait times can result, since the file has to be read completely by CFS. This process can be interrupted by pressing the K2 key (branch to BS2000 command mode), and then entering /INTR R. The window will be positioned at the place last read.
Positioning to the end of a very large, blocked (with STD,1) SAM file can be accelerated by using the command PBnnnn/#Bnnnn (see below for description). nnnn is the number of the last data block to have been written (LASTP entry). The record numbering in this case will be lost.
+n | -n Scroll the window n records forwards or backwards.
R | L Right/Left. Scroll the window the breadth of a screen to the lrft/right (in NDL mode). In DL mode, the window is shifted according to the capacity by one whole screen left or right.
> | < identical to R/L.
RR | LL Scroll the window to the beginning/end of the record.
If the records are not of equal length, the first record displayed on the screen is the marker.
>> | << identical to RR/LL.
R n | L n Scroll the window by n columns to the right or left.
>n | <n identical to R n/L n.
R X'hex' | L X'hex' Scroll the window by X'hex' columns to the right or left.
>X'hex' | <X'hex' identical to R X'hex' / L X'hex'.
C n Position the window on column n. Beginning of record = C1.
CX'hex' Position the window on column X'hex'. Beginning of record = CX'0'.
Note:
As an alternative to positioning the window, the AD (Arrange Data) command can be used. This command enables selective data from a file to be displayed. The sequence and breadth of columns are optional. A display format (character/hexadecimal) can be chosen for each selected column range.
Select/Reorganise the Displayed Column Ranges
AD { [col | const | seq] ["text"] } {, ... } ... [, FC= X'cc' | C'c']
Arrange Data. The Display mode of the file is changed such that only certain column ranges of the records are selected, and are displayed in a particular sequence. Character strings can be inserted between the column ranges. The display of each individual column can be in either character or hexadecimal format. Descriptive text can be assigned to each selected column range in the Scale line. Only the display of the file records is influenced by the AD command. The file itself remains unchanged.
col Value for the selected column range. Two different selection methods are possible.
:col1: len [B[S]|C|H|P[n]|Z]
First column in the required range. The column numbering begins with column 1.
len
Length of the column range.
:col1-col2: [B[S]|C|H|P[n]|Z|STCK]
Definition of the column range by specifying the first and last column. For last column (col2), the character $ (=end of record) can also be specified.
Example: :1-20: Columns 1 to 20 are selected. An equivalent selection would be to specify the first column as :1:, and a length of 20 (:1:20).
B[S] The specified column range contains a binary number, with (BS), or without (B) the sign. The length of the column range may only be 1, 2, 3 or 4.
C Display the column in character format (Standard).
H This option specifies whether or not the column is to be displayed in hexadecimal format. H sets one of the column-specific hexadecimal modes (see Display command H/NH). X can be specified instead of H.
P[n] The specified column range contains a packed binary number, with or without sign.
n Number of places before the comma. Standard: n = 0
Example: :35-38:P2 provides the following format: 99999,50
Z The specified column range contains a signed decimal number. This definition corresponds to the COBOL "PIC S9" format, and is stored in the following hex form: FaFb ... FnZm. Here, a, b, ... ,n, m represent digits 0, ..., 9. Z represents the sign: the hex values A, C, E, F correspond to positive values, and B, D to negative values.
Example: F1C2 equals +12, F1D2 equals -12
STCK The date and time will be stored in the specified column range as a binary value in STCK (Store Clock) format. The STCK field can be four or eight bytes long. The contents of the field will be displayed as YYYY-MM-DD HH:MM:SS: MMMMMM . MMMMMM corresponds to the millisecond and microsecond values of the time value.
Standard: The column is displayed in its original format (character).
const Constant which will be inserted in each record displayed before the next column, or after the last selected column.
[len] C'string' | X'string'
len
Total constant length. The constant specified in the form C'...'/X'...' will be repeated until the specified length is reached.
Standard: len = Length of the specified string.
C'string' | X'string'
Value of the constant to be inserted. C'string' can be abbreviated to 'string'.
seq Sequential numbering. For SAM and PAM files, a sequential numbering field will be inserted into the display.
Correct numbering for ISAM files can only be guaranteed if a write or search/rewrite command is performed on the file at the outset.
SEQ(len [, step])
len
Length of the numbering field. 1 <= len <= 10.
step
Numbering increment. 1 <= step <= 30000.
Standard: 1
"text" The text entered here defines a column heading which will appear in the Scale line of the display.
As many column/constant ranges can be specified as required. The individual ranges are separated from one another by commas. The selected columns/ constants will be displayed without gaps. Columns can also be duplicated or replaced with the AD command.
FC= Fill Character. Column ranges that lie partially or totally outside of a record are padded with this character. Exception: the last column area will not be padded. It will be restricted to the length of the available data. See the notes below for further details.
Standard: FC=C' '.
NAD Reset AD mode. The records are displayed in their original form.
Standard: NAD
AD The previously defined column selection created by an AD command is reactivated.
AD? | AD?,%name The column selection defined with the last AD command, or the column selection saved with the last SP command %name to a parameter set, is displayed. The description of SP %name is described below.
AD ( ) Entering () will display a special mask. The user is presented with 18 lines within which any number of column definitions may be entered. This should be entered without any gaps, i.e. without blanks.
Pressing the DUE1 (ENTER) key will activate the AD mode. The K1 key will terminate the AD command. The F3 key will produce a hard copy of the mask to a file created by CFS. Otherwise F3 has the same effect as DUE1.
BS2000 commands, as well as the SP command can be entered in the command field of the mask.
Save Parameters. The column definitions defined in the mask are saved to a file with the name CFS. JRSAVE [.jobname], or to a file /FILE file,LINK=JRSAVE. The exact rules by which the names of the JRSAVE files are created are described in Chapter 27 "Files created by CFS", under CFS.JRSAVE.
%name one to 44 character alphanumeric name for the parameter set.
jrsave Name of the JRSAVE file. This file name should only be specified if the parameter was saved to a file named differently from the standard JRSAVE file convention used by CFS (see above).
The user can activate or display a column definition saved with the SP command with the AD %name or AD?,%name commands.
AD %name | %?
The column definition saved earlier with the SP %name command to a parameter set is reactivated.
%?: All relevant parameter sets will be displayed in a list, from which one may be selected by marking it.
AD (file) The column definition is saved in a sequential file, file.
Format of the AD parameter file file:
Each record displays one or more column definitions. The individual definitions should be separated by commas. No comma may appear at the end of the record. The maximum record length of 250 bytes must not be exceeded.
Examples:
AD :21:30
Only 30 bytes from column 21 of each record of the file is displayed. For shorter records, the column display will be reduced accordingly.
AD :21-40:"<-- SPALTE 21-40 -->",:1:20"<-- SPALTE 1-20 --->",4X'FF'
The display will begin with columns 21 to 40. This will also be displayed in the Scale Line ("..."). If any records are shorter than 50 bytes, then the missing area will be padded with blanks (C' ') in the display. With the second parameter defined in the AD command, columns 1 to 20 of each record are selected. The third parameter will cause the records to be blocked off in the display with a constant, X'FFFFFFFF' .
AD (SLCT)
The column ranges stored in the file SLCT are selected from the Display file, and displayed on the screen.
The SLCT file contains the following:
:35-38:"TSN",' '
:45:8"PROGRAM ",' '
:30:10"ISAM KEY",' '
........
:100-$:"REST-REC"
A blank follows the 35 to 38 range. Then columns 45 to 52, a blank, and so on. The selected data will be headed by the respective descriptive text in the Scale Line.
Notes:
If another AD command is issued for a file already displayed in AD mode, then it should be noted that the column values for this new command must relate to the original format of the records, and not to the display already created by the AD command.
The AD mode is only valid for the file actually being displayed. When changing to another file with the NF (Next File) command, the AD mode is switched off. By issuing the AD command without operands, the last column definition can be activated at any time.
When entering a column range in the form :col1-col2:, the '$' character can be specified for col2. $ here stands for the last column of the record. For example, :101-$: will select the range from column 101 to the end of the record. A column definition of the type :col1-$: can only be given as the last definition.
If a column range defined with :col1-col2: or :col1:len is longer than a particular record, then the following two cases should be noted:
a) The specified column range is not the last range.
The missing positions in the record are padded with a specified fill character (Standard: C' ').
b) The specified column range is the last range.
The column range is only displayed to the length of the available data.
Using the AD command, columns may also be multiply displayed. The length of the displayed data can therefore grow by a multiple of the original record length. It should be noted, however, that the maximum of 32,700 positions must not be exceeded.
If the Display file is an ISAM file, the ISAM key should be contained in a column range. The ISAM key must be complete, and in one piece.
Data selected with the AD command and displayed on screen is handled by CFS identically to any other file records. All Display commands such as DS/DW/HEX/R/L/ C, as well as M (Modify) and S (Search) are allowed. The W (Write) command will write the records as displayed to another file. With ISAM files, the currently valid position of the ISAM key (see above), as displayed will be adopted.
If a column is selected multiply, and then amended im Modify mode, then it should be noted that the amendments must be made in the last (that is, the furtherest right) column for the file to be written back correctly.
A combination of the AD and W commands can be used to create a file in which two column ranges are transposed, compared to the original. The columns 21-30 and 41-50 are transposed using the AD command below. Using the Write command, the resulting file is written to the file CFS.SWAP.
AD :1-20:,:41-50:,:31-40:,:21-30:,:51-$:
W9999,CFS.SWAP
If the original file was an ISAM file with KEYPOS=25, KEYLEN=8 and RECFORM=V, then CFS.SWAP will also be created as an ISAM file with KEYPOS=45, KEYLEN=8. Shifting the ISAM key when creating a new file with the Write command is taken care of by CFS.
It is possible to mix hexadecimal and character formats in the same display by using the H option when definging the column. If a column range is specified as hexadecimal with an H or X option, then the data of this column may also be modified in hexadecimal. Other columns, defined without the H option, may be modified in the same step in character mode.
Close the Display File after each User Input
CA | NCA The Display file is closed after each input made by the user. The file is thus open very briefly only during paging and so on. During the input pauses the file is closed, and may be opened in read or write mode by other users.
Standard: NCA
Notes:
When Modifying files, the CA mode has no effect, i.e. the file that is made available for modification may not be written to by another user until the Modify mode has been terminated. Equally, the CA mode has no effect in Single Record mode (SR), or when displaying tape files.
CA mode is not reset when leaving the Display mode. It remains current for all succeeding Display actions until it is reset with the NCA command.
D Display Next File. The next file flagged with the Action Code D or M is displayed. NF can be entered instead of D.
An alternative data access method for the file currently being displayed can be set with this command. This means that the records can be displayed in a different sort sequence, or displayed in another format.
type Type of access. The following access types are implemented:
CODE Character-orientated conversion of the records/data blocks for screen output. The file records are not affected.
I Access an NK-ISAM file according to a secondary key set up with CREate Alternate Index.
FLAM Access a file compressed with the FLAM software product. The records are displayed in original, i.e. uncompressed form.
param Additional parameter for the required access type.
CONV {, CAP | CAP2 | LOW | EBCTOASC | ASCTOEBC} [, K=Y]
CAP Convert all lower case to upper case.
X'00' --> X'00' (unchanged)
X'4F' (ö or |) --> X'4F' (unchanged)
X'FB' (ä or {) --> X'FB' (unchanged)
X'FD' (ü or }) --> X'FD' (unchanged)
CAP2 Convert all lower case to upper case.
X'00' --> X'40' (Blank)
X'4F' (ö or |) --> X'BC' (Ö or ~)
X'FB' (ä or {) --> X'BB' (Ä or [)
X'FD' (ü or }) --> X'BD' (Ü or ])
LOW Convert all upper case to lower case.
X'40' --> X'40' (unchanged)
X'BC' (Ö or ~) --> X'BC' (unchanged)
X'BB' (Ä or [) --> X'BB' (unchanged)
X'BD' (Ü or ]) --> X'BD' (unchanged)
ASCTOEBC
Conversion from ASCII to EBCDIC.
EBCTOASC
Conversion from EBCDIC to ASCII.
K=Y The data contained within the key of an ISAM file is also converted. Normally, the ISAM key is excluded from the conversion.
I For ISAM access, this parameter will specify the desired Alternate Index. The records will be displayed in ascending order according to the Alternate Index.
FLAM If the FLAM option is specified, parameters can be specified which will influence the type of decompression. For example: DAFLAM,TR=A/E. Specifying this parameter will cause the data to be converted from ASCII code to EBCDIC when decompressing. For a full description of all the parameters, see the FLAM User Manual".
NDA The data access type is reset to the standard setting.
Notes:
The DA command can also be used to facilitate user-specific access to databases. A detailed description of the Data Access Interface is available on request.
The W command may be used to write the records in the sequence in which they are displayed, or in the format in which they appear (i.e. decompressed for FLAM) to another file. In the ISAM file created by the Write command, the Keylen and Keypos of the currently active secondary key is used as the primary key.
An alternative method of data access set up by the DA command remains valid until the Display mode is terminated for the current file by pressing the K1 key, or by issuing a D/NF/LF/LST command. During the display, the command NDA can be used to return to the standard access method of CFS.
DL | NDL Display Long/No Display Long.
DL Every record is displayed in its full length, or up to the end of the screen.
Instead of DL, the commands EL (Edit Long) or DW (Display Wide) may be given.
NDL Only so much of each record is displayed as can fit in one screen.
Instead of NDL, the commands ELO (Edit Long Off) or DS (Display Short) may be specified.
Standard: NDL.
Note:
As an alternative to displaying a file in DL mode, refer also to the AD (Arrange Data) command on page 8-. This command facilitates the selective display of particular column ranges of a file. The sequence and length of these column ranges is unrestricted. A display format (character/hexadecimal) can be set for each column selection.
H | NH Hexadecimal /No Hexadecimal display.
Instead of H/NH, the commands HEX/HEXO can be used.
Standard: NH.
HEXC | NHEXC Hexadecimal column display/decimal column display.
With hexadecimal representation, in EL mode (Edit Long) the column display begins at the left edge of the screen numbered in decimal notation, e.g. 0025. Entering the HEXC command will result in the columns being numbered in hexadecimal notation, i.e. 0018. In decimal mode, the first column is 1. In hexadecimal mode, the first column is 0. See also the command CX'..' .
Standard: NHEXC.
KDO | NKDO Keep Display Options/do Not Keep Display Options.
Normally (NKDO), all Display options are reset to their standard values when the Display mode is terminated, or when switching the display to another file.
The KDO command has the effect of retaining the current values of the following parameters, and these are automatically activated for the display of the next file:
Cnn first column to be displayed
DL/DS Display Long/Display Short
H/NH Hexadecimal/Character representation
N/NN Display/suppress record numbers
SR/NSR Single Record display
Standard: NKDO.
Note:
The required Display options can be set when starting CFS with the help of a Startup file (see Chapter 20), and can be retained for the current CFS job. The Startup file could, for example, contain the following:
*002 FILE=NO
DL
N
KDO
*DIA
The Display options retained with the KDO command remain valid until CFS is terminated.
LF Last File. The previous data object to have been displayed is redisplayed.
Return from Display to the File List
LST LiST. Return to the file list display.
Note:
Instead of the LST command, the K1/F1 key can be pressed to return to the file list. The F1 has the additional effect of writing amendments made in Modify mode back to the file, even when they have been made in the same dialog step as pressing the F1 key.
Display the Record/Block Number
N | NN record Numbers/No record Numbers.
For SAM files, the record numbers are displayed/suppressed.
For PAM files, the block numbers are displayed/suppressed.
Standard: N (Record/block numbers are displayed).
NF Next File. The next data object to have been flagged with Action Code D or M is displayed. D can also be entered instead of NF.
Note:
The following option exists if the user has a list of many objects flagged with a D or M, and does not wish to display them in the order in which they appear in the file list (e.g. the third file should be displayed first): simultaneously chain as many NF commands as needed to the Action Code (e.g. : D;NF;NF). That file relating to the number of NF commands (or D's) will then be displayed.
Set/Modify the Display of the Beginning of the Record
Normally, records of a file with RECFORM=V are displayed by CFS as from the first byte after the 4 digit record length field. The Offset command O can be used to change this standard value fot the file currently being displayed.
O [x] n Column +/-n will be used in future as the logical beginning of record.
x + | - (Standard: +)
n 0 - 999
O 0 The display offset is reset to the default value.
Examples:
O-4
All records of a RECFORM=V file, including the record length field, will be displayed. Entering C1 (Column 1) is this case refers to the beginning of the record length field, and not to the beginning of the data.
Using the command S,:1:>X'0054' after entering the O-4 command, all records containing more than 80 data bytes (record length >80 + 4) can be sought.
O+8
The key of an ISAM file with KEYPOS=5,KEYLEN=8 is not displayed. Entering C1 (Column 1) will refer to the first position following the ISAM key, and not to the start of the key, as is normally the case.
Position the Window on a Record or Data Block
Pn SAM/PAM: Position the window on the record/block with the specified number. Instead of Pn, the command #n can be used.
Data Protection: With PAM files, the window can only be positioned at the last data block. The data blocks assigned, but not yet written to the displayed file may only be viewed under TSOS.
Pkey | PX'hex' ISAM: Position the window on the record with the specified ISAM key.
Instead of Pkey/PX'key', the command #key/#X'key' can also be used.
PBnnn For SAM Files: Position to Buffer.
Position the window at the buffer with the specified number. The display will begin with the first record in the specified buffer. The size of the buffer for SAM files is dependent on the blocksize of the file, and is a multiple of 2048 bytes. Instead of PBnnn, the command #Bnnn can also be given.
Notes:
For very large SAM files, the PB command allows the window to be positioned at the end of the file much more quickly than using the normal ++ command, since PB will read the respective block directly.
When positioning to SAM buffers, CFS loses track of the record numbers. NN mode (No Numbers) is then set automatically.
PPnnn Position to Pam Block.
If the file contains a BLKSIZE = (STD,b) attribute, the command PPnnn will result in the screen being positioned at the PAM block INTEGER(nnn/b).
Mark Display Position /Position the Display Window on a previously marked position
PD.n Position Define. The position of the displayed file section is marked so that this file section may be redisplayed at a later time for some other purpose.
n Value between 0 and 9.
P.n Position at a predefined point: The display will jump immediately to a marker previously defined with a PD command.
n Value between 0 und 9.
Display SAM/ISAM File in PAM Format
PAM | NPAM PAM Format/No PAM format.
PAM SAM/ISAM files are displayed in PAM format.
NPAM The PAM mode for displaying SAM/ISAM files is reset.
Standard: NPAM.
Note:
PAM files are always displayed in DL mode (Display Long).
Should the user only be intersted in a particular section of the records of a PAM file (for example, the first 80 bytes of each PAM block), then this can be achieved using a temporary sequential file. The PAM file should be converted to a SAM file whereby perhaps only the first n bytes of each PAM block is converted: ONXCONV ' '='.SAM',FCBTYPE=SAM [,LEN=n]
The SAM file created in this way can also be displayed by CFS in DS mode (Display Mode).
PK | NPK PAM Keys/No PAM Keys.
When displaying PAM files, or SAM/ISAM files in PAM format, the 16 byte PAM key is displayed instead of the data blocks.
All the Display commands such as HEX/ HEXO/ M/ NM/ S/ W can be used.
Standard: NPK
SC A Ruler with column markings is displayed in the top half of the screen. The Ruler is active both in Display mode, and when displaying the file list.
SC file The Ruler is created from the first line of the specified file. In non-display mode (file list), the Ruler always appears in its standard form, i.e. no record content.
SC 'text' The Ruler will display as the text enclosed in quotes.
SCO | NSC The Ruler is disabled. NSC can be issued instead of SCO.
Standard: SCO.
OL | NOL As an alternative to SC/SCO, the commands OL/NOL (Orientation Line/No Orientation Line) can also be used.
Notes:
When displaying ISAM files, the ISAM key positions in the Ruler are displayed in either double brightness or underline mode, according to terminal type.
Scale is useful as an orientation tool for the Search command when entering a column range. Locating certain columns within a record is also made easier with Scale.
Single Record Mode (Sharupd=Yes) in CFS Display/Editor
Single Record Mode / No Single Record Mode.
SR The Single Record Mode is concerned solely with the Display/Modify mode of CFS, and has two different effects:
a) Only one record or data block is displayed on the screen.
b) A switch is made into the Sharupd mode for ISAM/PAM files.
When displaying files with FCBTYPE=ISAM/PAM, the Open with SHARUPD=YES is only executed if the file could not be opened in normal Display mode (SHARUPD= NO) because of a DVS error. If the file is displayed in normal Display mode without errors, then the Sharupd mode is only activated following the SR command after the user switches to the BS2000 command mode (using the CFS command "/"), and then returning to CFS with /R(esume).
SR mode guarantees the integrity of the data, even during simultaneous access by many users.
NSR [SHARUPD=YES]
The NSR command resets the Single Record Mode. An ISAM file currently being displayed is opened with SHARUPD=NO.
The SHARUPD=YES option in the NSR command results in the Display file being opened as a full page display with SHARUPD=YES.
Standard: NSR. ISAM files will be displayed and modified with SHARUPD=NO.
Notes:
SR mode is only valid for the current Display file, and must be reactivated if required for a new file.
The SR mode is also useful for the Display of tape files. The tape will not then rewind before each screen output.
Search for Character Strings (Simple Search Argument)
S [-] [n] ,[col] [r] item [, R] [, NC] [,SR]
A search is made for the specified character string starting from the first displayed record to the end/beginning of the file. The window is positioned on the first record to contain the search string. A Search command to find the next occurrence of the string is automatically placed in the command field.
Pressing the DUE1/ENTER key (sending this suggested command) will continue the search.
- Backward Search: The search proceeds from the first displayed record towards the beginning of the file.
Standard: Search towards the end of the file.
n Number of records to which the search should be restricted.
Standard: an unrestricted number of records.
col Column range in which the character string should be found.
:col1-col2:
The first character of the search string must begin in the range between col1 and col2.
:col1:
The character string is only sought in the specified column col1, and must begin there.
>:col1: | <:col1:
The character string will be sought in the range from col1 to the end of the record (>:col1:), or from the beginning of the record to col1 (<:col1:).
Standard: Search the entire column range (from column 1 to the end of the record).
r > | < | -
> Search for a character string > item
< Search for a character string < item
- Search for a character string not equal item
Standard: Search for a character string = item.
item Search string: C'string' | L'string' | X'string' | A'string'
C'string' can be abbreviated to 'string'. In many cases, even the quotation marks can be omitted. See the Notes.
L'string': Lowercase characters in string are not converted to uppercase.
If string contains quotation marks ('), then these should be doubled ('').
A'string': During the search, no distinction is made between uppercase and lowercase.
Example: The search string A'CFS' will return a hit if the record contains the string 'CFS' or 'cfs' or any combination of uppercase or lowercase.
The Search command also offers the possibility of specifying multiple search arguments linked with and/or/wildcard syntax. The syntax is a continuous sequence of the search arguments described in this section, and will be described in detail in a following section entitled "Search for Character Strings (Multiple Search Arguments)".
R Reverse. The search within the records will not proceed as usual from left to right, rather from right to left. If this mode is used, it is not possible to use And, Or or wildcard operators to link multiple search conditions.
NC No Columns. In DL mode (Display Long), the column positioning for a hit is suppressed for the current search (same as in DS mode). The optional parameter NC of the DL command functions similarly). DL,NC will set the NC mode for all following search commands in the current file.
SR Single Record. This indicator is only relevant for a negative search, i.e. when searching for a string other than the value specified (e.g. S,-X'00').
By default, when conducting a negative search without specifying a column range, a record will only be recorded as a hit if the search string does not appear in the complete record.
In SR mode, the first instance in the record of the non-appearance of the search string will be recorded as a hit. Entering the option R (see above) will automatically enable SR mode.
S [-] Search from the first displayed record to the end/beginning of the file for the previous search argument.
S? | S?,%name The previously defined search argument, or the search argument saved with the SP %name command to a parameter set is displayed. A full description of the SP %name command is on page 8-.
Notes:
When entering the column range col in the search statement, certain differences to entering column ranges in EDT should be noted:
1) :col1-col2: means that the argument enclosed in quotation marks must begin within the specified column range.
In EDT, the search argument must be wholly contained within the column range.
2) :col: means that the search argument enclosed in quotation marks must begin exactly at the specified column.
Entering a single column in EDT in the form :col: causes the search to proceed from :col: to the end of the record. In CFS this is achieved by entering >:col2:, whereby col2=col-1. By entering <:col:, a search can be made from the beginning of the record to col.
In most cases, string can be entered without the quotation marks (S,string). The quotation marks need only be specified if string contains spaces, or is followed by a replacement string (page 8-), or a Write command (page 8-).
Once the search argument has been defined, it is valid for all succeeding S commands, and need not be re-entered. It remains valid until a new string needs to be found.
If the user is only interested in the number of hits in the file, this can be achieved by entering the command S,'string'='' (in Non Modify mode only). In this case, only the number of hits found up to the end of the file is displayed.
A particularly long search can be interrupted by pressing the K2 key (branch to BS2000 command mode), and then entering the command /INTR R. The window will be positioned at that point in the file that was last read.
PAM: Search over Block Boundaries
When searching PAM files, the string does not have to be contained completely within a data block. If the string (e.g. 'DATABASE') begins at the end of a PAM block and is continued at the beginning of the next PAM block (e.g. 'DA' + 'TABASE'), then this combination will be recognised by CFS and flagged as a hit.
Examples:
S,C'XYZ'
Search from the first displayed record to the end of the file for the character string C'XYZ'.
S,C'C'' '''
Search for the character string C'_' over the whole file (Quotation marks in the search string must be doubled).
S,L'File'
Search all data records for the character string 'File'. The lowercase characters contained within the string are not converted before the search begins.
S,:73:-' '
Search in column 73 of each record for any character other than a blank. Records with fewer than 73 columns will not be flagged as a hit.
S,:1:>X'0054'
To detect records of a specific length, enter the Offset command O-4 to display the record length field. The above Search command for a RECFORM=V file will then find all records whose length, including the record length field, is greater than 84 bytes.
S10,:100-200:X'47'
Search the next 10 records in the column range 100 - 200 for the string X'47'.
S,'CFS'=''
In Non Modify mode: The number of records in which the string 'CFS' occurs at least once is counted. No replacement of the search string takes place in the file in Non Modify mode.
S,'CFS'='',A
In Non Modify mode: The total number of hits are counted.
A: multiple occurrences in one record are all counted.
In Modify mode, each occurrence of the search string is deleted in an ISAM file.
S,''
The length of the first record in the window is displayed in the commentary line (search to the end of the record).
Search (Comparison of Column Ranges)
S [-] [n] ,:col1-col2: r :col3:
From the first record displayed on the screen to the start or end of the file, the contents of the column range specified by :col1-col2: is compared to the columns beginning at :col3:. The window will be positioned at the first record in which a match is found between the two column ranges. A Search command to find the next occurence will automatically be provided in the Command field. Pressing the ENTER key (sending the prepared Search command) will continue the search.
- Backward search: The search will proceed from the first record displayed in the window towards the beginning of the file.
Standard: Search towards the end of the file.
n Number of records which should be examined.
Standard: no limit on the number of records.
col1 Start column of the first range.
col2 End column of the first range.
r = | > | < | -
= the contents of the column ranges must match.
> the contents of the first column range must be greater than the contents of the second column range.
< the contents of the first column range must be less than the contents of the second column range.
-= the contents of the first column range must not equal the contents of the second column range.
Standard: =
Notes:
Both column ranges must be fully contained within the record. If a range extends beyond the end of the record, CFS will flag a mismatch.
Comparison of column ranges can be linked with further search conditions by the "+" and "," operators, as can be done when searching for character strings. For further information, see the section entitled "Search for Character Strings (Multiple Search Arguments)".
Examples:
S,:1-20:=:101:
The contents of the first 20 bytes of each record will be compared to the contents of the columns from 101 to 120. A hit will be registered if a match is found.
S,:1-1:>:12:
The contents of the first column of each record will be compared with the contents of column 12. A hit will be registered if the contents of column 1 are greater than the contents of column 12.
Search for Character Strings (Multiple Search Arguments)
S [-] [n] , arg [ op arg ] [...] ..... [, A] [, NC] Format 1
S ... , ( ) [, A] [, NC] Format 2
S ... , %name | %? [, A] [, NC] Format 3
S ... , ( s-fil ) [, A] [, NC] Format 4
A search is made for the specified combination of multiple search arguments from the first record displayed to the end/beginning of the file.
The syntax for the individual search arguments arg is described in the previous section, "Search for Character Strings (Single Argument).
Each search argument is linked with the next by the operator op. There is no restriction on the number of search arguments that may be linked.
S [-] [n] above, and in the syntax description below, represents the scope over which the search should proceed: i.e. backward search, number of records to be searched. For a full description, see page 8-.
4 formats of the multiple search are described below.
S [-] [n] , arg [ op arg ] [...] ..... [, A] Multiple Search - Format 1
arg [col] [r] item
single search argument, as fully described in the preceding section "Search for Character Strings (Single Argument)".
Logical operator for the preceding search argument arg.
, Search the current record for the preceding or the succeeding search argument. The search is considered to be fulfilled if either of the two search items are contained in the record.
+ Search the current record for the preceding and the succeeding search argument. The search is only considered to have been fulfilled if both of the search aruments are found in the record. The sequence of the arguments in the record is immaterial.
*[n] Search the current record for the preceding and the succeeding search argument. The search is considered to have been fulfilled when both search arguments are contained within the record. The search arguments must appear in the same sequence as specified in the search command.
n Number of seperators, having any character content, that must exist between the first and the second search arguments. If n is not specified, then any number of seperating characters are allowed, including 0.
Any number of op arg statements can be chained.
Brackets can be used to separate the individual statements if they are linked with a '+' operator: (.. , .. , ...)+(.. , .. , ...).
A All: When a search is made containing multiple search arguments that have been "or"ed (",") together, it is not terminated after the first occurrence of the search item. On the one hand this leads to longer search times, but on the other hand it has the advantage of reporting all search hits in the commentary line of the CFS mask, together with their respective column positions.
Standard: The search is terminated after the first occurrence of the specified search item.
NC No Columns. The column positioning on the hit is suppressed in DL (Display Long) mode (same as in DS mode).
Notes:
The specified search arguments and operators are evaluated linearly. If multiple search arguments are chained with "+" or "*", and one of these search items is not contained in the record, then the search is terminated, or continued if it is linked with the "or" operator, "," .
For each individual search argument, arg, the following can be specified: column range (:col1-col2: / :col: / >:col: / <:col:), inverse selection ( -'item' ), character ( 'item' ) or hexadecimal ( X'item' ) format , or upper/lowercase ( L'item' ). When entering the search item in character format, the quotation marks can normally be omitted. For instance, entering the command S,FLAG*STATEMENT will search all records for the string 'FLAG', and anywhere thereafter the string 'STATEMENT'. For further information, see the syntax description and the Notes on page 8-.
In total, 71 bytes may be entered in the command line of CFS for multiple search criteria. This may be too restrictive if a large number of search arguments need to be entered. To avoid this, a search mask can be called from the CFS command line. This mask is called with the command S,() , as described below.
Examples:
All records are sought that meet one of the following criteria:
- The '=' sign and then somewhere thereafter a '(' character. e.g. '=A(...)', '=V(...)'
- The string 'DC ' and then somewhere thereafter the characters '(' and ')'.
e.g. 'DC A(...)', 'DC Y(...)'
S,:1:>X'004C'+:1:<X'0054'
To determine records of a particular length, the record length field can also be displayed with the Offset command O-4. Using the above search command for a file with RECFORM=V, all records longer than 76 bytes, and shorter than 84 bytes will be found.
S,-L'a'+-L'b'+-L'c'
All records will be found that do not contain the lowercase letters a, b, or c..
S,L'a',>L'a'+<L'z',L'z'
All records will be found that contain at least one lowercase letter.
S [-] [n] , ( ) [, A] Multiple Search - Format 2
Entering () will produce a special Search mask. 18 lines of the screen are then available to the user to enter extensive search arguments. The suffix A has the same effect as in Format 1 of the Search command.
The lines 4 to 21 of the search-mask are used to enter the search arguments. These should be entered without any blanks being inserted.
Pressing the DUE1 (ENTER) key starts the search process. Pressing the K1 key will terminate the definition of the search arguments. Pressing the F3 key will procuce a hardcopy of the defined search mask to a file created by CFS.
BS2000 commands, as well as the SP command can be entered in the command field.
SP %name [, jrsave] Save Parameters. The search criteria defined in the search mask can be saved with this command. They will be saved to the file CFS. JRSAVE [.jobname], or to a file assigned as /FILE file,LINK=JRSAVE if the SP command is specified without the jrsave option. The exact rules by which the names of the JRSAVE files are created are described in Chapter 27, "Files created by CFS", under CFS.JRSAVE.
%name 1 to 44 position alphanumeric key for the parameter set being saved.
jrsave Name of the JRSAVE file. This name should only be specified if the parameters are stored in a file with a name other than the standard CFS JRSAVE file (see above).
An example for filling in the Search mask, and using the SP %name command can be found in the next section, "Search and Replace".
The user has access to a search argument saved with SP via the SP %name (see below), or the S?,%name command (page 8-).
S [-] [n] , %name | %? [, A] Multiple Search - Format 3
A search is made for all records fulfilling a complex set of search criteria that were previously entered via the Search mask, and were saved to the named parameter set using the command SP %name (see page 8-). The option A has the same effect as in Format 1 of the Search command, described above.
%?: All relevant parametersets will be displayed in a list, from which one may be selected by marking it.
S [-] [n] , ( s-fil | lib ( [t/] elem) ) [, A] Multiple Search - Format 4
s-fil | lib ( [t/] elem )
Name of the file (Fcbtype=SAM), or library element in which the search argument is stored. If the element type is not specified for a library element, then S/ will be supplied, if the library is in PLAM format.
Using the CFS Search mask (see page 8-), multiple search arguments to a maximum length of 15*80 characters may be specified. There is no such restriction for the Search file, s-fil. The size and number of the search arguments in this file are limitless.
Format of the s-fil file:
Each record in s-fil represents a search argument that is linked to the argument in the next record. If none of the ,/+/* logical operators are specified at the end of a record, then, as standard, the records will be "or"ed with each other. Within each record, multiple search arguments can be linked with or, and, wildcard operators. A maximum length of 250 bytes per record is allowed.
A This option has the same effect as in Format 1 of the Search command, described above.
Example:
All records of the file currently displayed are searched for an occurrence of at least one of the search criteria contained in the file NAMES (Fcbtype=SAM). A search argument is created in a record of the specified file.
The file NAMES has the following format:
'ALBERT'
'ANDREAS'
'AMADEUS'+'THEODOR'+'ERNST'
........
'CARL'*'PHILIP'*'EMANUEL'
And combination ( + ): A record containing the string 'AMADEUS' will only be flagged as a hit, if the same record also contains the strings 'THEODOR' and 'ERNST'. The sequence of the individual items in the search is irrelevant when linked with the '+' operator. For example, a record containing the string 'ERNST THEODOR AMADEUS' will fulfill the search criterium.
Wildcard combination ( * ): A record containing the string 'CARL' will only be flagged as a hit if it also contains the strings 'PHILIP' and 'EMANUEL'.
It is possible to restrict the search of each individual argument to a specific column range.
In the example above, the quotation marks before and after the search strings may be omitted, since the string does not contain any blanks or special characters.
Any hexadecimal string can be sought using X' '.
Search items containing lowercase letters can be entered in the form L'...'. In this case, the string between the quotation marks is not converted to uppercase.
For a full description of the syntax and the various abbreviations, see page 8-.
Preliminary note: The "Search and Replace" command will only function in Modify mode (M command). In Non Modify mode, a count is only made of how often the replacement would have been made (display of the number of hits).
S [-] [n], ...= [len] item2 [, ...= [len] item2 ] .... [, opt]
S .... represents a single search argument as described in the previous section "Search for Character Strings (Simple Search Argument)".
len optional length definition. When replacing, item2 will be repeated until the specified length, len is attained. If it is not specified, len = length of the replacement string.
item2 Replacement string: C'...' | L'...' | X'...'
The statement: ...= [len] item2 can be repeated as often as required. Commas ("or" conditions) should be used as delimiters.
If the command line is not sufficient to hold the statements, entering S,()[,opt] will produce the Search mask. Formats 3 and 4 of the Search command can also be used for Search and Replace:
S, %name [, opt] | S, ( s-fil ) [, opt].
The option [,opt] can also be entered in the Search mask / s-fil after the last pair of search string=replace string statements.
opt C | R | A | Q
option to control the replacement process.
C The C option (Change) will cause an exact swap of the search and replacement strings in the records. The record lengths in this case will be amended accordingly. This option is analogous to replacement in EDT.
Normally, (no C option specified), the replacement string will overwrite the detected search string. The length of the modified record will then not be amended, even if the search string and replacement string are of different lengths.
The C option is only applicable for ISAM files, or SAM files converted to ISAM format. RECFORM=V is also a prerequisite for this option.
R Reverse. The search and replace operation within the records will take place in reverse order, i.e. from right to left. Multiple search and replace conditions cannot be combined in this mode.
Only the C option (see above) can be combined with the R option, i.e. CR.
Standard: The replacement proceeds from left to right.
A All search hits within a record are replaced (analogous to the EDT command: @ON...CA'...'T'...').
Standard: The replacement will only be carried out for the first hit in each record.
If neither the C or A options are specified, then the first hit in each record will be replaced with the replacement string.
Q Query: The user is asked for confirmation before each replacement. The window is positioned 20 columns to the left of the hit. Pressing the DUE1 (ENTER) key will proceed with replacing the search string. Pressing the K3 key will prevent the replacement taking place. After pressing either key (DUE1/K3), the search process continues to the next occurrence. The search process can be terminated by overwriting the S command in the command line.
Standard: no Query mode. The string will be replaced without asking the user.
Notes:
The C, A, and Q options can also be combined: CA / CQ / AQ / CAQ. However, the sequence of these combinations is fixed. The C option, if required, must be specified first, then A, and finally the Q option. For example, CA is equivalent to the Change All command of EDT. CAQ is a variation, whereby the user is asked to confirm each replacement or not.
When using the CAQ (Change All Query) option with differing length search and replacement strings, it can occur that some characters do not appear at the end of the current record (i.e. the record appears to be truncated). This has no actual effect on the underlying data.
If the C option is not specified with a Search and Replace command, then the following should be noted:
If the replacement string (item2) is longer than the search string (item1), then data to the right of item1 will be overwritten by item2 .
If the replacement string (item2) is shorter than the search string (item1), then the rest of item1 will remain unchanged.
ISAM: no replacement within the key will take place.
PAM: Search over Block Boundaries
The search string does not have to be contained fully within a data block when searching PAM files. If the search item (e.g. 'DATABASE') starts at the end of a PAM block, and continues at the beginning of another block (e.g. 'DA' + 'TABASE'), then this will be recognised by CFS, flagged as a hit, and the replacement will take place.
Examples:
S,C'C''passw'''=C'C''new-passw''',CAQ
In ISAM mode, a search will be made for the character string C'passw'. For each occurrence of this string, the user will be asked if it should be replaced with C'new-passw'. Pressing the DUE1 key will confirm the replacement, and the search will be continued. Pressing the K3 key will suppress the replacement and continue the search process. The data to the right will be shifted when the replacement takes place.
S,:9:''=60X'FF'
The record contents from column 9 to column 60 (beginning of record is at column 1) of each record from the first displayed, to the end of the file, is overwritten with X'FF'.
S,:90:X'FF'+:1990:X'FA00'+:1545:''=5X'FF'
A search is made for all records containing X'FF' in column 90 and X'FA00' in column 1990, from the first displayed record to the end of the file. All records that fulfill these conditions will have the column range from 1545 to 1549 overwritten with X'FF'.
S,'ABCD'='',CA
All columns of all records from the first currently displayed to the end of the file are searched for the character string ABCD. If found, it is removed. This removal can occur more than once per record. (option A). Option C causes the resulting record to be shortened.
S,()
This command will cause the Search mask to be displayed, in which a user has entered the following:
} dd.mm.yy hh:mm:ss HOST: ........ TSN: .... {
} COMMAND :SP %cap {
} please enter/modify search-item below {
} S,L'a'='A',L'b'='B',L'c'='C',L'd'='D',L'e'='E',L'f'='F',L'g'='G',L'h'='H',L'i'= {
} 'I',L'j'='J',L'k'='K',L'L'='L',L'm'='M',L'n'='N',L'o'='O',L'p'='P',L'q'='Q',L'r {
} '='R',L's'='S',L't'='T',L'u'='U',L'v'='V',L'w'='W',L'x'='X',L'y'='Y',L'z'='Z',L {
} 'ae'='Ae',L'oe'='Oe',L'ue'='Ue',L'ä'='Ä',L'ö'='Ö',L'ü'='Ü',A {
} {
} {
} {
} DUE1: start search / K1: abort / Command SP %name: save search-item / F3: HC {
} Activate / Redisplay saved search-item with Command: S,%name / S?,%name {
} param-set saved as %CAP in CFS.JRSAVE.HILBERT {
All lowercase letters (see option A at the end of the mask entry) are converted to uppercase. Entering the command SP %CAP will cause these Search and Replace statements to be saved under the name %CAP in the file CFS.JRSAVE [.jobname], or to a file assigned with the following command: /FILE file, LINK=JRSAVE. The exact rules by which the names of the JRSAVE files are created are described in Chapter 27, "Files created by CFS", under CFS.JRSAVE.
S,%CAP
The Search and/or Replace statements saved under the name %CAP are executed.
S?,%CAP
The Search and/or Replace statements saved under the name %CAP will be displayed on the screen (see above), and can then be further modified or executed.
Search and Delete the Records/Strings found
S ...=D [ I | P | PI | S | SI ] [, Q]
S .... represents a single/multiple search argument as described in the previous section "Search for Character Strings (Simple/Multiple Search Argument)".
If the string is found in a record, then the following delete operations are possible:
D Delete the entire record.
DI Delete the string. The record will be appropriately shortened.
DP Delete from the end of the ISAM key to the beginning of the string (Prefix).
DPI Delete from the end of the ISAM key to the end of the string (Prefix + Item).
DS Delete from the end of the string to the end of the record. (Suffix).
DSI Delete form the beginning of the string to the end of the record. (Suffix + Item).
Q Query: For each search item found, the user will be asked if the delete operation should be carried out. Pressing the DUE1 (ENTER) key will confirm the proposed deletion, and the search process will continue at the record containing the next search hit. Pressing the K3 key will cancel the proposed deletion, and move to the record containing the next search hit. The search will be terminated if the proposed S command in the command line is overwritten.
Standard: no Query mode. The deletions will be carried out without seeking confirmation from the user.
Note:
This variation of the Search command may only be executed in Modify mode (Action Code/command M) and on ISAM files. SAM files must first have been converted to an ISAM format.
Examples:
S,:1:>'0100'+:1:<'0500'=D
Prerequisite is an ISAM file with Recform=V,Keypos=5,Keylen=8. Beginning at the first record currently displayed, all records having an ISAM key greater than 0100 and less than 0500 are deleted.
S,:10-12:'1',:10-12:'2',:10-12:'3'=D,Q
The user is asked to confirm the deletion of any record containing the digits 1, 2 or 3 in columns 10 to 12 (Query mode, parameter Q). Pressing the DUE1 (ENTER) key will delete the displayed record, and then the next occurrence is sought. Pressing the K3 key will cancel the delete operation, and also search for the next occurrence.
Search and Display Results to Screen
S ...=P [ L ] If a record containing the string is found, it is displayed in Line mode on the screen, and the search continues. This variation of the Search command is analogous to the EDT command, ON&P'....' .
S .... represents a single/multiple search argument as described in the previous section "Search for Character Strings (Simple/Multiple Search Argument)".
The record contents of SAM and PAM files will be prefixed with the respective record or block number. After a maximum of 21 records have been displayed, an overflow control line will appear ("Please acknowledge / End: K1"). Pressing the K1 key will abort the search process. Any other key will cause the search to continue to the end of the file, or to the limit of the search range (Snn,'...'=P).
When the search process has finished, the display window is repositioned where it was at the start of the Search command.
As standard, only one line (80 bytes) is displayed per search hit. If the search item does not occur in the first 80 bytes of the record, then a section of the record will be displayed with 40 bytes to the left and right of the item.
PL Print Long. The resulting record is displayed to a maximum length of 2048 bytes on the screen.
Note:
After displaying the hit record, the search condition is still stored. Entering the command S will cause the window to be positioned at the next record containing the search string.
Examples:
S,'MVC'*'BLANK'=P
Search from the first record currently displayed to the end of the file for records containing the string 'MVC', and to the right of that, 'BLANK'. All such records will be displayed in Line mode on the screen. When the search has finished, the window will be redisplayed where it was when the Search command was entered.
S100,:100-200:X'47'=PL
Search the next 100 records/blocks in the column range 100 - 200 for the string X'47'. The full length of the resulting records will be displayed.
S ....=W [file [, C|E|O|Q|BLK] [, file-par|?] [ /[:col:] [ len] [, NS] ] ]
The records flagged as search hits are written to a specified file, or to the last Write file to have been opened.
S .... represents a single/multiple search argument as described in the previous section "Search for Character Strings (Simple/Multiple Search Argument)".
C The output file is closed after the last record is written.
E The output file is opened with Open=Extend.
O An existing output file is overwritten (Open=Output).
Standard: see Notes.
Q Query: For each record that meets the search criteria, the user is asked whether or not that record should be written to the output file. Pressing the DUE1 (ENTER) key will write the record to the output file and continue the search. Pressing the K3 key will prevent the record being written to the file, and the next search result will be offered. Overwriting the predefined S command in the command field will cause the search process to be aborted.
Standard: no Query mode. All records flagged as search hits will be written to the output file without the user being asked.
The E/O and Q options may be combined, separated by a comma.
BLK Write Block: This option is only meaningful if the current Display file is a PAM file, and the Pamkey mode is set (PK command). Specifying this BLK option will cause the blocks belonging to the Pam keys to be written to the output file. Standard: Only the Pam keys are written to a SAM file in Pamkey mode.
file-par File attributes for the output file, using the File or ADD-FILE-LINK command syntax.
Standard: The attributes of the output file are taken from the Display file, with the exception of LOGLEN, VALLEN, VALPROP, DSPACE. If attributes are specified with file-par, then only these are used for the output file. If this case, no attributes from the Display file are taken over to the output file.
Example (parameter using FILE command syntax):
FCBTYPE=SAM,RECFORM=F,RECSIZE=80,BLKSIZE=(STD,16),SPACE=(120,30),VOLUME=PVT001,DEVICE=D3480
Example (parameter using ADD-FILE-LINK command syntax):
ACCESS=*SAM,REC-F=*FIX,REC-S=80,BUFFER-L=*STD(16)
? The SDF dialog facility of the /ADD-FILE-LINK (ADFL) command will be displayed.
The predefined values of the first two parameters (LINK-NAME=WFCB and FILE-NAME=...) may not be modified or deleted.
col Only that section of the record from column :col: is written (:1: represents the beginning of the record). Standard: The entire record is written ( :1: ).
len Starting from the specified column, or the beginning of the record, only len number of bytes will be written. Standard: The maximum record length (up to the end of the record) will be written.
NS No Skip. If the column :col: lies outside of the range to be written, then setting this option will force the relevant records to be written to the Write file. A 4 byte record will be written to the file which will consist of a record length field, but no data.
Standard: Records for which the :col: column range lies outside of the range to be written will not be output to the Write file.
Notes:
ISAM file records with duplicate keys can be written away to the Write file if DUPKEY mode has been set (DUPK command). If DUPKEY mode is not set (standard), then only the last such duplicate key record will be saved in the Write file. If the first of the duplicate key records is the one needed, then the search can be performed from the end of the file to the beginning: S-,...=W... .
The DUPKEY mode that was in force at the time the Write file was opened (the first W / S..=W command) will remain valid. Subsequently changing the DUPKEY mode will have no effect on the Write file until the Display mode is terminated with the K1 key, and then re-activated.
If neither the E nor O option (Extend/Overwrite) is specified after the Write file name, then the following rules are valid:
If the Write file is being accessed for the first time in this current CFS run, then it will always be opened in Overwrite mode, i.e. the file will be created, or overwritten.
If the same Write file is accessed by a succession of W / S...=W commands, then it will be opened as standard in Open=Extend mode.
The E/O option gives the user the chance of setting a different Open mode of operation to the standard.
Examples:
S,:1:>X'0054'=W CFS.REC80
To determine records of a particular length, an Offset command, O-4, can be given to display the record length field as well as the data. Using the Search command above (description of syntax on page 8-), all records of a RECFORM= V file whose data component is longer than 80 bytes will be found. The resulting records will be copied to a file CFS.REC80.
S,L'a',>L'a'+<L'z',L'z'=W CFS.LOWER
All records containing lowercase letters are copied to a file CFS.LOWER. A description of the syntax is on page 8-.
S,'ABC'=W SAVE.ABC,FCBTYPE=SAM/:9:100
A search is made for the string 'ABC' in the Display file, from the first record displayed to the end of the file. 100 bytes of each record containing at least one occurrence of this string will be copied from column 9 to the output file, SAVE.ABC. The output file SAVE.ABC will be created with FCBTYPE=SAM, irrespective of the format of the Display file. Normally, if no file parameters have been specified, the Write file will inherit the file and record formats from the Display file.
Search and Write the Results to a CFS Procedure Variable
S ....=W, (&var) [ /[:col:] [ len] ]
The Display file record that is flagged as a search hit will be written in full or in part to a CFS procedure variable with the specified name.
:col: Only that part of the Display record from column :col: will be copied to the CFS procedure variable (the record begins at :1:).
Standard: The record is copied in full.
len Only len number of bytes are tranfered from the specified column/beginning of record.
Standard: The full length will be written i.e. up to the end of the record. In this case, though, the maximum length is restricted to 80 bytes.
Note:
If multiple records result from the search, only the record last found will be transfered to the CFS procedure variable. If the search proceeds from the end of the file to the beginning (S-), then the first resulting record in the file will be transfered.
Writing Records from the Display File
W [n] [, file [, C|E|O|BLK] ] [, file-par|?] [ /[:col:] [ len] [, NS] ] [, SC]
Starting from the first record displayed, n records are copied to the specified Write file. The window is then positioned further by n records.
n Number of records to be transfered to the Write file.
The character '$' instead of a number n indicates the highest possible number 99999
Standard: n = 1.
file Name of the file to which the records should be written. (Write file).
If omitted: the file last used will be taken as the Write file.
C The output file will be closed after writing the last record.
E The output file will be opened in Open=Extend mode.
O An existing file will be overwritten (Open=Output).
Standard: see notes below.
BLK This option is only meaningful if the current Display file is a PAM file, and if the Pamkey mode is set (PK command). The BLK option will cause the blocks of data belonging to the Pam keys to be copied to the Write file.
Standard: In Pamkey mode, only the Pam keys are written to a SAM file.
file-par File attributes of the Write file, following the File or ADD-FILE-LINK command syntax. For example FCBTYPE=SAM SPACE=(120,30) VOLUME=PVT001 DEVICE=D3480
Standard: The file attributes of the Display file, with the exception of LOGLEN, VALLEN, VALPROP, DSPACE will be used for the output file.
If file-par is specified, then only these attributes are used for the output file. No attributes are taken from the Display file.
Example (parameter using FILE command syntax):
FCBTYPE=SAM,RECFORM=F,RECSIZE=80,BLKSIZE=(STD,16),SPACE=(120,30),VOLUME=PVT001,DEVICE=D3480
Example (parameter using ADD-FILE-LINK command syntax):
ACCESS=*SAM,REC-F=*FIX,REC-S=80,BUFFER-L=*STD(16)
? The SDF dialog facility of the /ADD-FILE-LINK (ADFL) command will be displayed.
The predefined values for the first two parameters (LINK-NAME=WFCB and FILE-NAME=...) may not be modified or deleted.
:col: Only that part of the Display record from column :col: will be copied (the record begins at :1:).
Standard: The record is copied in full.
len Only len number of bytes are tranfered from the specified column/beginning of record.
Standard: The full length of the record is copied, i.e. up to the end of the record.
NS No Skip. If the column :col: lies outside of the range to be written, then setting this option will force the relevant records to be written to the Write file. A 4 byte record will be written to the file which will consist of a record length field, but no data.
Standard: Records for which the :col: column range lies outside of the range to be written will not be output to the Write file.
SC If a Ruler is displayed on the screen, then the contents of this Ruler will be written as the first record of the Write file.
Standard: The Ruler is not written to the output file.
Notes:
Leaving the Display mode by pressing the K1 key, or by executing the LST command will automatically close the Write file. If another W command is entered without specifying a file name ( W [n] ), then the file last used will be opened in EXTEND mode (for a SAM file), or in INOUT mode (for a PAM/ISAM file).
If neither the E nor O option (Extend/Overwrite) is specified after the Write file name, then the following rules are valid:
If the Write file is being accessed for the first time in this current CFS run, then it will always be opened in Overwrite mode, i.e. the file will be created, or overwritten.
If the same Write file is accessed by a succession of W / S...=W commands, then it will be opened as standard in Open=Extend mode.
The E/O option gives the user the chance of setting a different Open mode of operation to the standard.
ISAM file records with duplicate keys can be written away to the Write file if DUPKEY mode has been set (DUPK command). If DUPKEY mode is not set (standard), then only the last such duplicate key record will be saved in the Write file.
The DUPKEY mode that was in force at the time the Write file was opened (the first W command) will remain valid. Subsequently changing the DUPKEY mode will have no effect on the Write file until the Display mode is terminated with the K1 key, and then re-activated.
A sequential file can be sorted in ascending order of a particular key by using the Write command:
W9999,file2,FCBTYPE=ISAM,KEYPOS=kk,KEYLEN=ll
kk and ll define the key on which the records of the sequential file should be sorted. If multiple records exist with the same key data, then the DUPK command (see above) must be entered before the Write command. The ISAM file thus sorted according to the desired criteria can then be converted back to a SAM file. Converting a SAM file to an ISAM file with simultaneous sorting according to a particular key can also be achieved by the Variable Action ONXCONV.
The Write command is also intended to provide a means of merging multiple files/library elements to an output file.
Another simple method is to use the Variable Action ONXLIST, with the NH (No Header) option. For further information, see page 5-.
Example:
The following CFS procedure searches the current Display file for a record containg a freely definable string (&ITEM), and writes it, as well as n records before and m records after to the output file, &W-FILE.
*PROC N,(&ITEM,&W-FILE,&M,&N)
SR
*&NUM=&M+&N
*&NUM=&NUM+1
S,&ITEM
*IF &CFSMSG(1,20) -= '>> SYNTACTICAL ERROR' SKIP .LOOP
*WRITESYS '&CFSMSG'
*SKIP .END2
.LOOP
*IF &CFSMSG(53,3) = 'NOT' SKIP .END
-&M
W&NUM,&W-FILE
S
*SKIP .LOOP
.END
*K1
.END2
Write a Display Record to a CFS Procedure Variable
W, (&var) [ /[:col:] [ len] ]
The first record displayed is copied partially or in full to the specified CFS procedure variable .
:col: Only that part of the Display record from column :col: will be copied (the record begins at :1:).
Standard: The complete record is copied.
len Only len number of bytes are tranfered from the specified column/beginning of record.
Standard: The full length will be written i.e. up to the end of the record. The maximum record length is restricted to 80 bytes.
Editing ISAM Files of any Format
In Modify mode, ISAM files can be manipulated with extended functions - to some extent similarly to EDT. For example, records can be copied, deleted, joined or moved. Inserting and deleting column ranges, as well as splitting records is supported.
C | R | M Insert records into the copy buffer. Overwrite the first position of the ISAM key of the record to be processed with the character C (Copy), R (Retain) or M (Move). The rest of the key may not be amended. The total number of records currently in the copy buffer is displayed in the last line of the screen. When records are inserted in the copy buffer with C/M, it is cleared after each insert operation using B (Before) or A (After), as in EDT. Putting the records in the copy buffer with R (Retain) will prevent these records being erased from the buffer after each B or A insertion, and means they are available for further insertions. The contents of a copy buffer that has not been cleared down like this is still available, even after the file has been replaced.
* Reset copy buffer. Entering this character in the first position of an ISAM key will clear the copy buffer without a copy process having taken place.
A | B Insert the contents of the copy buffer before/after a record. Overwrite the first position of the ISAM key with B (Before) or A (After). The rest of the ISAM key may not be amended. The maximum number of records that may be inserted from the copy buffer is determined by the difference between the previous key and the next key. Thus between two records having keys of 00011100 and 00011200, a maximum of only 99 records may be inserted. If the records were placed in the copy buffer with M (Move), then for each record inserted, the original is deleted.
I[n][,len] Insert Empty Records. n blank records are inserted in front of the marked record. The single digit n must be placed directly behind the I marker. If no value is specified for n, then 9 records will be inserted. The len opton specifies the length of the record to be inserted, excluding the key. len must be separated from the rest of the ISAM key by a blank.
If no value is specified for len, then the standard value of len=72 will be used.
J Join Records. Overwrite the first position of the ISAM key with J (Join). The marked record will be appended to the end of the previous record. The ISAM key of the record marked with J will be removed. If multiple, sequential records are marked with J, then all these records will be appended to the previous record.
E Delete Records. Overwrite the first position of the ISAM key with E (Eliminate).
C Direct Copy of records using ISAM key. Overwrite the fist position of the ISAM key with C (Copy), and the rest of the key with the position to which the record should be copied. The first position of the ISAM key of the original record is taken over unchanged. The data of the record to be copied may not be amended at the same time.
M Direct Move of records using ISAM key. If ISAM keys are modified, this will cause the records to slot into that modified key position within the file.
Notes:
Leaving the Display mode will not cause the buffer to be flushed automatically. By marking records with C/R, it is therefore possible to copy records from one file to one or more others.
If the data is displayed in hexadecimal mode, then instead of the marker characters of C/A/B being used as described above, the equivalent hexadecimal values of X'C3'/X'C1'/X'C2' should be used instead. However, it is still possible to use the marker characters as usual in character format. To do this, put the required character in the first half-byte of the key, and a blank in the second half-byte.
Records already containing the characters C/A/B/... in the first position of their key may not be manipulated as described above. For this particular case, use the RD command (see below).
When effecting Move and Copy operations with modification of the key, the target key may not replicate the key of an existing record (DUPEKEY=NO). If duplicate keys are needed, the DUPK command may be executed, setting Dupkey mode on, and thus allowing duplicate keys during the Move and Copy operations.
It is not possible in either DUPK or NDUPK mode to to process the second, third, etc. records from a sequence of records with identical ISAM keys. In every case, only the first record of identical ISAM key records will be processed.
Redefine the Record Marker Character
The RD command can be used to redefine the marker symbols for processing ISAM keys.
keyword AFTER | BEFORE | CLEAR | COPY | ELIM | INSERT | JOIN | MOVE | RETAIN
The keyword implies the marker symbol to be amended.
x new value for the marker symbol. Any character capable of being typed on the keyboard may be used.
As standard, he following values are specified:
AFTER=A, BEFORE=B, CLEAR=*, COPY=C, ELIM=E, JOIN=J, INSERT=I, MOVE=M, RETAIN=R.
Example:
RD ELIM=D
The above command will redefine the marker character for deleting records from 'E' to 'D' (D=Delete).
Note:
Displaying and amending the current marker symbols can also be done in the SET mask (SET command).
Beginning with the first record displayed, the specified column range in n records is erased. The length of the records is reduced accordingly.
n Number of records: 1 <= n <= 99999.
The character '$' instead of a number n indicates the highest possible number 99999
Standard: n =1. The deletion is made from the first displayed record only.
:col: 1 <= col <= 32000 | col = $ (End of record).
first column to be deleted. If DEL..,:$:len is specified, the column range is deleted from the end of the record to the left, up to the length specified.
Standard: The area immediately to the right of the ISAM key is deleted (column :9: for files with KEYPOS=5 and KEYLEN=8).
len Length of the column range to be deleted from the specified start column col, or from the end of the record to the left (:$:).
Standard: len = 1.
Examples:
DEL 9999,:500:10
The 10 characters from column 50 to 59 in 9999 records (or to the end of the file) from the first record displayed are deleted.
DEL :$:10
The last 10 characters of the first record displayed are deleted.
ER [n] Eliminate Records. n records, beginning with the second record displayed, are deleted.
n Number of records to be deleted. Standard: n = 1.
The character '$' instead of a number n indicates the highest possible number 99999
Standard: n = 1.
ER key1-key2 All records with keys smaller than or equal to key2 are deleted, beginning with key1. The key may be specified in any one of the following ways: string | [C] 'string' | X'string'. The keys key1 and key2 do not have to be specified in their entirety. Only the unique portion of the required start and end keys needs to be specified. In this case, key1 will be padded to the right with low values (X'00') and key2 with high values (X'FF').
Examples:
ER
The second record in the display is deleted.
ER 999
999 records are deleted, beginning with the second record displayed.
ER 0003-01
All records whose key lies in the range between '0003*' and '01*' are deleted. * here represents a wildcard character to the end of the key.
ER X'AF'-X'AF'
All records whose key begins with X'AF' are deleted.
IL [n], [len] [item] Insert blank Lines. n empty records are inserted between the first and second displayed record.
n Number of records to be inserted. Standard: n = 1.
len Length of the data portion of the record to be inserted. The ISAM key and record length field are not included in the length of the data portion.
Standard: 72. Records of 72 data bytes are inserted.
item The record being inserted is filled with the specified string.
Standard: C'_'. A record consisting of blanks is inserted.
Examples:
IL 100,256C'0123456789'
100 records are inserted between the first and the second records in the display, if the difference between the two keys allows it. The length of the record will be determined by the length of the ISAM key, plus 4 bytes for the record length field, + 256 bytes of data. The 256 data bytes will contain the string C'0123456789'. This specified string will appear in the output record 25 times completely, and the first 6 bytes once.
IL ,80
A single record consisting of 80 blanks will be inserted after the first record in the display.
Insert Characters (Insert Columns)
The string item is inserted from column :col: to a length len in n records, beginning with the first record in the display.
n Number of records: 1 <= n <= 99999. Standard: n = 1. The insertion is performed only on the first record in the display. The character '$' instead of a number n indicates the highest possible number 99999
:col: 1 <= col <= 32000 | col = $ (End of the record).
Column from which the insertion should take place. If INS..., :$: ... is specified, the insertion will take place at the end of the record.
Standard: The insertion begins immediately after the ISAM key. This will be column :9: for files with KEYPOS=5 und KEYLEN=8.
len Length of the string to be inserted. Standard: len = length of the item, or len = 1 if item is not specified.
item String to be inserted: C'string' | X'string'. C'string' can also be abbreviated to 'string'. If item is shorter than len, then item will be repeated until it reaches the length specified in len. If item is longer than len, then only those first few positions of item will be inserted.
Standard: C'_', i.e. instead of a specific string, blanks will be inserted.
Examples:
INS 9999,:500:10 X'FF'
Beginning with the first record in the display, the character string X'FFFFFFFFFFFFFFFFFFFF' (=10X'FF') is inserted from column 500 in 9999 records, or to the end of the file.
INS :$:'1234567890'
The character string C'1234567890' is appended to the end of the first record in the display.
INS :20:10
10 spaces from the 20th column are inserted into the first record in the display.
Insert Records from a Second File
n records from the specified reference file are copied to the current Display file.
n Number of records to be copied. Standard: n = 1.
The character '$' instead of a number n indicates the highest possible number 99999
file Reference file from which the records should be copied. This file can be either SAM or ISAM format.
Standard: If file is not specified, the last reference file used is accessed.
params W | NW | K | KN | NK | B
or a combination of these values, separated by commas.
W Wrap. When the end of the reference file is reached, the internal pointer is reset to the beginning of the file. In this way, records from the reference file can be repeated in the Display file.
NW No Wrap. After reaching the end of the reference file, the internal pointer remains there. No additional records are copied to the Display file. The pointer can be reset to the beginning of the reference file with the B parameter (see below).
Standard: NW.
K Keys. This parameter may only be specified for a reference file with FCBTYPE= ISAM. CFS will insert the records from the reference file in the Display file according to their original key values (seeded insertion).
In K mode, records from the reference file with identical keys will overwrite those of the Display file.
A previously activated DUPK command in K mode will allow records from the reference file with identical keys to those in the Display file to be inserted (not overwritten). It is therefore possible to create records with identical ISAM keys in the Display file.
KN Keys No overwrite. Same function as K (see above), except that records from the reference file with identical keys to those in the Display file are not overwritten.
NK No Keys. The original ISAM keys from the reference file are not included in the insertion. The reference file will be treated as a sequential file. The records from the reference file will be inserted between the first and the second records currently displayed. New ISAM keys will be generated by CFS.
Standard: NK.
B Beginning. The reference file is read from the beginning again. This option should be used if the error message "EOF on source-file" is encountered.
Notes:
The IR command is the counterpart to the W command, or the Search command with Rewrite (S...=W...). Using the Write command, records in a particular format from a Display file may be written to an output file. After some additional processing of these records in the Write file, the IR command can be used to copy them back to the original file.
If both the Display and the IR files are ISAM files, then the KEYPOS and KEYLEN of both files must correspond.
When the end of the reference file is reached, the internal pointer remains there. The reference file will be re-read from the beginning by specifying IR [n],,B.
Leaving the Display mode does not close the reference file. Closing the reference file explicitly can be achieved by issuing a new IR command and specifying a non-existent file (e.g. *DUMMY).
Examples:
IR 9999,CFS.FIL1
A maximum of 9999 records from the file CFS.FIL1 are inserted between the first record displayed and the second. A restriction is that only so many records will be inserted as allowed by the number of free keys between the first and second records. If need be the insertion process is aborted with a DUPKEY error message.
IR 20,CFS.DAT2,W
Assuming that the reference file CFS.DAT2 contains only one record, then the above command will insert this record 20 times between the first and the second record being displayed.
IR 999,CFS.DAT3,K
It is assumed that the reference file CFS.DAT3 and the Display file are ISAM files with the same file format. As many records as appear in the file CFS.DAT3 will be transfered, with keys, up a a maximum of 999 (K option). If the file already contains records with these keys, then these records will be overwritten (only if NDUPK mode of CFS is switched on).
Merging of two sequential files.
In the output file, record 1 of file 1 should be followed by record 2 of file 2, and so on.
ONXCONV' '='.ISAM',FCBTYPE=ISAM,IK (IK: Insert Keys)
The sequential files 1 and 2 are first converted into ISAM files using the ONXCONV Variable Action.
Enter M as an Action Code for the first ISAM file (File-1). Set DUPKEY mode on with the DUPK command.
IR 9999,file-2,K
Records from the second ISAM file will be inserted into the first file according to the respective key positions.
ONXCONV'.ISAM'='.SAM',FCBTYPE=SAM,EK
Terminate the display of file 1 with K1 and convert it back to a sequential file. The ISAM keys will be deleted (EK).
A string 'ABC' in the keys should be replaced by 'XYZ' in an ISAM file with KEYPOS=10 and KEYLEN=20. The resulting records will be sequenced according to their new keys. This can be achieved as described below.
S9999,:6-13:'ABC'=W CFS.DAT3
S9999,:6-13:'ABC'=D
ONXCONV' '='.SAM',FCBTYP=SAM
S9999,:6-13:'ABC'='XYZ'
ONXCONV'.SAM'='',FCBTYP=ISAM,KEYPOS=10,KEYLEN=20
IR9999,CFS.DAT3,K
All records from a Display file containing the string 'ABC' will be transfered to the file CFS.DAT3. These records must them be deleted from the Display file, since they will be re-inserted into the file as a last step, but with different keys, and at different positions.
The file CFS.DAT3 can be processed separately. Keys may not be amended using Search and Replace in CFS Editor, since it is an ISAM file. This is only possible if the ISAM file is converted to a temporary sequential file, CFS.DAT3.SAM, and the ISAM key is then amended as normal data with Search and Replace. The sequential file is then converted back to an ISAM file with its original format. Bringing the file CFS.DAT3 into the original Display file is achieved with the command IR 9999,CFS.DAT3,K.
The next n records are split at column :col:, beginning with the first record displayed. The record portion to the right of :col: is created as a following record. A new key is generated for this record.
n Number of records: 1 <= n <= 99999. Standard: n = 1. Only the first record displayed is split.
The character '$' instead of a number n indicates the highest possible number 99999
:col: 1 <= col <= 32000
Column from which the record should be split. This column may not lie within the ISAM key.
R Repeat. The SPLIT command will be applied to a record until all record portions created have a length less than col.
Examples:
SPLIT 9999,:88:,R
Beginning with the first record displayed, the next 9999 records are split into record portions each 88 bytes long (including the ISAM key).
SPLIT :258:
The first record in the display is split into two records at column 258.
The Join command is the inverse of the Split command.
The next n records from the second in the display are processed as follows: if the ISAM key of the record lies within the step size (see below), then it will be appended to the previous record.
n Number of records: 1 <= n <= 99999. Standard: n = 1. Only one record is processed.
The character '$' instead of a number n indicates the highest possible number 99999
J=m m sequential records will be joined to make a single record.
step 0 | 10 | 100 | 1000 | 10000
The step value that the original ISAM keys would have had must be specified. See also the IS command on page 8-.
A record is regarded as lying within the step size and will be appended to the previous record if it's ISAM key
is equal to the key of the predecessor record (step=0)
has a value > 0 and < 10 in the last position (step=10)
has a value > 0 and < 100 in the last 2 positions (step=100)
has a value > 0 and < 1000 in the last 3 positions (step=1000)
has a value > 0 and < 10000 in the last 4 positions (step=10000).
If a record lies within the step size, then it is certain that it is a succeeding record created by a previous SPLIT command. The relationship to the main record is clearly established.
Note:
When processing an ISAM file that has been SPLIT into multiple smaller records in EDT or CFS Editor, the following should be noted: the ISAM key must not be amended, no new records should be inserted, and no records should be deleted. A totally successful JOIN of the split records can only be guaranteed if these conditions have been fulfilled.
Displaying and Editing with SHARUPD=YES
Files are normally processed in the Display/Modify mode of CFS with SHARUPD= NO. Entering the SR command (Single Record) will open the Display file with SHARUPD=YES. SR will also cause only one record/block to be displayed in the Display field. In this way, the integrity of the modified data is maintained for concurrent multiple access.
Opening a file with SHARUPD=YES for ISAM/PAM Display files will only be carried out if the file could not be opened in the normal Display mode because of a DVS error. If the file has already been opened in normal Display mode without an error, then the SR command will only become effective after the user switches to the BS2000 command mode ("/"), and then returns to CFS with /R.
Switching off the Single Record mode with the NSR command will re-open the Display file with SHARUPD=NO.
If the user wishes to view and perhaps amend the Display file in full screen mode simultaneously with SHARUPD=YES, then the NSR SHARUPD=YES command should be given.
SR mode is valid only for the current Display file, and must be re-issued for a new file if required.
Editing Sequential Files/Elements
Using the Modify command, all SAM files and sequential library elements may be modified on a byte by byte basis. Copying, deleting and inserting records, as well as inserting and deleting column ranges is not possible for SAM files in this mode. To achieve these extended editing operations, the sequential file/library element should first be converted to a temporary ISAM file. This is achieved with the IS command. The first should already be in Display mode (Action Code D).The IS command will automatically activate the Modify mode for the temporary ISAM file.
The temporary file can then be processed with any of the ISAM-specific commands described above.
Before leaving the CFS Editor (either via the LST or SAM command, or by pressing the K1 key), the temporary file will be converted back to its original format if the user answers Yes to the respective query. The temporary ISAM file will then be deleted. This automatic deletion can be suppressed by issuing a SAM,KEEP command.
CFS Display mode will also process tape files cataloged as FCBTYPE=SAM. The tape file should be selected into a file list, for example using the FCBTYPE:TAPE option. The Action Code D should then be entered for the required tape file. A Mount request will be issued at the console.
Uncataloged tape files can also be displayed. Proceed as follows:
1) /FILE file,LINK=DISP,FCBTYPE=SAM,VOLUME=..., DEVICE=..,STATE=FOREIGN
2) Select the file just cataloged into a file list. This is easiest achieved by entering the name directly into the FILENAME-SELECT field. Then enter the Action Code D in the respective field.
In the normal Display mode, the tape is rewound and re-read before each screen change that affects a record range already read (e.g. H, NH, DS, DW commands etc.). The tape will not be rewound if SR (Single Record) mode is set.
Using the W (Write) or S...=W (Search and Rewrite) commands, a selection of tape records can easily be transfered to a disk file.
Editing Tape Files
A tape file with FCBTYPE=SAM (Recform=V/F/U) can also be edited after converting it to a temporary ISAM file.
Procedure:
1) If the tape file is not yet cataloged, issue the following command:
/FILE file,LINK=DISP,FCBTYPE=SAM,VOLUME=..., DEVICE=..,STATE=FOREIGN
2) Select the file via the Selection mask, and enter Action Code D in the respective field.
3) Convert the tape file to a temporary ISAM file with the IS command.
4) The temporary file will automatically be displayed in Modify mode, and can then be processed with all the usual editing commands.
5) Convert the temporary ISAM file back to its original tape format after editing with the SAM command, or by pressing the K1 key.