March 30, 1979
Restrictions on the use of access method services and VSAM under for OS and DOS users are listed in Reference, which also contains complete CMS and eMS/DOS command formats, operand-descriptions, and responses for each of the commands described
here. When you are going to execute VSAM programs in CMS or CMS/DOS, you
should remember to issue the DLBL command to identify the master
catalog, as well as any other program input or output file you need to
define.
Using the AMSERV Command
In CMS, you execute access method services utility programs with the AMSERV command, which has the basic format:
amserv filename
"filename" is the name of a CMS file that contains the control
statements for access method services. !gte: Throughout the remainder of this section the term "lMSERV" is used
to refer to both the CMS AMSERV command and the OS/VS or DOS/VS access
method services, except where a distinction is being made between CMS and access method services. You create an AMSERV file with the CMS editor using a filetype of AMSERV and any filename you want; for example:
edit lIastcat amserv NEW FILE:
EDIT:
input
The editor recognizes the filetype of AMSERV and so automatically sets
the margins for your input lines at columns 2 and 72. The sample AMSERV file being created in the example above, MASTClT lMSERV, might contain
the following control statements:
DEFINE MASTERCATALOG (NAME (MYCAT) - VOLUME (123456) CYL (2) -
FILE (IJSYSCT) )
Note that the syntax of the control statements must conform to the rules
for access method services, including continuation characters and
parentheses. The only difference is that the AMSERV file does not
contain a "/*" for a termination indicator.
Before you can execute the DEFINE control statement in this AMSERV example, you must define the output file, using the ddname IJSYSCT. You can do this using the DLBL command. Since the exact form required in
the DLBL command varies according to whether JOU are an OS or a DOS user, separate discussions of the DLBL command are provided later in
this section. All of the following examples assume that any disk data
set or file that you are referencing with an AMSERV command will have
been defined by a DLBL command. When you execute the AMSERV command, the AMSERV control statement
file can be on any accessed CMS disk; you do not need to specify the
filemode and, if you are a DOS user, you do not need to assign SYSIPT. The task of locating the file and passing it to access method services
is performed by CMS. 182 IBM VM/370 eMS User's Guide
AMSERV OUTPUT LISTINGS When the AMSERV command is finished processing, you receive the CMS ready and if there was an error, the return code (from register
15) is displayed following the "R". For example:
R (00008) ;
or, if you are receiving the long fora of the ready message, it appears: R(00008); T=0.01/0.11 10:50:23 If you receive a ready message with an error return code, you should
examine the output listing from AMSERV to determine the cause of the
error. AMSERV output listings are written in CMS files with a fi1etype of LISTING; by default, the fi1enaae is the same as that of the input AMSERV file. For example, if you have executed:
amserv mastcat
and the CMS ready message indicates an error return code, you should
examine the file MASTCAT LISTING: edit mastcat listing
EDIT:
locate /idc/I= Issuing the LOCATE subcommand twice to find
will position you in the LISTING file at
services message. the character string IDC
the first access method
The publication lists and explains all of the
messages generated by access method services together with the
associated reason codes.
Instead of editing the file, you could also use the TYPE command to
display the contents of the entire file, so that you would be able to
examine the input control statements as .ell as any error messages:
type mastcat listing
If you need to make changes to control statements before executing
the AMSERV command again, use the CMS editor to modify the AMSERV input
file.
If you execute the same AMSERV file a number of times, each execution
results in a new LISTING file, which replaces any previous listing file
with the same filename. When you use AMSERV to print a VSAM file, or to list catalog or recovery
area contents using the PRINT, LISTCAT, or LISTCRA control statements,
the output is written in a listing file on a CMS read/write disk, and
not spooled to the printer unless you use the PRINT option of the AMSEBV command:
amserv 1istcat (print Section 10. Using Access Method Services and VSAM 183
Previous Page Next Page