As mentioned briefly before. Access Method Services (AMS) is used to perform various functions on VSAM data sets and catalogs. AMS has a utility program called IDCAMS that can be invoked through a standard JCL and will perform the various functions of the AMS through its commands. The most commonly used AMS commands are:
JCL for Invoking Access Method Services
A skeleton JCL to invoke IDCAMS is given below.
The IDCAMS functional commands with all the right parameters are specified in the SYSIN DD part of the JCL as illustrated above. It can be specified in-stream or in a data set. All functional commands and their parameters must start in or after the second column and cannot extend beyond the 72nd column. The AMS messages will go to the SYSPRINT data set.
If a functional command extends to the next line, a continuation character, in AMS a hyphen must be entered on the previous line. Comments can also be given within a functional command if enclosed within a "/*" and a "*/".
Defining a KSDS Cluster
The update routine is an example of KSDS clusters, and the display routine is an example of both KSDS clusters and alternate indexes.
For these examples, the clusters and alternate indexes should be defined as follows:
The update routine is passed the following:
The display routine is passed the following:
By definition, the primary key is unique and therefore the employee number was chosen for this key. The user_id is also a unique key; therefore, it was chosen as the unique alternate index key. The name field may not be unique; therefore, it was chosen as the non-unique alternate index key.
Suppose you want to define a KSDS data set for an Customer Information system.
Let us say the layout of each customer record is:
The layout of the customer record is shown in the following figure.
Layout of the Customer Record
The JCL for allocating the KSDS data set is given below:
Take a screenshot
The first 6 bytes, which is the customer no, is the primary key of the record. Note the use of hyphen (-) as the continuation character. This indicates that the AMS command is not yet complete and that the following line should be treated as a continuation of the previous line.
Let us examine the JCL line by line.
If this JCL were executed after being customized to your installation standards, a KSDS cluster CUSTOMER.KSDS.CLUSTER would be allocated. The allocation messages would be in the SYSPRINT device Note that we have just created the cluster and it will still be empty. You would have to load records into the cluster using a program or the REPRO command. This will be discussed in a later section. Note that there are more extensive options for allocation of a KSDS cluster. Refer to an IBM manual for details.
Defining an ESDS Cluster
Defining an ESDS is very similar to that of a KSDS except for the following differences. Since ESDS does not have imbedded free space, the FREESPACE parameter is not used
If this JCL is executed after being customized to your installation standards, an ESDS cluster CUSTOMER.ESDS.CLUSTER would be allocated. Note that if the NONINDEXED parameter is omitted AMS would assume the default value INDEXED and allocate a KSDS cluster with default values for FREESPACE, KEYS, index component etc.
Defining an RRDS Cluster
Defining an RRDS is very similar to that of an ESDS except for the following differences.
If this JCL were executed after being customized to your installation standards, an RRDS cluster CUSTOMER.RRDS.CLUSTER would be allocated. Note that if the NUMBERED parameter were omitted AMS would assume the default value INDEXED and again allocate a KSDS cluster with default values for FREESPACE, KEYS, index component etc.
Defining an LDS Cluster
It should be recalled that an LDS is very similar to an ESDS except for that it doesn't have any control fields in a Control interval. Defining an LDS is very similar to that of an ESDS except for the following differences.
If this JCL were executed after being customized to your installation standards, an LDS cluster CUSTOMER.LDS.CLUSTER would be allocated. Note that the RECORDS1ZE parameter is omitted because an LDS doesn't have any concept of a record. It is just a long stream of characters.
IBM Mainframe Related Interview Questions
|IBM Lotus Notes Interview Questions||IBM-CICS Interview Questions|
|COBOL Interview Questions||Linux Interview Questions|
|IBM-JCL Interview Questions||IBM Mainframe Interview Questions|
|IBM AIX Interview Questions||IBM WAS Administration Interview Questions|
|IBM Lotus Domino Interview Questions||IBM Integration Bus Interview Questions|
|Mainframe DB2 Interview Questions||Unix Production Support Interview Questions|
Ibm Mainframe Tutorial
Introduction To Software Development
Introduction To Ibm Mainframes
Tso And Ispf
Jes2, ]es3 And Sms
Introduction To Job Control Language (jcl)
The Job Statement
The Exec Statement
The Job And Exec Statements
The Dd Statement
Procedures And Symbolic Parameters
Generation Data Groups (gdg), Compile/link-edit And Run Jcls
Access Method Services (ams)
Additional Vsam Commands
Introduction To Rexx
Overview Of Rexx
Introduction To Cics
Exception Handling In Cics
Developing A Cics Application
Cics Programming Techniques
Basic Mapping Support (bms)
Transient Data Control
Temporary Storage Control
Interval And Task Control
Cics Application Design
Recovery And Restart
System Security And Intersystem Communication
Cics Debugging Facilities And Techniques
Bms Map Definition Macros And Copylib Members
Cics Response And Abend Codes
Data, Information And Information Processing
Introduction To Database Management Systems
Introduction To Relational Database Management Systems
Database Architecture And Data Modeling
Overview Of Db2
Structured Query Language (sql)
Data Security And Access
Db2 Application Development
Qmf And Db2i
Db2 Performance Monitoring, Utilities And Recovery/restart
Overview Of Information Management System (ims)
Introduction To Vs Cobol Ii
Overview Of Application Development In Vs Cobol Ii
Overview Of The Cobol Program
Sorting And Merging Files
Coding Cobol Programs That Run Under Cics. Ims, Db2 And Ispf
Compiling The Program
Link-editing The Program
Executing The Program
Improving Program Performance
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.