Data Set Management Tools
This chapter describes the tools used for managing data sets.
1. Overview
The following is a list of tools for data set management.
Tool Name | Description |
---|---|
Copies a data set. |
|
Creates a new non-VSAM data set. |
|
Deletes an existing non-VSAM data set. |
|
Shows more detailed data set content and allows modification of data set content. |
|
Displays information about data sets on a specific volume. |
|
Exports a non-VSAM data set to a Unix file. This file can be used for backup purposes. |
|
Moves a data set. This tool can move a data set to a new volume while maintaining the data set name or it can change the data set name. |
|
Imports the Unix file created by dsload to a non-VSAM data set. |
|
Manages the OFM_BASE_ALLOC system table for the DCB struct, which is created when allocating a data set. |
|
Updates the statistic information or creation date of a data set stored in the catalog or VTOC. |
|
Shows data set content. |
|
Creates a new GDG base. |
|
Deletes an existing GDG base. |
|
Creates or deletes a VSAM data set or a user catalog. |
|
Displays information about the members registered to a catalog. |
|
Adds or removes locks from a data set, or displays information about the locks on a data set. |
|
Manages the status of an SMF data set. |
|
Provides Non-VSAM data editing functions. |
2. dscopy
The dscopy tool copies a data set to a specific volume with a specific name. Catalog and volume information can be specified using options when used to search for a source data set, target catalog, or volume information used to register a copied data set. If no option is specified, a master catalog or alias information is used to search for a source data set.
Usage
The dscopy tool can be invoked as follows:
Usage: dscopy [options] <source> <dest>
-
[options]
Option Description [-c catalog]
Catalog from which a source dataset is searched for.
[-v volume]
Serial number of the volume from which a source dataset is searched for. If specified, the -c option will be ignored and the copied data set registered in the catalog is not updated.
[-d catalog]
Catalog in which a copied dataset is registered. If not specified, the data set will be registered in the same catalog of the source data set.
[-t volume]
Serial number of the volume in which a copied dataset is located. If not specified, the dataset will be copied to a default volume.
-
Parameters
Parameter Description source
Source data set name.
dest
Copied data set name.
Examples
The following example copies a cataloged data set.
$ dscopy TEST.DSCOPY01 TEST.DSCOPY02
The information in TEST.DSCOPY01 before copying is as follows:
Data Set Name . . . : TEST.DSCOPY01 Data Set Type . . . : NONVSAM Catalog Name . . . : SYS1.MASTER.ICFCAT Management Class . : Creation Date . . : 2019/08/24 Data Set Owner . : ROOT Expiration Date . : ***None*** Storage Class . . . : Volume Serial . . : 100000 Device Type . . . : 3380 Data Class . . . . : Organization . . : PS Record Format . . : FB KEYLEN . . . . . : 0 Record Length . . : 80 KEYPOS . . . . . : 0 Block Size . . . : 4096 Current Allocation Primary Space . . : 2048(MB) Number of Extents : 0 Secondary Space . : 0(KB) Data Set Size . . : 0 Last Access Date Last Access Date : 2019/08/24 Last Access Time : 19:56:01
After dscopy, TEST.DSCOPY02 contains the following information.
Data Set Name . . . : TEST.DSCOPY02 Data Set Type . . . : NONVSAM Catalog Name . . . : SYS1.MASTER.ICFCAT Management Class . : Creation Date . . : 2019/08/24 Data Set Owner . : ROOT Expiration Date . : ***None*** Storage Class . . . : Volume Serial . . : 100000 Device Type . . . : 3380 Data Class . . . . : Organization . . : PS Record Format . . : FB KEYLEN . . . . . : 0 Record Length . . : 80 KEYPOS . . . . . : 0 Block Size . . . : 4096 Current Allocation Primary Space . . : 2048(MB) Number of Extents : 0 Secondary Space . : 4096(KB) Data Set Size . . : 0 Last Access Date Last Access Date : 2019/08/24 Last Access Time : 20:00:15
3. dscreate
The dscreate tool allows the user to create non-VSAM data sets with the required arguments.
Usage
The dscreate tool can be invoked as follows:
Usage: dscreate [options] dsname
-
[options]
Option Description [-c catalog]
Specifies the catalog where the new data set will be registered.
[-v volume]
Specifies the volume where the new data set will be located.
[-u unit]
Specifies the UNIT type of the new data set.
[-m member]
Specifies the member name of a PDS data set.
[-o dsorg]
Specifies the DSORG parameter of the data set.
[-f recfm]
Specifies the record format (RECFM) of the data set.
[-b blksize]
Specifies the block size of the data set.
[-l lrecl]
Specifies the record size of the data set.
[-k keylen]
Specifies the key length of the data set.
[-s space]
Specifies the space parameter of the data set.
-
[TRK|CYL|unit]: TRK, CYL, or a size unit.
-
dsorg PS
-s TRK,10,10
-s CYL,100,50
-
dsorg PO
-s TRK,10,10, 10
-s CYL,100,50,50
-
-
primary: Primary Space size.
-
secondary: Secondary Space size.
-
directory: Directory Space size.
[-p keypos]
Specifies the key position of the data set.
[-x expdt]
Specifies the expiration date of the data set (YYYYMMDD format).
[-r retpd]
Specifies the retention period of the data set (number of days).
[-dc retpd]
Specifies the sms data class. Data classes are defined in the DATACLAS section of the sms subject, under OpenFrame Configuration.
[-mc retpd]
Specifies the sms management class. Management classes are defined in the MGMTCLAS section of the sms subject, under OpenFrame Configuration.
[-sc retpd]
Specifies the sms storage class. Management classes are defined in the STORCLAS section of the sms subject, under OpenFrame Configuration.
[-N]
Adds the entry to VTOC to create a new data set without cataloging it (NOCATALOG option). If the entry already exists in catalog, an error occurs. This option cannot be specified with the [-R] (RECATALOG) option at the same time.
[-R]
Catalogs the data set without creating it (RECATALOG option). This option is used to re-register the existing entry in catalog, and so the entry should exist in the catalog. If not, an error occurs. This option cannot be specified with the [-N] (NOCATALOG) option at the same time.
To specify this option, a volume serial number must be specified using the -v option. Otherwise, an error will occur. If a data set with the same name already exists in the catalog, an error will occur if the data set is not the requested data set itself (e.g., a data set with the same name in another volume).
-
-
Parameters
Parameter Description dsname
Specifies the name of the data set to be created.
Examples
The following example creates a new data set on volume 100000.
$ dscreate AAA.BBB -v 100000 -f FB -l 120 -b 1200
The following example creates a data set and registers it to the catalog USERCAT.
$ dscreate AAA.BBB -c USERCAT -f FB -l 120 -v 100000
Configuration
To create a non-VSAM data set, set each VALUE of the DUPLICATE_MEMBER_ERROR, DUPLICATE_CATALOG_ERROR and RECAT_UPDATE_DSATTR keys in the DSCREATE section, from the dstool subject under OpenFrame Configuration.
$ ofconfig list -s dstool -sec DSCREATE ====================================================================================== SUBJECT | SECTION | KEY | VALUE ====================================================================================== dstool | DSCREATE | DUPLICATE_CATALOG_ERROR | YES | | DUPLICATE_MEMBER_ERROR | YES | | RECAT_UPDATE_DSATTR | YES ======================================================================================
For more information about OpenFrame Configuration, refer to OpenFrame Configuration Guide. |
4. dsdelete
The dsdelete tool is used to delete an existing non-VSAM data set. A catalog and volume in which a data set to delete is registered and located can be specified using options. If no option is specified, a master catalog or alias information is used to search for the data set.
Usage
The dsdelete tool can be invoked as follows:
Usage: dsdelete [options] dsname
-
[options]
Option Description [-c catalog]
Specifies the catalog where the data set to be deleted is registered.
[-v volume]
Specifies the volume where the data set to be deleted is located. If the data set is registered in a catalog, the catalog entry is not deleted.
[-m member]
Specifies the member name of a PDS data set.
[-U]
Does not delete the data set itself but just removes it from a catalog. (UNCATALOG option) If the UNCATALOG option is specified, information on the data set will remain only in VTOC. Thus, to use uncataloged data set, it is required to specify the volume to which the entry belongs.
-
Parameters
Parameter Description dsname
Specifies the name of a data set to be deleted.
Examples
The following example deletes a data set on volume 100000:
$ dsdelete AAA.BBB -v 100000
The following example uncatalogs a data set registered to a certain user catalog.
$ dsdelete AAA.BBB -c USERCAT
5. dsedit
The dsedit tool allows the contents of a data set to be not only displayed but also modified. Although the dsedit tool allows record modification, record addition and deletion are not permitted. During modification, dsedit requests an exclusive lock on the data set.
Usage
The dsedit tool can be invoked as follows:
Usage: dsedit [options] <dsname> [<member>] [-v <volser>] [-c <catalog>]
-
[options]
Option Description [-V]
Displays information on the dsedit version.
-
Parameters
Parameter Description dsname
Specifies the name of the data set to be modified.
[membe]
Specifies the member name of the data set to be modified.
[-v volser]
Modifies a data set located in the specified volume. If the data set is not registered in catalog, this option allows data sets listed in the specified volume directory to be viewed.
[-c catalog]
Indicates the catalog where the data set is registered. If aliases are configured for the user catalogs, then the high-level qualifier of the data set and the catalog where it is registered will match, and this option need not be used. For more information, refer to "Chapter 4.3. Managing Catalogs" in OpenFrame Data Set Guide.
-
Commands
The following commands can be used in dsedit.
Command Description <CTRL>+b
Moves to the previous page.
<CTRL>+f
Moves to the next page.
^
Moves to the first character of the line.
$
Moves to the last character of the line.
125G
Moves to the 125th line from the top.
:125
Moves to the 125th line from the top.
G
Moves to the last line.
h,j,k,l
Moves the cursor one character left, up, down, or right. By specifying a number in front of the command, the cursor is moved that many characters left, up, down or right. (E.g.: 5h – Moves the cursor five characters to the left.)
/abc
Searches for 'abc'.
/abc 5
Searches for 'abc' in the fifth line.
//616263
Searches by hexadecimal value.
n
Finds the next match.
:s/old/new
Replaces all old data with new in the record where the current cursor is located. The following describes syntax of the replacement command.
:[%]s[x]/<Matching string>/<Replacement string>[/Replacement position]
-
%: Set this to replace from all the records in the data set. If not set, replacement will be performed only from the current record.
-
x: Set this to replace to a hexadecimal code.
-
Matching string: The matching string before replacement. If x is set, enter a hexadecimal code.
-
Replacement string: The string after replacement. If x is set, enter a hexadecimal code.
-
Replacement position: Set the record position to be replaced, in bytes. The number starts from 1. If the replacement position is not entered or 0 is entered, replacement will be performed for all records.
The constraints of the replacement command are as follows:
-
The lengths of matching string and replacement string must match.
-
For a hexadecimal character string, 2 characters must be entered per byte. Each byte must be entered as being attached without a blank space.
-
In the case of KSDS and ISAM data sets, most key parts will not be replaced.
-
For Non-VSAM in a variable format (VB), or VSAM data set that uses AIX PATH, the replacement function cannot be used.
-
Note that once the replacement command is executed, it cannot be canceled.
-
While entering the replacement command, modification is not possible. To change the command, enter the <ESC> key to cancel the command input and then enter a command again.
:s/old/new/5
Replaces old data that is located at the 5th byte of the record where the current cursor is located, with new data.
:%s/old/new
Replaces all old data with new from the whole records of the data set.
:sx/f1f1/e1e1
Replaces all the hexadecimal code 'f1f1' to 'e1e1' from the record where the current cursor is located.
R
Enters Replace mode. The key field of a VSAM data set cannot be changed.
ESC
Stores the modified contents.
Backspace
Reverts to the original contents.
<CTRL>+l
Refreshes the screen.
:h
Displays the dsedit help file.
:q
Quits dsedit.
-
Examples
The following example modifies the content of a member in a data set.
$ dsedit AAA.PDS TESTPGM
The following example modifies the content of a data set located in a specified volume.
$ dsedit AAA.BBB -v DEFVOL
The following example modifies a data set registered in the user catalog.
$ dsedit AAA.BBB -c USERCAT
Configuration
Perform the following in OpenFrame Configuration, to modify the content of a non-VSAM data set that has not been registered in the catalog.
-
Set the VALUE of the NOCATALOG_VIEW key in the DSVIEW section of the dstool subject.
$ ofconfig list -s dstool -sec DSVIEW -k NOCATALOG_VIEW ===================================================================================== SUBJECT | SECTION | KEY | VALUE ===================================================================================== dstool | DSVIEW | NOCATALOG_VIEW | YES =====================================================================================
-
If NOCATALOG_VIEW is set to YES without the -v option being specified, search for the data set in the volume specified to the DEFAULT_VOLSER key in the DATASET_DEFAULT section of the ds subject.
$ ofconfig list -s ds -sec DATASET_DEFAULT -k DEFAULT_VOLSER ===================================================================================== SUBJECT | SECTION | KEY | VALUE ===================================================================================== ds | DATASET_DEFAULT | DEFAULT_VOLSER | DEFVOL =====================================================================================
For more information about OpenFrame Configuration, refer to OpenFrame Configuration Guide. |
6. dslist
The dslist tool is used to retrieve information about data sets that are located on a specific volume or registered in a specific catalog.
Depending on the parameters used, dslist provides information about a data set:
-
stored on a specific volume.
-
registered to a specific catalog.
-
matching specific criteria, such as creation date, last reference date or size.
Usage
The dslist tool can be invoked as follows:
Usage: dslist [options] [dsname]
-
[options]
Option Description [-c catalog]
Displays data sets registered to a specified catalog only.
[-v volume]
Displays data sets stored in a specified volume only.
[-n dsname]
Specifies the name of a data set to search for. This option is used to search for a single data set. When searching for multiple data sets, you cannot use wildcard characters. In this case, specify the names of the data sets to search for instead of using this option.
[-l]
Displays detailed information about the data set.
[-a]
Displays detailed information as well as the list of PDS members and catalog items related to the data set.
[-cd date]
Displays the list of data sets created on a specified date or period. The date or period can be specified in YYYYMMDD or YYYYMMDD-YYYYMMDD format.
[-rd date]
Displays the list of data sets referenced on a specified date. The date or period can be specified in YYYYMMDD or YYYYMMDD-YYYYMMDD format.
[-sz size]
Specifies the size range of data sets to search for, from MIN to MAX.
-
Parameters
Parameter Description [dsname]
Searches for data set names that start with this keyword. Wildcard characters can be used. When searching for a data set, wildcard characters can be used as follows:
-
AAA.* finds all two-qualifier data sets with the first-level qualifier AAA, such as AAA.BBB or AAA.CCC.
-
AAA.** finds all data sets that start with AAA, such as AAA.BBB, AAA.CCC, AAA.BBB.FFF, and AAA.BBB.GGG.
-
To search for a data set from the volume directory, you must enclose the name keyword with single quotation marks.
$ dslist 'AAA.**'
-
Examples
The following example searches for the information about data sets stored in the volume 100000.
$ dslist -v 100000
The dslist tool displays the following.
Print Dataset List and Information ----------------------------------------------------------------------------- SYS1.VTOC.V100000 VOLUME DSORG RECFM LRECL ----------------------------------------------------------------------------- PROD.BATCHLIB 100000 PO LB 32760 SMLOG.N1 100000 PS VB 32760 SMLOG.N2 100000 PS VB 32760 SMLOG.N3 100000 PS VB 32760 SMLOG.N4 100000 PS VB 32760 SYS1.COBLIB 100000 PO LB 32760 SYS1.JCLLIB 100000 PO LB 32760 SYS1.PARMLIB 100000 PO LB 32760 SYS1.PROCLIB 100000 PO LB 32760 SYS1.TEMPLIB 100000 PO LB 32760 SYS1.TSOLIB 100000 PO LB 32760 SYS1.TSOMAP 100000 PO LB 32760 SYS1.USERLIB 100000 PO LB 32760 ----------------------------------------------------------------------------- * Total 13 entries in volume 100000 printed.
The following describes items of information.
Item | Description |
---|---|
Catalog name |
Name of a data set registered in the catalog. |
VOLUME |
Serial number of the volume where the data set exists. |
DSORG |
Structure of the data set. |
RECFM |
Format of records of the data set. |
LRECL |
Length of records of the data set. |
For more information about a data set structure for DSORG and record format for RECFM, refer to "Chapter 2. Non-VSAM Data Sets" in OpenFrame Data Set Guide. |
The following example searches for detailed information about all data sets with names starting with SYS1, from the volume 10000.
$ dslist -v 100000 SYS1.** -a
The dslist tool displays the following.
Print Dataset List and Information ----------------------------------------------------------------------------- Data Set Name . . . : SYS1.JCLLIB Data Set Type . . . : NONVSAM Management Class . : Creation Date . . : 2019/12/21 Data Set Owner . : ROOT Expiration Date . : ***None*** Storage Class . . . : Volume Serial . . : DEFVOL Device Type . . . : 3380 Data Class . . . . : Organization . . : PO Record Format . . : LB KEYLEN . . . . . : 0 Record Length . . : 32760 KEYPOS . . . . . : 0 Block Size . . . : 32768 Current Allocation Primary Space . . : N.A. Number of Extents : Secondary Space . : N.A. Data Set Size . . : 0 Last Access Date Last Access Date : ***None*** Last Access Time : 17:45:38 Members ------------------------------------------------------------------ Name Owner Size Last Access Date ------------------------------------------------------------------ TSTENV 73 2019/12/21 17:45:39 TSTSLEEP 83 2019/12/21 17:45:39 ----------------------------------------------------------------------------- Data Set Name . . . : SYS1.PROCLIB Data Set Type . . . : NONVSAM Management Class . : Creation Date . . : 2019/12/21 Data Set Owner . : ROOT Expiration Date . : ***None*** Storage Class . . . : Volume Serial . . : DEFVOL Device Type . . . : 3380 Data Class . . . . : Organization . . : PO Record Format . . : LB KEYLEN . . . . . : 0 Record Length . . : 32760 KEYPOS . . . . . : 0 Block Size . . . : 32768 Current Allocation Primary Space . . : N.A. Number of Extents : Secondary Space . : N.A. Data Set Size . . : 0 Last Access Date Last Access Date : ***None*** Last Access Time : 17:45:38 Members ------------------------------------------------------------------ Name Owner Size Last Access Date ------------------------------------------------------------------ INITPROC 516 2019/12/21 17:45:39 ----------------------------------------------------------------------------- * Total 2 entries in volume 100000 printed.
The following describes items of information.
Item | Description |
---|---|
Data set Name |
Data set name. |
Data set Type |
Data set type. For more information about data set types, refer to "Chapter 1. Data Set Overview" in OpenFrame Data Set Guide. |
Management Class |
Management class to which the data set belongs. |
Creation Date |
Data set creation date. |
Expiration Date |
Data set expiration date. |
Data Set Owner |
Data set owner ID. |
Storage Class |
Storage class to which the data set belongs. |
Volume Serial |
Serial number of the volume on which the data set is stored. |
Device Type |
Device type of the data set. |
Data Class |
Data class to which the data set belongs. |
Organization |
Data set structure. For more information about data set structure and record format, refer to "Chapter 2. Non-VSAM Data Sets" in OpenFrame Data Set Guide. |
KEYLEN |
Key length for ISAM data sets. |
KEYPOS |
Starting position of the key for ISAM data sets. |
Record Format |
Record format of the data set. |
Record Length |
Record length of the data set. |
Block Size |
Block size of the data set. |
Primary Space |
Size of the primary space allocated in the data set. |
Secondary Space |
Size of the secondary space allocated in the data set. |
Number of Extents |
Number of available extents of the data set. |
Data set Size |
Physical size of the data set in bytes. |
Last Access Date |
Last date when the data set was accessed. |
Last Access Time |
Last time when the data set was accessed. |
7. dsload
The dsload tool, a complement to the dsedit tool, allows non-VSAM data sets to be exported to a Unix file for backup purposes. This backup file can be opened, modified and then imported into a data set using the dssave tool.
A related tool program is dssave. |
Usage
The dsload tool can be invoked as follows:
Usage: dsload <dsname> [options]
-
Parameters
Parameter Description dsname
Specifies the name of the data set to be exported.
-
[options]
Option Description [-v volser]
Specifies the serial number of the volume in which a data set to be exported exists.
[-c catalog]
Indicates the catalog where the data set is registered. If aliases are configured for the user catalogs, then the high-level qualifier of the data set and the catalog where it is registered will match, and this option need not be used.
[-m member]
Specifies an optional member of the data set to be exported.
[-t target]
Specifies the Unix path of the backup file to be created. If unspecified, the directory listed in LOAD_DIR will be used as the file path, and the data set name will be used for the file name.
[-d delimiter]
Specifies the delimiter to be used between records in a data set. To use the newline character, 'NEWLINE' should be specified. If unspecified, the DELIMITER setting in ds.conf will be used.
[-F]
If the specified file already exists, this option will cause it to be overwritten.
Examples
The following example backs up a data set as a Unix file.
$ dsload AAA.BBB
The following example backs up a data set member as a Unix file.
$ dsload AAA.PDS -m MEMBER01
The following example backs up a data set registered on the user catalog as a Unix file.
$ dsload AAA.BBB -c USERCAT
The following example overwrites an already existing Unix file.
$ dsload AAA.BBB –F
The following example backs up a data set as a Unix file and delimiting each of its record by '%%'.
$ dsload AAA.BBB -d %%
Configuration
Perform the following configuration in the DSLOAD section of the dstool subject, under OpenFrame Configuration.
-
Specify the VALUE of the DELIMITER key with characters or as 'NEWLINE', for the delimiter between records in the data set. If neither DELIMITER key nor the [-d delimiter] option is specified, the delimiter is set to NULL.
$ ofconfig list -s dstool -sec DSLOAD -k DELIMITER ====================================================================================== SUBJECT | SECTION | KEY | VALUE ====================================================================================== dstool | DSLOAD | DELIMITER | \r\n ======================================================================================
-
Specify the Unix directory path for the backup file to the VALUE of the LOAD_DIR key. If neither the LOAD_DIR key nor the [-t target] option is specified, an error occurs.
$ ofconfig list -s dstool -sec DSLOAD -k LOAD_DIR ====================================================================================== SUBJECT | SECTION | KEY | VALUE ====================================================================================== dstool | DSLOAD | LOAD_DIR |/home/tmax/oframe_7_1/temp ======================================================================================
-
Specify the size limit of the data set to the VALUE of the SIZE_LIMIT key. Only a data set that is smaller than the specified size can be used. Specify a number that is greater than 0, in bytes.
$ ofconfig list -s dstool -sec DSLOAD -k SIZE_LIMIT ====================================================================================== SUBJECT | SECTION | KEY | VALUE ====================================================================================== dstool | DSLOAD | SIZE_LIMIT | 1000000 ======================================================================================
For more information about OpenFrame Configuration, refer to OpenFrame Configuration Guide. |
8. dsmove
The dsmove tool allows data sets to be moved to a new volume or to be renamed. The catalog and volume used to search for a source data set, the volume to which the data set is moved, and the catalog to new register can be specified using these options. If no option is specified, a master catalog or alias information will be used to search for a source data set. The creation date of the moved data set is the same as that of the source data set.
Usage
The dsmove tool can be invoked as follows:
Usage: dsmove [options] <source> <dest>
-
[options]
Option Description [-c catalog]
Specifies the catalog from which a source data set is searched for.
[-v volume]
Specifies the serial number of the volume from which a source data set is searched for. If specified, the -c option will be ignored and the source data set and a moved data set registered in the catalog will not be updated.
[-t volume]
Serial number of the volume in which the moved data set is located. If not specified, the data set will be moved to the default volume.
[-d catalog]
Catalog to which a data set is moved. If not specified, the data set will be registered in the same catalog of the source data set.
-
Parameters
Parameter Description source
Specifies the source data set name. The data set is deleted when dsmove completes normally.
dest
Specifies the moved data set name.
Examples
The following example moves a data set to another volume without a name change.
$ dsmove TEST.DSMOVE01 TEST.DSMOVE01 -t 200000
Information about TEST.DSMOVE01 prior to the execution of dsmove is as follows:
Data Set Name . . . : TEST.DSMOVE01 Data Set Type . . . : NONVSAM Catalog Name . . . : SYS1.MASTER.ICFCAT Management Class . : Creation Date . . : 2019/02/03 Data Set Owner . : ROOT Expiration Date . : ***None*** Storage Class . . . : Volume Serial . . : 100000 Device Type . . . : 3380 Data Class . . . . : Organization . . : PS Record Format . . : FB KEYLEN . . . . . : 0 Record Length . . : 80 KEYPOS . . . . . : 0 Block Size . . . : 4096 Current Allocation Primary Space . . : 2048(MB) Number of Extents : 0 Secondary Space . : 0(KB) Data Set Size . . : 0 Last Access Date Last Access Date : 2019/02/03 Last Access Time : 12:56:46
Information about TEST.DSMOVE01 after the execution of dsmove is as follows:
Data Set Name . . . : TEST.DSMOVE01 Data Set Type . . . : NONVSAM Catalog Name . . . : SYS1.MASTER.ICFCAT Management Class . : Creation Date . . : 2019/02/03 Data Set Owner . : ROOT Expiration Date . : ***None*** Storage Class . . . : Volume Serial . . : 200000 Device Type . . . : 3380 Data Class . . . . : Organization . . : PS Record Format . . : FB KEYLEN . . . . . : 0 Record Length . . : 80 KEYPOS . . . . . : 0 Block Size . . . : 4096 Current Allocation Primary Space . . : 2048(MB) Number of Extents : 0 Secondary Space . : 4096(KB) Data Set Size . . : 0 Last Access Date Last Access Date : 2019/02/03 Last Access Time : 12:58:43
The volume of the data set TEST.DSMOVE01 is changed from 100000 to 200000.
The following example renames a data set.
$ dsmove TEST.DSMOVE02 TEST.DSMOVE03
Information about TEST.DSMOVE02 prior to the execution of dsmove is as follows:
Data Set Name . . . : TEST.DSMOVE02 Data Set Type . . . : NONVSAM Catalog Name . . . : SYS1.MASTER.ICFCAT Management Class . : Creation Date . . : 2019/02/03 Data Set Owner . : ROOT Expiration Date . : ***None*** Storage Class . . . : Volume Serial . . : 200000 Device Type . . . : 3480 Data Class . . . . : Organization . . : PS Record Format . . : FB KEYLEN . . . . . : 0 Record Length . . : 80 KEYPOS . . . . . : 0 Block Size . . . : 4096 Current Allocation Primary Space . . : N.A. Number of Extents : N.A. Secondary Space . : N.A. Data Set Size . . : 0 Last Access Date Last Access Date : 2019/02/03 Last Access Time : 13:04:40
The TEST.DSMOVE02 data set is deleted, and the TEST.DSMOVE03 data set is created. Information about TEST.DSMOVE03 is as follows:
Data Set Name . . . : TEST.DSMOVE03 Data Set Type . . . : NONVSAM Catalog Name . . . : SYS1.MASTER.ICFCAT Management Class . : Creation Date . . : 2019/02/03 Data Set Owner . : ROOT Expiration Date . : ***None*** Storage Class . . . : Volume Serial . . : 100000 Device Type . . . : 3380 Data Class . . . . : Organization . . : PS Record Format . . : FB KEYLEN . . . . . : 0 Record Length . . : 80 KEYPOS . . . . . : 0 Block Size . . . : 4096 Current Allocation Primary Space . . : 4096(KB) Number of Extents : 0 Secondary Space . : 4096(KB) Data Set Size . . : 0 Last Access Date Last Access Date : 2019/02/03 Last Access Time : 13:05:16
In the previous example, the data set is renamed as TEST.DSMOVE03 and registered to the default volume.
9. dssave
The dssave tool is a complement to the dsedit tool. It updates an existing non-VSAM data set with contents of a Unix file. dssave does not create a new data set, but overwrites an existing data set in a catalog.
A related tool program is dsload. |
Usage
The dssave tool can be invoked as follows:
Usage: dssave <dsname> [options]
-
Parameters
Parameter Description dsname
Specifies the name of the data set where a file will be imported.
-
[options]
Option Description [-c catalog]
Indicates the catalog where a data set is registered. If aliases are configured for user catalogs, then the high-level qualifier of the data set and the catalog where it is registered will match, and this option will not need to be used.
[-v volser]
Indicates the serial of the volume where information will be imported.
[-m member]
Indicates the optional member of a data set where information will be imported.
[-s source]
Specifies the Unix file path of the source file. If unspecified, the directory specified in LOAD_DIR under OpenFrame Configuration will be used as a base path.
[-d delimiter]
Indicates the delimiter used between records in a data set where the file will be imported. If records will be separated by a new line character, specify as 'NEWLINE'. If unspecified, the VALUE of the DELIMITER key in OpenFrame Configuration will be used.
[-B blank]
If the record format (RECFM) of a target data set is FB (Fixed Block) and the record length of the source file is shorter than that of the target file, white space will be inserted to fill up the block size.
[-R remove]
Deletes a source file after it is imported into a data set.
[-T test]
Checks the record length, format and delimiter of a source file to verify whether the source file can be loaded to a data set.
Examples
The following example imports a Unix file into a non-VSAM data set.
$ dssave AAA.BBB
The following example imports a Unix file into a non-VSAM data set member.
$ dssave AAA.PDS -m MEMBER01
The following example imports a Unix file into a non-VSAM data set registered in the user catalog.
$ dssave AAA.BBB -c USERCAT
The following example specifies the delimiter between records of a data set as '%%'.
$ dssave AAA.BBB -d %%
The following example pads the insufficient record length with spaces, when importing a Unix file into a non-VSAM data set whose RECFM is set to FB.
$ dssave AAA.BBB –B
The following example deletes the source file after importing the Unix file into a data set.
$ dssave AAA.BBB –R
The following example verifies whether a Unix file can be imported into a data set.
$ dssave AAA.BBB -T
Configuration
Perform the following configuration in the DSLOAD section of the dstool subject, under OpenFrame Configuration.
-
Specify the VALUE of the DELIMITER key with characters or as 'NEWLINE', for the delimiter between records. If neither DELIMITER key nor the [-d delimiter] option is specified, the delimiter is set to NULL.
$ ofconfig list -s dstool -sec DSLOAD -k DELIMITER ====================================================================================== SUBJECT | SECTION | KEY | VALUE ====================================================================================== dstool | DSLOAD | DELIMITER | \r\n ======================================================================================
-
Specify the Unix directory path for the source file to the VALUE of the LOAD_DIR key. If neither the LOAD_DIR key nor the [-s source] option is specified, an error occurs.
$ ofconfig list -s dstool -sec DSLOAD -k LOAD_DIR ====================================================================================== SUBJECT | SECTION | KEY | VALUE ====================================================================================== dstool | DSLOAD | LOAD_DIR | /home/tmax/oframe_7_1/temp ======================================================================================
For more information about OpenFrame Configuration, refer to OpenFrame Configuration Guide. |
10. dsrdb
The dsrdb tool searches for or deletes information about the OFM_BASE_ALLOC system table, a storage for the Data Control Block (DCB) struct, which is created during a data set allocation.
After data sets are allocated, the list of allocated data sets is recorded and programmed to be automatically reused. There may be some unnecessary lists remaining after an abnormal system shutdown, and if too many unnecessary lists exist in the allocation table, a DSALC_ERR_NO_AVAILABLE_SLOT error may occur. This error can be resolved by deleting any unused space allocated for data sets through the dsrdb tool, or by simply restarting OpenFrame. If an abnormal shutdown occurs frequently because of system instability, or OpenFrame is operated for a prolonged duration without being restarted, it is recommended to check the allocated data sets list occasionally. |
Usage
The dsrdb tool can be invoked as follows:
Usage: dsrdb command [options]
-
Parameters
Parameter Description command
-
list: Displays the list of allocated data sets.
-
delete: Unallocates and deletes data sets from the list.
-
-
[options]
Option Description [-a]
Displays detailed information stored in the shared memory.
[-i index]
Specifies the index of the shared memory to search for or delete.
[-r from to]
Specifies the range of shared memories to search for or delete.
[-d date]
Specifies the allocation date of the shared memory to search for or delete.
[-j jobid]
Specifies the job ID of the shared memory to search for or delete.
[-p pid]
Specifies the PID of the shared memory to search for or delete.
[-n name]
Specifies the name of a data set in the shared memory to search for or delete.
[all]
Deletes all allocated data sets lists. This option can be used only through the delete command.
Examples
The following example searches for the list of shared memories used for data set allocation.
$ dsrdb list
The previous program prints the following list.
Dataset allocation table Slot Mangement Program [000000] JOBID=,DATE=20191209,PID=26446,DCB_NAME=SYS1.MASTER.ICFCAT:SMLOG.N1 *** Total 1 allocation items printed.
11. dstouch
The dstouch tool updates record statistic information (total record count, data set size) or the creation date of a data set. If actual data set statistics are different from the values stored in the catalog, the catalog values will be updated with the new information.
Usage
The dstouch tool can be invoked as follows:
Usage: dstouch dsname [member] [-v volser] [-c catalog] [-d date]
-
Parameters
Parameter Description dsname
Specifies the name of the data set to update. In the case of a PDS, only the PDS information is updated of no member is specified.
[member]
Specifies the optional member of the data set to update
[-v volser]
Specifies the volume where the data set is located. This option must be used if the data set is not registered to a catalog.
[-c catalog]
Indicates the catalog where the data set is registered. If aliases are configured for the user catalogs, then the high-level qualifier of the data set and the catalog where it is registered will match, and this option need not be used. For more information, refer to "Chapter 4. Managing Catalogs" in OpenFrame Data Set Guide.
[-d date]
Specifies the creation date of the data set to update. (YYYYMMDD)
Examples
The following example updates the record count of a cataloged data set, TEST.AAA.
$ dstouch TEST.AAA
The following example updates the information of a cataloged PDS, TEST.BBB.
$ dstouch TEST.BBB
The following example updates the information of MEMBER01 of a cataloged PDS, TEST.CCC.
$ dstouch TEST.CCC MEMBER01
The following example updates the record count of a data set TEST.DDD, which is registered in the user catalog USERCAT.
$ dstouch TEST.DDD -c USERCAT
The following example updates the record count of a data set TEST.EEE, and modifies the creation date to April 30, 2007.
$ dstouch TEST.EEE -d 20070430
For more information about data sets, refer to OpenFrame Data Set Guide. |
12. dsview
The dsview tool displays the contents of a data set. It also provides the function of searching for a particular character and hex codes.
Usage
The dsview tool can be invoked as follows:
Usage: dsview [options] <dsname> [<member_name>] [-v <volser>] [-c <catalog>]
-
[options]
Option Description [-V]
Displays information on the dsview version.
[-n]
Views a data set without locking it. While the user views a data set, another user can modify the data set.
-
Parameters
Parameter Description dsname
Specifies the name of the data set to be viewed.
[member_name]
Specifies an optional member name to be viewed within the data set.
[-v volser]
Specifies the volume serial of the data set to be searched. When the data set is not registered in the catalog, you can use this option to view the data set that exists in the specified volume directory.
[-c catalog]
Displays a data set which is registered in the user catalog. When the data set has an alias in the user catalog, this option is unnecessary.
[-fn,--from N]
Specifies the starting record number. It starts from 1.
[-tn,--to N]
Specifies the ending record number. It starts from 1, and it must be grater than the specified value when used with '--from'.
For more information, refer to "Chapter 4.3 Managing Catalogs" in OpenFrame Data Set Guide.
-
Commands
The following commands can be used in dsview:
Command Description <CTRL>+b
Moves to the previous page.
<CTRL>+f
Moves to the next page.
^
Moves to the first character of the line.
$
Moves to the last character of the line.
125G
Moves to the 125th line from the top.
:125
Moves to the 125th line from the top.
G
Moves to the last line.
h,j,k,l
Moves the cursor one character left, up, down, or right. By specifying a number in front of the command, the cursor is moved that many characters left, up, down or right. (E.g.: 5h – Moves the cursor five characters to the left.)
/abc
Searches for 'abc'.
/abc 5
Searches for 'abc' in the fifth line.
//616263
Searches by hexadecimal value.
n
Finds the next match.
N
Finds a previous match.
<CTRL>+l
Refreshes the screen.
:h
Displays the dsview help file.
:q
Quits dsview.
Examples
The following example displays the content of a member of a data set.
$ dsview AAA.PDS TESTPGM
The following example displays the content of a data set located in a specified volume.
$ dsview AAA.BBB -v DEFVOL
The following displays the content of a data set registered in the user catalog.
$ dsview AAA.BBB -c USERCAT
Configuration
Perform the following in OpenFrame Configuration to view the content of a non-VSAM data set that is not registered in the catalog.
-
Specify the VALUE of the NOCATALOG_VIEW key in the DSVIEW section of the dstool subject.
$ ofconfig list -s ds -sec DATASET_DEFAULT -k DEFAULT_VOLSER ===================================================================================== SUBJECT | SECTION | KEY | VALUE ===================================================================================== ds | DATASET_DEFAULT | DEFAULT_VOLSER | DEFVOL =====================================================================================
-
If NOCATALOG_VIEW=YES, and the -v option is not specified, search for the data set from the volume specified to the DEFAULT_VOLSER key in the DATASET_DEFAULT section of the ds subject.
$ ofconfig list -s ds -sec DATASET_DEFAULT -k DEFAULT_VOLSER ===================================================================================== SUBJECT | SECTION | KEY | VALUE ===================================================================================== ds | DATASET_DEFAULT | DEFAULT_VOLSER | DEFVOL =====================================================================================
|
13. gdgcreate
The gdgcreate tool creates a new generation data group (GDG) using user specified options.
Usage
The gdgcreate tool can be invoked as follows:
Usage: gdgcreate [options] gdgname
-
[options]
Option Description [-c catalog]
Specifies the catalog where the new GDG base will be registered.
[-l limit]
Specifies the GDG LIMIT value. If unspecified, the value defaults to 255.
[-x expdt]
Specifies the expiration date of the GDG (YYYYMMDD format).
[-E empty]
Specifies the scope of removing GDS associations from the cataloged GDG base whenever the GDG limit is exceed while creating the GDS.
-
EMPTY: Removes all GDS associations except for the latest one from the GDG base.
-
NOEMPTY: Remove all GDS associations except for the oldest one from the GDG base (default value).
[-S scratch]
Deletes physically a GDS, whose associations have been removed from the GDG base of the catalog, according to the EMPTY/NOEMPTY options.
[-NS noscratch]
Recatalogs a GDS, whose associations have been removed from the GDG base of the catalog, as a non-VSAM data set, according to the EMPTY/NOEMPTY options.
-
-
Parameters
Parameter Description gdgname
Specifies the name of the GDG base to create.
Examples
The following example creates a GDG base, whose GDG LIMIT is set to 12.
$ gdgcreate TEST.GDGBASE -l 12
The following example registers a GDG base to the user catalog.
$ gdgcreate TEST.GDGBASE -c USERCAT
14. gdgdelete
The gdgdelete tool deletes an existing GDG base.
Usage
The gdgdelete tool can be invoked as follows:
Usage: gdgdelete [options] gdgname
-
[options]
Option Description [-c catalog]
Specifies the catalog where the GDG base to be deleted is registered.
[-F]
Deletes the GDG base, and all related GDS (FORCE option).
-
Parameters
Parameter Description gdgname
Specifies the name of the GDG base to be deleted.
Examples
The following example deletes a GDG base and its GDS.
$ gdgdelete TEST.GDGBASE -F
The following example deletes a GDG base registered to the user catalog.
$ gdgdelete TEST.GDGBASE -c USERCAT
15. idcams
The idcams tool enables a Unix shell to use IDCAMS commands.
Users can use idcams to create or delete VSAM data sets or user catalogs and copy data sets with the REPRO command.
|
Usage
The idcams tool can be invoked as follows:
Usage: idcams command [options]
-
Parameters
Parameter Description command
-
define: Defines a VSAM data set or user catalog..
-
delete: Deletes a VSAM data set or user catalog..
-
repro: Copies a VSAM or non-VSAM data set..
-
libgen: Regenerates shared object files of VSAM data set.
-
-
User catalog definition options
Option Description [-t type]
Indicates that a user catalog is defined. The type option can be specified without the preceding '-t'.
-
USERCATALOG
-
UCAT
[-n name]
Specifies the name of the user catalog to be defined.
[-v volume]
Specifies the volume where the user catalog will be located.
[-s space]
Specifies the space parameter of a data set.
-
[TRK|CYL|unit]: TRK, CYL, or a size unit.
-s TRK,10,10
-s CYL,100,50
-
primary: PRIMARY SPACE size.
-
secondary: SECONDARY SPACE size.
-
-
ALIAS definition options
Option Description [-t type]
Indicates that an alias is defined (ALIAS). The type option can be specified without the preceding '-t'.
-
ALIAS
[-n name]
Specifies the name of the alias to be defined.
[-r relate]
Specifies the name of a catalog item that will be linked to the alias.
-
-
VSAM data set definition options
Option Description [-t type]
Indicates that a VSAM data set is defined. The type option can be specified without the preceding '-t'.
-
CLUSTER
-
CL
[-n name]
Specifies the name of the VSAM data set to be defined.
[-o recorg]
Specifies the structure of the VSAM data set to be defined.
-
KS
-
ES
-
RR
[-v volume]
Specifies the volume where the VSAM data set will be located.
[-s space]
Specifies the space parameter of the data set.
-
[TRK|CYL|unit]
-
primary
-
secondary
[-c catalog]
Specifies the catalog where the data set will be registered.
[-l lrecl]
Specifies the record size of the VSAM data set (average, maximum).
[-k keys]
Specifies the key information about the VSAM data set (length, offset).
[-O occursbulk]
Specifies the OCCURS field as a single column.
-
-
Alternate index definition options
Option Description [-t type]
Indicates that an alternate index is defined. The type option can be specified without the preceding '-t'.
-
ALTERNATEINDEX
-
AIX
[-n name]
Specifies the name of the alternate index to be defined.
[-r relate]
Specifies the name of the base cluster to be linked to the alternate index.
[-v volume]
Specifies the volume where the alternate index will be located.
[-s space]
Specifies the space parameter of the alternate index.
-
[TRK|CYL|unit]
-
primary
-
secondary
[-c catalog]
Specifies the catalog where the alternate index will be registered.
[-l lrecl]
Specifies the record size of the alternate index (average, maximum).
[-k keys]
Reflects the alternate index key information of the base cluster (length, offset).
[-U]
Indicates whether the AIX key value is unique within the base cluster. (UNIQUEKEY attribute)
-
-
PATH definition options
Option Description [-t type]
Indicates that a path is defined. The type option can be specified without the preceding '-t'.
-
PATH
[-n name]
Specifies the name of the path to be defined.
[-p pathentry]
Specifies the name of the catalog entry that composes the path.
[-c catalog]
Specifies a catalog that contains VSAM data sets or alternate indexes.
-
-
Deletion options
Option Description [-n name]
Specifies the name of the entry to be deleted. The name option can be specified without the preceding '-n'.
[-t type]
Specifies the type of entry to be deleted.
-
ALIAS
-
AIX
-
CL
-
PATH
-
UCAT
[-c catalog]
Specifies the name of the catalog that contains the entry to be deleted.
[-F]
Force-deletes a non-empty entry (FORCE option).
-
-
REPRO options
Option Description [-i ids]
Specifies the name of the entry to be copied.
[-o ods]
Specifies the name of the target data set.
[-e elimit]
Specifies the number of errors to be enabled during REPRO.
[-f from]
Specifies the location to start copying from within a source data set.
[-t to]
Specifies the location to stop copying within the data set being copied.
[-r ridtype]
Specifies the method to select the 'from' value and 'to' value.
-
KEY
-
NUM
-
ADDR
[-s skip]
Specifies the number of records to be skipped before copying records.
[-c count]
Specifies the number of records to be copied.
[-R replace]
Specifies whether the records in the target data set will be replaced (REPLACE option).
[-C catalog]
Specifies the catalog in which the working file will be defined.
-
-
LIBGEN options
Option Description [-n name]
Specifies the name of the entry to regenerate the shared object files.
[-t type]
Specifies the type of entry to be deleted. Types can be specified without the -t option.
-
CL
-
AIX
-
IS
-
ALL
[-c catalog]
Specifies the catalog containing the entries to regenerate the shared object files.
[-v volume]
Specifies the volume containing the ISAM data set in which the shared object files will be regenerated. This option must be specified for an uncataloged ISAM.
-
Examples
The following example defines the user catalog USERCAT1 on volume 100000.
$ idcams define UCAT -n USERCAT1 -v 100000
The defined user catalog contains the following data (shown with listcat).
Data Set Name . . . : USERCAT1 Data Set Type . . . : UCAT Catalog Name . . . : SYS1.MASTER.ICFCAT Management Class . : Creation Date . . : 2019/08/25 Data Set Owner . : ROOT Expiration Date . : ***None*** Storage Class . . . : Volume Serial . . : 100000 Device Type . . . : 3380 Data Class . . . . : Organization . . : KSDS AVGLRECL . . . . : N.A. KEYLEN . . . . . : N.A. MAXLRECL . . . . : N.A. KEYPOS . . . . . : N.A. CISIZE . . . . . : N.A. AIXRKP . . . . . : N.A. Current Allocation Primary Space . . : 1024(KB) Number of Extents : 0 Secondary Space . : 1024(KB) Data Set Size . . : 0 Last Access Date Last Access Date : ***None*** Last Access Time : **None**
The following example defines an alias TEST which is linked to USERCAT1.
$ idcams define ALIAS -n TEST -r USERCAT1
The alias contains the following data (shown with listcat).
Entry Name . . . . : TEST Entry Type . . . . : ALIAS Catalog Name . . . : SYS1.MASTER.ICFCAT Associations UCAT . . . . . . : USERCAT1
The following example defines a KSDS named TEST.KSDS.
$ idcams define CLUSTER -n TEST.KSDS -o KS -k 15,0 -l 250,250
The following example defines an ESDS named TEST.ESDS.
$ idcams define CL -n TEST.ESDS -o ES -v 100000 -l 250,250
The ESDS contains the following data (shown with listcat).
Data Set Name . . . : TEST.ESDS Data Set Type . . . : CLUSTER Catalog Name . . . : USERCAT1 Management Class . : Creation Date . . : 2019/08/25 Data Set Owner . : ROOT Expiration Date . : ***None*** Storage Class . . . : Volume Serial . . : 100000 Device Type . . . : 3380 Data Class . . . . : Organization . . : ESDS AVGLRECL . . . . : 250 KEYLEN . . . . . : 0 MAXLRECL . . . . : 250 KEYPOS . . . . . : 0 CISIZE . . . . . : 4096 AIXRKP . . . . . : N.A. Current Allocation Primary Space . . : 1024(KB) Number of Extents : 0 Secondary Space . : 1024(KB) Data Set Size . . : 0 Last Access Date Last Access Date : ***None*** Last Access Time : **None**
The following example defines an alternate index named TEST.AIX in the TEST.ESDS data set.
$ idcams define AIX -n TEST.AIX -r TEST.ESDS -k 3,0 -l 40,50 -s TRK,20,10
The alternate index contains the following data (shown with listcat).
Data Set Name . . . : TEST.AIX Data Set Type . . . : AIX Catalog Name . . . : USERCAT1 Management Class . : Creation Date . . : 2019/08/25 Data Set Owner . : ROOT Expiration Date . : ***None*** Storage Class . . . : Volume Serial . . : 100000 Device Type . . . : 3380 Data Class . . . . : Organization . . : KSDS AVGLRECL . . . . : 40 KEYLEN . . . . . : 3 MAXLRECL . . . . : 50 KEYPOS . . . . . : N.A. CISIZE . . . . . : 4096 AIXRKP . . . . . : 0 Current Allocation Primary Space . . : 960(KB) Number of Extents : 0 Secondary Space . : 480(KB) Data Set Size . . : 0 Last Access Date Last Access Date : ***None*** Last Access Time : **None**
The following example defines a path named TEST.PATH in the TEST.AIX alternate index.
$ idcams define PATH -n TEST.PATH -p TEST.AIX -c USERCAT1
The path contains the following data (shown with listcat).
Entry Name . . . . : TEST.PATH Entry Type . . . . : PATH Catalog Name . . . : USERCAT1 Attributes Creation Date . . : 2019/08/25 Entry Owner . . . : ROOT Expiration Date . : ***None*** Associations AIX . . . . . . . : TEST.AIX
The following example deletes the TEST.KSDS data set registered to USERCAT1.
$ idcams delete TEST.KSDS -c USERCAT1
The following example deletes the USERCAT1 catalog.
$ idcams delete -n USERCAT1
The following example copies records from "AAAA" to "FFFF" key values in the TEST.ISAM data set into the TEST.KSDS data set.
$ idcams repro -i TEST.ISAM -o TEST.KSDS -f AAAA -t FFFF -r KEY
The following example regenerates the shared object files of TEST.KSDS.
$ idcams libgen CL -n TEST.KSDS
The following example regenerates the shared object files of TEST.AIX.
$ idcams libgen AIX -n TEST.AIX
The following example regenerates the shared object files of TEST.ISAM, which is registered in the catalog.
$ idcams libgen IS -n TEST.ISAM
The following example regenerates the shared object files of TEST.ISAM, which is not registered in the catalog.
$ idcams libgen IS -n TEST.ISAM -v DEFVOL
The following example regenerates the shared object files of all clusters, AIXs and ISAMs in the system.
$ idcams libgen ALL
16. listcat
The listcat tool displays information about entries registered to a certain catalog.
Usage
The listcat tool can be invoked as follows:
Usage: listcat [options] [entname]
-
[options]
Option Description [-c catalog]
Specifies the catalog to be searched. Only information about entries registered to the specified catalog will be displayed.
[-n entname]
Specifies an exact entry name to search for. This option is used to search for a single data set, and to search for multiple data sets, wildcard characters cannot be used. To do so, directly enter the entry name.
[-l]
Displays detailed information about the catalog entries.
[-a]
Displays detailed information about relevant catalog entries. For a PDS data set, a list of members is displayed.
-
Parameters
Parameter Description [entname]
Searches for entry names that start with this keyword. Wildcard characters can be used to search for an entry, as follows:
-
AAA.* finds all two-qualifier data sets with the first-level qualifier AAA, such as AAA.BBB or AAA.CCC.
-
AAA.** finds all data sets that start with AAA, such as AAA.BBB, AAA.CCC, AAA.BBB.FFF, and AAA.BBB.GGG.
-
To search for an entry from the volume directory, you must enclose the name keyword with single quotation marks.
$ listcat 'AAA.**'
-
Examples
The following example displays information about entries registered to the master catalog.
$ listcat -c SYS1.MASTER.ICFCAT
The results are printed as follows:
List Catalog Entry Information ----------------------------------------------------------------------------- SYS1.MASTER.ICFCAT VOLUME ENTTYPE VSAM NVSM ----------------------------------------------------------------------------- SYS1.DSLOCK.DATA 100000 CLUSTER KSDS SYS1.DSLOCK.LOG 100000 CLUSTER KSDS SYS1.JCLLIB 100000 NONVSAM PDS SYS1.JESST 100000 CLUSTER KSDS SYS1.JOBQ 100000 CLUSTER KSDS ... SYS1.VVDS.V100000 100000 CLUSTER ESDS SYS1.VVDS.V200000 200000 CLUSTER ESDS SYS1.VVDS.V300000 300000 CLUSTER ESDS ... TEST.DSCOPY01 100000 NONVSAM SDS TEST.DSCOPY02 100000 NONVSAM SDS TEST.GDGBASE ------ GDG TEST.GDGBASE.G0001V00 100000 NONVSAM GDS TEST.GDGBASE.G0002V00 100000 NONVSAM GDS ----------------------------------------------------------------------------- * Total 82 entries in catalog SYS1.MASTER.ICFCAT printed.
The following describes items of information.
Item | Description |
---|---|
Catalog Name |
Displays a list of names of the items registered in the catalog. |
VOLUME |
Displays the name of the volume where the searched item exists. |
ENTTYPE |
Displays the type of the searched item. For information about types related to ENTTYPE, refer to "Chapter 4. Integrated Catalog" in OpenFrame Data Set Guide. |
VSAM |
Displays the VSAM type of the searched item. For information about the VSAM types, refer to "Chapter 3. VSAM Data Sets" in OpenFrame Data Set Guide. |
NVSAM |
Displays the non-VSAM type of the searched item. For information about the non-VSAM types, refer to "Chapter 2. non-VSAM Data Sets" in OpenFrame Data Set Guide. |
The following example queries detailed information about the IYA.NONVSAM data set, which is registered to the IYA.UCAT user catalog.
$ listcat -c IYA.UCAT -l IYA.NONVSAM
The results are printed as follows:
List Catalog Entry Information ----------------------------------------------------------------------------- Data Set Name . . . : IYA.NONVSAM Data Set Type . . . : NONVSAM Catalog Name . . . : IYA.UCAT Management Class . : Creation Date . . : 2019/07/14 Data Set Owner . : ROOT Expiration Date . : ***None*** Storage Class . . . : Volume Serial . . : 100000 Device Type . . . : 3380 Data Class . . . . : Organization . . : PS Record Format . . : FB KEYLEN . . . . . : 0 Record Length . . : 80 KEYPOS . . . . . : 0 Block Size . . . : 4096 Current Allocation Primary Space . . : 2048(MB) Number of Extents : 0 Secondary Space . : 0(KB) Data Set Size . . : 0 Last Access Date Last Access Date : 2019/07/14 Last Access Time : 11:38:51 ----------------------------------------------------------------------------- * Total 1 entries in catalog IYA.UCAT printed.
The following example queries detailed information about the TEST.KSDS data set, which is VSAM.
$ listcat TEST.KSDS -l
The results are printed as follows:
List Catalog Entry Information ----------------------------------------------------------------------------- Data Set Name . . . : TEST.KSDS Data Set Type . . . : CLUSTER Catalog Name . . . : SYS1.MASTER.ICFCAT Management Class . : Creation Date . . : 2019/11/19 Data Set Owner . : NOUSER Expiration Date . : ***None*** Storage Class . . . : Volume Serial . . : DEFVOL Device Type . . . : 3380 Data Class . . . . : Organization . . : KSDS AVGLRECL . . . . : 21 KEYLEN . . . . . : 15 MAXLRECL . . . . : 21 KEYPOS . . . . . : 0 CISIZE . . . . . : 0 AIXRKP . . . . . : N.A. Current Allocation Primary Space . . : 0(KB) Number of Extents : 0 Secondary Space . : 0(KB) Data Set Size . . : 0 Last Access Date Last Access Date : 2019/11/19 Last Access Time : **None** ----------------------------------------------------------------------------- * Total 1 entries in catalog SYS1.MASTER.ICFCAT printed.
The following describes items of information.
Item | Description |
---|---|
Data set Name |
Displays the data set name. |
Data set Type |
Displays the data set type. For more information about data set types, refer to "Chapter 1. Data Set Overview" in OpenFrame Data Set Guide. |
Catalog Name |
Displays the name of the catalog to which the data set is registered. |
Management Class |
Displays the name of the management class to which the data set belongs. |
Creation Date |
Displays the creation date of the data set. |
Expiration Date |
Displays the expiration date of the data set. |
Data Set Owner |
Displays the owner ID of the data set. |
Storage Class |
Displays the name of the storage class to which the data set belongs. |
Volume Serial |
Displays the serial number of the volume of the data set. |
Device Type |
Displays the data set device type. |
Data Class |
Displays the name of the data class to which the data set belongs. |
Organization |
Displays the structure of the data set. For more information about data set structure and record format, refer to "Chapter 2. Non-VSAM Data Sets" and "Chapter 3. VSAM Data Sets" in OpenFrame Data Set Guide. |
KEYLEN |
Displays the length of the KEY if the data set is ISAM or KSDS. |
KEYPOS |
Displays the starting position of the KEY if the data set is ISAM or KSDS. |
Record Format |
Displays the record format of the data set. |
Record Length |
Displays the length of records for the data set. |
Block Size |
Displays the block size of the data set. |
Primary Space |
Displays the size of the primary space allocated to the data set. |
Secondary Space |
Displays the size of the secondary space allocated to the data set. |
Number of Extents |
Displays the number of extents for the data set. |
Data set Size |
Displays the physical size of the data set in bytes. |
Last Access Date |
Displays the last date when the data set was accessed. |
Last Access Time |
Displays the last time when the data set was accessed. |
17. lockm
The lockm tool displays information about locks on a data set to ensure exclusive access to a data set.
Usage
The lockm tool can be invoked as follows:
Usage: lockm command [options]
-
Parameters
Parameter Description command
-
lock: Locks a data set.
-
list: Displays the list of locks.
-
-
[options]
The following describes options for each command.
-
Lock
The lock name and lock type options are required.
Option Description [-n name]
Specifies the lock name. The name option must be specified.
[-t type]
Specifies the lock type.
-
EX
-
SHR
[-p pid]
Specifies the pid of a lock.
[-w time]
Specifies the wait option for a lock.
-
FOREVER
-
NOWAIT
[-c shell command]
Specifies a shell command to execute.
-
-
List
Option Description [-p pid]
Specifies an entry by owner PID.
[-n name]
Specifies an entry by name.
[-j jobid]
Specifies an entry by job ID.
[-t type]
Specifies an entry by type.
-
EX
-
SHR
[-nd node name]
Specifies an entry by node name.
-
-
Examples
The following example forces a lock on the TESTDS.TESTLOCK data set of the TESTCAT catalog.
$ lockm lock -n TESTCAT:TESTDS.TESTLOCK -t EX
The following example displays the list of locks currently managed by the system.
$ lockm list
The results are printed as follows:
Dataset Lock Token Management Program ----------------------------------------------------------------------------- PID NODENAME JOBID JOBNAME TYPE LOCKNAME ----------------------------------------------------------------------------- *6163 tp3lab SHR TEST.IMS43643.FIRST *6163 tp3lab EX TESTDS.TESTLOCK *30752 tp3lab dsview SHR TMAX.LOCK.TEST ----------------------------------------------------------------------------- * List command completed successfully.
The following describes items of information.
Item | Description |
---|---|
Option (Column 1, Column 2) |
|
PID |
Displays the process ID that locked the data set. |
NODENAME |
Displays the name of the node to which the process that locked the data set belongs. |
JOBID |
Displays the JOBID to which the process that locked the data set belongs. JOBID is allocated when JCL is performed in the Batch. |
JOBNAME |
Displays the name of the tool that locked the data set. |
TYPE |
Displays SHR (shared) or EX (exclusive) in the lock type. |
LOCKNAME |
Displays the name of lock. |
18. smfmgr
The smfmgr tool displays the status of SMF data sets and can manage the data sets.
-
Displaying current status of SMF data sets
There are three different states for SMF data sets, as follows:
Status Description F (FULL)
The data set is full. You can copy its contents by using the IFASMFDP utility (available in MVS only) before changing the status to E (Empty).
U (USING)
The data set is being used by SMF.
E (EMPTY)
The data set is empty and can be a target to switch to.
-
Switching an SMF data set.
SMF uses only one data set at a time. If an in-use data set becomes full, it is automatically switched out for an empty data set. To manually switch out a data set before it is full, use the SWITCH command of smfmgr.
Usage
The smfmgr tool can be invoked as follows:
Usage: smfmgr command [option]
-
Parameters
Parameter Description command
-
STATUS: Displays the status of SMF data sets.
-
Switches an SMF data set. The dsn option can be used to specify a target data set. If no dsn is specified, one of the empty data sets is chosen for the switch.
-
-
[options]
Option Description dsn
Specifies the name of a data set that the user will switch to with the SWITCH command. The status of this data set will change to USING. This option is only available when the SWITCH command is used.
Examples
The following example displays the status of SMF data sets:
$ smfmgr STATUS
The results are printed as follows: The SMLOG.DS1 and SMLOG.DS2 data sets are full, SMLOG.DS3 is in use, and SMLOG.DS4 is empty.
DSNAME STATUS -------------------------------------------------------------- SMLOG.DS1 F SMLOG.DS2 F SMLOG.DS3 U SMLOG.DS4 E
The following example switches an SMF data set from SMLOG.DS3 to SMLOG.DS4:
$ smfmgr SWITCH SMLOG.DS4
The command displays the following message.
SMF Dataset is switched to SMLOG.DS4
The results are printed as follows:
$ smfmgr STATUS DSNAME STATUS -------------------------------------------------------------- SMLOG.DS1 F SMLOG.DS2 F SMLOG.DS3 F SMLOG.DS4 U
Configuration and Initialization
To use the smfmgr tool, you need to set the configuration items in the smf subject under OpenFrame Configuration, and then initialize SMF.
-
SMF configuration
In OpenFrame Configuration, specify first the data set name to the KEYs in the DATASET section of the smf subject, and then set the available node name to VALUE (Currently only 'ALL' is available. If set to ALL, it can be used in all nodes.)
$ ofconfig list -s smf -sec DATASET ==================================================================================== SUBJECT | SECTION | KEY | VALUE ==================================================================================== smf | DATASET | NODE1.SMLOG1 | ALL | | NODE1.SMLOG2 | ALL | | NODE2.SMLOG1 | ALL | | NODE2.SMLOG2 | ALL | | SMLOG1.NODE1 | ALL | | SMLOG2.NODE2 | ALL | | SMLOG3.NODE3 | ALL | | SMLOG4.NODE4 | ALL ====================================================================================
For more information about OpenFrame Configuration, refer to OpenFrame Configuration Guide.
-
SMF initialization
The following are the steps of initializing SMF.
-
If SMF is running, shut it down with the following command.
tmdown -s ofrsmlog
-
Create all data sets described in the smf subject with the following attributes.
recfm=VB, lrecl=32760
-
Delete SMF_INFO in the $OPENFRAME_HOME/shared/SMF directory.
-
Start SMF with the following command.
tmboot -s ofrsmlog
-
19. spfedit
The spfedit tool is used to edit a non-VSAM data set with the following features.
-
Edits a non-VSAM data set such as SDS or PDS members (except for ISAM).
-
Inserts, copies, deletes, and moves a record in(to) a specified position.
-
Converts the contents of the data set into a HEX value.
-
Searches for and replaces a certain string.
-
Searches for a data set with filter keys and creates PDS members.
-
Sorts data set records.
-
Submits JCL batch jobs.
The spfedit tool provides the same interface and commands as those of the ISPF Editor for users who are more familiar to the ISPF Editor of IBM MVS. It also offers the use of vi commands for users who are accustomed to the Unix vi Editor. |
Usage
The spfedit tool can be invoked as follows:
Usage: spfedit [options] [dataset_name] [member_name]
-
[options]
Option Description [-V]
Displays the version information of spfedit.
[-h]
Displays the usage of spfedit.
[-b]
Opens a data set in read-only mode. It does not lock the data set, and it is impossible to edit or save the data set. A fixed amount of memory is used regardless of the data set size in read-only mode. TSAM and ISAM data sets can be opened only in read-only mode.
[-v volume_serial]
Specifies the volume serial of the data set to be edited if the data set is not registered in the catalog.
[-c user_catalog]
Specifies the user catalog of the data set to be edited if the data set is registered in the user catalog.
-
Parameters
Parameter Description [dataset_name]
Specifies the name of the data set to be edited. If the data set is PDS, it is required that its member names are specified. If the data set name is omitted, the screen for data set filtering search will appear.
[member_name]
Specifies a member name of a PDS data set.
Data Set Edit Screen
Enter commands in the line command field and primary command line.
The command entered in the line command field and the one entered in the primary command line are recognized as the line command and the primary command respectively. If they are entered at the same time, the primary command is used prior to the line command. For more information about each command, refer to Line Commands and Primary Commands.
The function keys of the data set edit screen are described in the following table.
Function key | Corresponding vi key | Description |
---|---|---|
<F1> |
Displays Help. |
|
<F2> |
Splits the screen into two. Pressing F2 again cancels the screen division. |
|
<F3> |
Saves the edited contents, and ends spfedit. |
|
<F5> |
Repeats the FIND command that was previously executed. |
|
<F6> |
Repeats the CHANGE command that was previously executed. |
|
<F7> |
<Ctrl>+<b>, <Page Up> |
Scrolls up the screen. |
<F8> |
<Ctrl>+<f>, <Page Down> |
Scrolls down the screen. |
<F9> |
Moves the cursor between split screens. |
|
<F10> |
Scrolls to the left. |
|
<F11> |
Scrolls to the right. |
|
<F12> |
Terminates spfedit without saving the edited contents. |
|
<Esc> |
Same as <F12>. |
|
<Home> |
Moves the cursor to the primary command line. |
|
<Insert> |
Changes the edit mode to INSERT or REPLACE The default is REPLACE. |
|
<Enter> |
Executes the entered command. |
|
<Tab> |
Moves the cursor to the next item. |
|
<End> |
Moves the cursor to the last column of the record. |
|
<Ctrl>+<A> |
Moves the cursor to the first column of the record. |
|
<Ctrl>+<L> |
Refreshes the screen. |
|
<Up arrow key> |
Moves the cursor to the previous record. If the cursor was on the first record of the screen, the screen will be scrolled up. |
|
<Down arrow key> |
Moves the cursor to the next record. If the cursor was on the last record of the screen, the screen will be scrolled down. |
If spfedit is executed without specifying a data set name or if the EDIT or BROWSE command is executed, the following data set filtering search screen will be displayed. If the data set edit screen is closed, the search screen will return. If a member name that does not exist in PDS is entered in the search screen, the edit screen will be displayed and a new member will be created.
The function keys of the data set filtering search screen are described in the following table.
Function key | Corresponding vi key | Description |
---|---|---|
<F1> |
Displays Help. |
|
<F7> |
<Ctrl>+<b>, <Page Up> |
Scrolls up the list of searched data sets. |
<F8> |
<Ctrl>+<f>, <Page Down> |
Scrolls down the list of searched data sets. |
<F12> |
Returns to the data set edit screen or closes the data set filtering search screen. |
|
<Esc> |
Same as <F12>. |
|
<Home> |
Moves the cursor to the data set name field. |
|
<Enter> |
Displays the list of data sets that satisfy the entered condition. If a data set is selected from the list, it is opened and a screen to edit it appears. |
|
<Up arrow key> |
Moves the cursor to the previous field, or the previous data set is selected. |
|
<Down arrow key> |
Moves the cursor to the next field, or the next data set is selected. |
|
<Tab> |
Moves the cursor to the next field. |
Filter keys used in the data set search screen are described in the following tables.
-
Filter keys
Filter key Description *
Indicates one qualifier.
**
Indicates 0 or more qualifier(s).
%
Indicates one character.
-
How to use filter keys
Filter key condition Data set name meeting the condition Data set name not meeting the condition TEST.DATA.SET%
TEST.DATA.SET1
TEST.DATA.SET
TEST.*.SET
TEST.DATA1.SET
TEST.SET
TEST.DATA*
TEST.DATA23
TEST.DATA.SET
TEST.**
TEST.DATA.SET
TEST1.DATA.SET
**.SET
TEST.DATA.SET
TEST.DATA.SET1
VSAM.DATA.SET
VSAM.DATA.SET
**
All data sets
Configuration
Set all KEYs in the SPFEDIT section of the dstool subject, under OpenFrame Configuration.
-
RECORD_READ_COUNT
-
END_KEY_FUNC_DEL_EOL
-
F12_KEY_FUNC_RETRIEVE
-
REPLACE_CREATE_NEEDED
-
EDIT_SIZE_LIMIT
-
DEFAULT_CURSOR_ON_LINE_COMMAND
-
CURSOR_KEY_FUNC_SCROLL
-
CPM_PATH
-
LOCALE
For more information about OpenFrame Configuration, refer to OpenFrame Configuration Guide. |
Note
-
The minimum displayable widths of the data set edit screen and the data set filtering search screen are 35 and 73 columns, respectively.
-
Since all contents of an edited data set are loaded to the memory, ensure system resource management is initiated when you edit a large data set.
-
For a data set opened in browse mode, the entire data set is not loaded to the memory, but only the amount corresponding to the VALUE set to the RECORD_READ_COUNT key in the SPFEDIT section of the dstool subject, under OpenFrame Configuration. To execute the browse mode in spfedit, specify the -b option, or open a data set with the BROWSE command.
-
The editable data set size limit can be set to the VALUE of the EDIT_SIZE_LIMIT key, in the SPFEDIT section of the dstool subject under OpenFrame Configuration. However, the specified size is not applied if the data set is opened in browse mode.
-
If another data set is opened with the EDIT or BROWSE commands, the existing data set is closed without saving its edited contents.
-
Characters that cannot be output, such as control characters or non-defined double byte characters, are displayed as a period (.).
-
In a Linux system where the Shift_JIS character encoding is used, extended special characters or Japanese alphabets may not be correctly printed. In this case, go to the spfedit configuration menu, and specify LOCALE as 'ja_JP.windows31j', which signifies the extended special character code set for Shift_JIS. Here, run 'locale -a' in the Linux shell, to check whether ja_JP.windows31j is found in the available LOCALE list, and if not found, run the Linux utility 'localdef' to install the LOCALE.
19.1. Line Commands
Line commands only apply to the line where they are entered, and if a line command is entered in one line command field or more, and then the <Enter> key is pressed, the command will be executed. The line command field is the very left field where six-digit numbers are entered.
The following table shows line commands which are available for spfedit.
Command | Corresponding vi command | Description |
---|---|---|
p |
Inserts specified data into the next line. |
|
Inserts specified data into the previous line. |
||
yy |
Copies the line to the memory. |
|
Inserts the column scale line. |
||
Deletes a specified line. |
||
Displays excluded lines from the first excluded line. |
||
Inserts a temporary line. |
||
Displays excluded lines from the last excluded line. |
||
Converts uppercase to lowercase. |
||
Moves a specified line to a different location. |
||
Overwrites copied lines to specified lines. |
||
Converts lowercase to uppercase. |
||
Copies a specified line and inserts it to the next lines. |
||
Displays excluded lines. |
||
Excludes specified lines and hide them using a single dotted line. |
A ( p )
Moves, copies, or inserts data into the next line of the command. It is normally used with the C (copy) or M (move) commands.
-
Usage
A[n]
Option Description n
Specifies how many times the data will be inserted. The default is 1.
Screen before Executing the A CommandScreen after Executing the A Command
B
Moves, copies, or inserts data into the previous line of the command. It is normally used with the C (copy) or M (move) commands.
-
Usage
B[n]
Option Description n
Specifies how many times the data will be inserted. The default is 1.
Screen before Executing the B CommandScreen after Executing the B Command
C | CC ( yy )
Normally used with the A (after), B (before), or O (overlay) command.
-
Usage
-
C
Copies one record or more into the memory.
C[n]
Option Description n
Specifies how many times the data will be copied. The default is 1.
-
CC
Specifies the block to be copied by entering CC both in the first line and the last line of the block.
CC
Screen before Executing the C CommandScreen after Executing the C Command
-
COLS
Inserts a column scale line into a specified line. The inserted column scale line is not saved with data, and can be deleted by entering the D or RESET COLS (primary command) command.
-
Usage
COLS
Screen before Executing the COLS CommandScreen after Executing the COLS Command
D | DD
Deletes a specified line.
-
Usage
-
D
Deletes one or more records.
D[n]
Option Description n
Specifies the number of lines to be deleted. The default is 1.
-
DD
Specifies the block to be deleted by entering DD both in the first line and the last line of the block.
DD
Screen before Executing the D CommandScreen after Executing the D Command
-
F
Displays as many hidden records as the specified number from the first hidden record.
-
Usage
F[n]
Option Description n
Specifies the number of records to display. The default is 1.
Screen before Executing the F CommandScreen after Executing the F Command
I
Inserts one or more temporary record(s) into the next of a specified line. If nothing is entered in the inserted line, and only <Enter> is input, the line is automatically deleted.
-
Usage
I[n]
Option Description n
Specifies how many times the data will be inserted. The default is 1.
Screen before Executing the I CommandScreen after Executing the I Command
L
Displays as many hidden records as the specified number from the last hidden record.
-
Usage
L[n]
Option Description n
Specifies the number of records to display. The default is 1.
Screen before Executing the L CommandScreen after Executing the L Command
LC | LCC | LCLC
Converts uppercase in specified lines to lowercase.
-
Usage
-
LC
Converts uppercase in one or more records to lowercase.
LC[n]
Option Description n
Specifies the number of lines in which uppercase is converted to lowercase. The default is 1.
-
LCC | LCLC
Specifies the block in which uppercase is converted to lowercase by entering LCC in the first line and LCLC in the last line of the block.
LCC | LCLC
Screen before Executing the LC CommandScreen after Executing the LC Command
-
M | MM
Normally used with the A (after), B (before), O (overlay) command.
-
Usage
-
M
Moves one or more record to a different line.
M[n]
Option Description n
Specifies the number of lines to be moved. The default is 1.
-
MM
Specifies the block to be moved by entering MM both in the first line and the last line of the block.
MM
Screen before Executing the M CommandScreen after Executing the M Command
-
O | OO
Overwrites copied records to blank spaces in specified records. This command is usually used along with the C (copy) or M (move) command.
-
Usage
-
O
Overwrites one or more records.
O[n]
Option Description n
Specifies the number of lines to overwrite. The default is 1.
-
OO
Specifies the block to be overwritten by entering OO both in the first line and the last line of the block.
OO
Screen before Executing the OO CommandScreen after Executing the OO Command
-
UC | UCC | UCUC
Converts lowercase in specified lines to uppercase.
-
Usage
-
UC
Converts lowercase to uppercase in one or more records.
UC[n]
Option Description n
Specifies the number of lines in which lowercase is converted to lowercase. The default is 1.
-
UCC | UCUC
Specifies the block in which lowercase is converted to uppercase by entering UCC in the first line and UCUC in the last line of the block.
LCC | LCLC
Screen before Executing the UC CommandScreen after Executing the UC Command
-
R | RR
Copies a specified record and inserts it to the next line(s).
-
Usage
-
R
Copies a specified record and inserts it to as many next lines as a specified number.
R[n]
Option Description n
Specifies the number of insertion iteration. The default is 1.
-
RR
Specifies the block in which a copied record is written by entering RR both in the first line and the last line of the block.
RR
Screen before Executing the R CommandScreen after Executing the R Command
-
S
Displays as many excluded lines as a specified number.
-
Usage
S[n]
Option Description n
Specifies the number of hidden records to display. If not specified, all hidden records will be displayed.
Screen before Executing the S CommandScreen after Executing the S Command
X | XX
Hides specified records using a single dotted line. The number of hidden records is displayed in the right of the dotted line. If an adjacent line of a specified record is a dotted line, they are combined into a single dotted line.
To display hidden records, use the F, L, or S line command or the RESET command and specify the EXCLUDE option. Resulting records are also displayed if hidden records are the target of the FIND or LOCATE command.
-
Usage
-
X
Excludes one or more records.
X[n]
Option Description n
Number of lines to exclude. The default is 1.
-
XX
Specifies the block to be excluded by entering XX both in the first line and the last line of the block.
XX
Screen before Executing the X CommandScreen after Executing the X Command
-
19.2. Primary Commands
Primary commands affect the entire data set. A primary command can be executed by entering the command in the second command line ('Command ===>') on the screen, and pressing the <Enter> key.
The following table shows primary commands that are available for spfedit.
Command | Corresponding vi command | Description |
---|---|---|
Moves to the last part of the data set. |
||
Specifies a default key section used by the SORT command. |
||
Opens another data set in a read-only mode. |
||
:q |
Terminates without saving the edited content. |
|
Enters data in upper case only. |
||
Replaces a specified string with a different string. |
||
Displays a column ruler under the primary command line. |
||
Copies records of another data set to the currently edited data set. |
||
Creates a new data set to which the currently edited records will be copied. |
||
Saves the currently edited records to the clipboard. |
||
Deletes a specified line. |
||
Moves the scroll down. |
||
:e |
Opens another data set in edit mode. |
|
:wq |
Ends editing after saving the edited contents. |
|
Searches for a specific string to exclude. |
||
/ |
Searches for a specific string. |
|
Displays the help screen. |
||
Converts the data set output format to normal or HEX mode. |
||
Scrolls the screen to the left. |
||
:[n] |
Moves the screen to a specific line. |
|
Displays or hides the list of function keys below. |
||
Copies the records saved in the clipboard to the currently edited data set. |
||
Repeats the previously executed CHANGE command. |
||
Replaces the currently edited records with another data set’s records. |
||
Initializes the screen. |
||
Repeats the previously executed FIND command. |
||
Scrolls the screen to the right. |
||
:w |
Saves the currently edited data set. |
|
Determines how to scroll the screen. |
||
Sorts all records of a data set in a specified order. |
||
Executes a batch job as edited. |
||
Moves to the first part of the data set. |
||
Scrolls the screen up. |
BOTTOM | BOT
Moves to the last part of the data set.
-
Usage
BOTTOM | BOT
BOUNDS | BOUND | BNDS | BND | BOU
Specifies a default key section used by the SORT command. If no option is specified, a current key section will be displayed.
-
Usage
BOUNDS | BOUND | BNDS | BND | BOU [left_column right_column]
Option Description left_column
Specifies the start column of a key section. (Default value:1)
right_column
Specifies the end column of a key section. (Default value: maximum record length)
The following example specifies the left and right boundaries as 1 and 72 respectively.
BOUNDS 1 72
BROWSE | BR
Closes the data set that is currently being edited, and opens another data set in a read-only mode. It does not lock the data set, and it is impossible to edit or save the data set. Only the fixed amount of memory specified in RECORD_READ_COUNT is used regardless of the data set size in read-only mode. Reopening the currently opened data set with this command is not allowed.
-
Usage
BROWSE | BR [dataset_name] [member_name]
Option Description dataset_name
Specifies the name of the data set to be opened. The data set to open must be registered in the catalog. If not specified, a screen for data set search will appear.
member_name
Specifies the member names if the data set to open is PDS.
CANCEL | CAN (:q)
Terminates spfedit without saving the edited data set. It has the same function as <F12>.
-
Usage
CANCEL | CAN
CAPS
Specifies whether to convert data entered with a keyboard to upper case.
-
Usage
CAPS {ON | OFF}
Option Description ON
Data is always entered in upper case regardless of pressing the <CAPS> key.
OFF
Data is entered just as input in upper or lower-case letters. (Default)
CHANGE | C
Replaces a specified string with a different string. If the data set is either F or FB format, the length of the two data sets must be identical to each other.
-
Usage
CHANGE | C string-1 string-2 [NEXT | PREV | ALL | FIRST | LAST] [left-col [right-col]]
-
Input items
Item Description string-1
Enter a string to be replaced. upper case and lower case letters are not distinguished. To distinguish between the two, enter C+'string'.
If the string contains a space, insert the string between single or double quotation marks. (e.g. 'a string' or "a string") To search for the string with the HEX value, enter X+'HEX value'.
string-2
Enter a string to replace string-1 with. If the string contains a space, insert the string between single or double quotation marks. (e.g. 'a string' or "a string")
-
Option
Option Description NEXT
Searches forward from the first line on the current view, and replaces the specified strings. (Default)
PREV
Searches backward from the previous line of the first line on the current view, and replaces the specified strings.
ALL
Searches the entire data set to replace all occurrences of the specified strings, and displays the total number of specified strings.
FIRST
Searches the data set from the very first line, and replaces strings.
LAST
Searches the data set from the very last line, and replaces strings.
left-col
Specifies the first column of a section to replace. (Default value: 1)
right-col
Specifies the last column of a section to replace. (Default value: record’s last column)
-
The following example replaces "AAA" with "BBB" by searching the data set from the first line.
CHANGE AAA BBB FIRST
The following example replaces all "HOME A," which includes a whitespace character, with "HOME B" by searching the entire data set.
CHAGNE 'HOME A' 'HOME B' ALL
The following example replaces the hexadecimal value, "6565," with the hexadecimal value, "6767," by searching the data set from the record displayed in the current view.
CHANGE X'6565' X'6767'
The following example replaces "XXX" with "YYY" from the record column 5 to the column 8.
CHANGE XXX YYY NEXT 5 8
COLS
Displays a column ruler under the primary command line. If not specified, the current setting will be toggled.
-
Usage
COLS [{ON | OFF}]
Option Description ON
Displays a column ruler.
OFF
Does not display a column ruler. (Default value)
COPY
Copies records of another data set to the currently edited data set.
-
Usage
COPY dataset_name {BEFORE | AFTER} label [start-line] [end-line]
Option Description dataset_name
Specifies the name of a data set containing the records to be read.
BEFORE
Inserts copied records before the specified label.
AFTER
Inserts copied records after the specified label.
label
Specifies the name of a label for the read records.
start-line
Specifies the first line for the records to be copied.
end-line
Specifies the last line for the records to be copied.
The following example reads a data set 'XXX' and copies the records to the first line of the currently edited data set.
COPY XXX AFTER .ZFIRST
CREATE
Creates the currently edited records as a new PDS member data set. Cannot save as other data sets than a PDS member.
-
Usage
CREATE dataset_name label1 label2
Option Description dataset_name
Specifies the name of a PDS and member for the new data set. If the currently edited data set is not a PDS member, or to save the data set as another PDS member, you need to specify the names of both PDS and member. When saving the data set as another member within the same PDS, the name of the PDS can be omitted.
label1
Specifies the first label for the records to be saved.
label2
Specifies the last label for the records to be saved.
The following example reads records from .L1 to .L2 in the currently edited data set, and creates a data set 'XXX(YYY)'.
CREATE XXX(YYY) .L1 .L2
CUT
Retrieves or saves the currently edited records partially or entirely to the clipboard.
-
Usage 1
COPY [label1 label2] [X|NX] [REPLACE | APPEND]
Option Description label1
Specifies the first label for the records to be saved to the clipboard.
label2
Specifies the last label for the records to be saved to the clipboard.
X
Copies only the excluded records.
NX
Copies records except those excluded.
REPLACE
Copies after deleting the existing records saved in the clipboard. (Default)
APPEND
Adds the last selected part of the existing records in the clipboard.
-
Usage 2
COPY DISPLAY
Option Description DISPLAY
Retrieves records in the clipboard.
DELETE | DEL
Deletes lines in the specified range.
-
Usage
DELETE | DEL from-line [to-line]
Item Description from-line
Specifies the number of the first line in a range.
to-line
Specifies the number of the last line in a range.
DOWN
Moves down from the current position as specified.
-
Usage
DOWN {MAX | HALF | PAGE | CURSOR | nnn}
Item Description MAX
Moves to the last record.
HALF
Moves down by half of the page.
PAGE
Moves to the next page.
CURSOR
Moves the records, at which the cursor is currently located, to the top of the page.
nnn
Moves down as many lines as the specified number.
EDIT | E ( :e )
Closes the data set that is currently being edited in the current view, and opens another data set in the editing mode. The data set will exclusively be locked so that other users cannot access it in the editing mode. Reopening the currently opened data set with this command is not allowed.
-
Usage
EDIT | E [dataset_name] [member_name]
Option Description dataset_name
Specifies the name of the data set to be edited. The data set must be registered in the catalog. If not specified, the data set search screen will be displayed.
member_name
Specifies member names if the data set to be edited is PDS.
END ( :wq )
Saves a data set and terminates spfedit. You need to confirm whether the data set has been successfully saved. The function is the same as the <F3> key.
-
Usage
END
EXCLUDE
Allows the user to search for a specific string to hide any lines containing the string.
-
Usage
EXCLUDE string [label1 label2] [NEXT | PREV | ALL | FIRST | LAST] [left-col] [right-col]
Option Description string
Specifies the name of the data set to be edited. The data set must be registered in the catalog. If not specified, the data set search screen will be displayed.
label1
Specifies the name of the first label for EXCLUDE.
label2
Specifies the name of the last label for EXCLUDE.
NEXT
Searches forward from the current line, within the range. (Default)
PREV
Searches backward from the previous line of the current line, within the range.
ALL
Searches all lines within the range.
FIRST
Searches from the first line within the range.
LAST
Searches from the last line within the range.
left-col
Specifies the first column in the search area. (Default value: 1)
right-col
Specifies the last column in the search area. (Default value: last column of record)
member_name
Specifies member names if the data set to be edited is PDS.
FIND | F ( / )
Finds and moves to the specified string. The found string is reverse-displayed.
-
Usage
FIND | F string [NEXT | PREV | ALL | FIRST | LAST] [left-col [right-col]]
-
Input Items
Item Description string
Enter a string to find. It is case-insensitive. For a case-sensitive search, enter C+'string'. If the string to find contains a space, insert the string between single or double quotation marks. (e.g. 'a string' or "a string")
-
Option
Option Description NEXT
Searches forward from the first line on the current view. (Default)
PREV
Searches backward from the previous line of the first line on the current view.
ALL
Searches the entire data set, and displays the total number of the found strings.
FIRST
Searches the data set from the very first line.
LAST
Searches the data set from the very last line.
left-col
Specifies the first column of a search section. (Default value: 1)
right-col
Specifies the last column of a search section. (Default value: last column of record)
-
The following example searches for "DISP" from the data set from the first line.
FIND DISP FIRST
The following example searches for "S P A C E," which includes a whitespace character, in the entire data set.
FIND 'S P A C E' ALL
The following example searches for the hexadecimal value, "656667," from the record displayed in a current screen.
FIND X'656667'
The following example searches for "XXX" from the record column 6 to the column 11.
FIND XXX 6 11
HELP
Displays the list of commands available for spfedit and KEYs, and brief descriptions on a separate window.
-
Usage
HELP
HEX
Specifies whether to display the data set along with its HEX values.
-
Usage
HEX {ON | OFF}
Option Description ON
Vertically displays HEX values on each line of the data set. It is possible to modify the data set with the displayed HEX values.
OFF
Disables the HEX display mode. (Default value)
LEFT
Scrolls the screen to the left.
-
Usage
LEFT [MAX]
Option Description MAX
Moves to the start point of the record.
LOCATE | L (:[n] )
Moves to the specified line, and displays its contents.
-
Usage
LOCATE | L line-number
Item Description line-number
Specifies the number of the line to be displayed.
MENU
Specifies whether to display the list of function keys in the lower part of the screen.
-
Usage
MENU {ON | OFF}
Option Description ON
Displays the list of function keys. (Default value)
OFF
Does not display the list.
PASTE
Pastes the records saved in the clipboard through the CUT command to the currently edited data set.
-
Usage
PASTE [{AFTER | BEFORE} label] [KEEP | DELETE]
Option Description AFTER
Pastes the clipboard content before the position specified with the label.
BEFORE
Pastes the clipboard content after the position specified with the label.
label
Specifies the name of the label to specify the position to paste the clipboard content.
KEEP
Keeps the clipboard content even after paste.
DELETE
Deletes the clipboard content after paste.
RCHANGE
Repeats the previously executed CHANGE command from the current cursor position. The function is the same as that of the <F6> key.
-
Usage
RCHANGE
REPLACE
Replaces the currently edited records with another data set’s records.
-
Usage
REPLACE dataset_name [label1 label2]
Option Description dataset_name
Specifies the name of the data set in which to save the currently edited records.
label1
Specifies the first label for the record to be saved.
label2
Specifies the last label for the record to be saved.
RESET | RES
Initializes the specified target, and refreshes the screen.
-
Usage
RESET | RES {COMMAND | COLS | CHANGE | EXCLUDE | ALL}
Option Description COMMAND
Initializes all commands entered in the line command field, and re-displays the line numbers.
COLS
Deletes all column scales entered with the COLS command, and refreshes the screen.
CHANGE
Initializes all displayed contents after replacing strings.
EXCLUDE
Displays all hidden records that have been excluded.
ALL
Executes all the above commands in this table.
RFIND
Refinds a key word of the FIND or CHANGE command that was previously executed, from the current cursor position. The function is the same as the <F5> key.
-
Usage
RFIND
RIGHT
Scrolls the screen to the right, by page.
-
Usage
RIGHT [MAX]
Option Description MAX
Moves to the last part of the record.
SAVE ( :w )
Saves the edited data set without terminating spfedit.
-
Usage
SAVE
SCROLL | SCR
Determines how to scroll the screen through <F7> or <F8>.
-
Usage
SCROLL | SCR {PAGE | CSR}
Option Description PAGE
Scrolls by page.
CSR
Scrolls from the current cursor position. If the screen is scrolled up or down, the record indicated by the cursor will be moved to the top or bottom of the screen.
In the following cases, the function of PAGE is applied even though SCROLL is set to CSR.
-
If the cursor is on the primary command line
-
If the cursor is on the first record line of the screen
-
If the cursor is on the last record line of the screen
If the screen is scrolled to the left or right, the column indicated by the cursor will be moved to the very left or right side of the screen. In the following cases, the function of PAGE is applied even though SCROLL is set to CSR.
-
If the cursor is on the primary command line
-
If the cursor is on the first column of the record on the current view
-
If the cursor is on the last column of the record on the current view
SORT / SORTE
Sorts all records of a data set in a specified order. This command is available only in the editing mode. The number of key sections for sorting can be up to 5. If the number of the sections is 1, specifying the section can be omitted. If this is omitted, the section specified by the BOUNDS command is used. If the number of the section is more than 1, all relevant options must be specified. When the SORT command is completed, all target lines of the RESET command will be initialized. When a variable-length data set is sorted, if there is no data or only a part of data is found in the specified key section, binary zeros are padded before the sorting. SORT is for ASCII and SORTE for EBCDIC.
-
Usage
SORT [[[{A|D}] [start-column [end-column]]]...]
Option Description A
Sorts records in ascending order. (Default value)
D
Sorts records in descending order.
start-column
The first column of the key section for sorting. (from 1 to the maximum record length)
end-column
The last column of the key section for sorting. (from 1 to the maximum record length)
The following example executes sorting in ascending order. The first and last columns of the key section depend on the left and right columns specified by the BOUNDS command.
SORT
The following example sorts the section from the column 1 to the column 5 in ascending order and the section from the column 9 to the column 15 in descending order.
SORT A 1 5 D 9 15
SUBMIT | SUB
Calls a tjes server and makes it execute a batch job using JCL that is being edited. This command is available only in the editing mode and executed for data that is being edited in a current screen. This command is not available for saved data. To execute this command, TACF must be logged in.
Check whether the VALUE of the CHECK_DSAUTH key is set to YES, in the COMMON section of the dstool subject under OpenFrame Configuration. If the JCL data set is SDS, the name ends with ".SPFTEMP". In the case of a PDS member data set, the name format is "SPF + PID".
After the SUBMIT command is executed, the result message will be displayed. If any key is pressed, the primary command line will be returned. The results can be checked by using tjesmgr.
-
Usage
SUBMIT | SUB
TOP
Moves to the top of the data set.
-
Usage
TOP
UP
Scrolls the screen up as specified, from the currently edited position.
-
Usage
DOWN {MAX | HALF | PAGE | CURSOR | nnn}
Item Description MAX
Moves to the very first record.
HALF
Moves up by half of the page.
PAGE
Moves to the previous page.
CURSOR
Moves the record at which the cursor is located to the last position.
nnn
Moves up as many lines as the specified number.