Presentation is loading. Please wait.

Presentation is loading. Please wait.

Stephen Linkin Houston Community College 5-Apr-07 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM 1 Using AMS (Access Method Services)

Similar presentations


Presentation on theme: "Stephen Linkin Houston Community College 5-Apr-07 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM 1 Using AMS (Access Method Services)"— Presentation transcript:

1

2 Stephen Linkin Houston Community College 5-Apr-07 © Mike Murach & Associates, HCC, IBM 1 Using AMS (Access Method Services)

3 2 Objectives Knowledge objectives Name two DD statements required in any job that executes the AMS utility, IDCAMS, and explain what they’re used for. Describe rules for coding AMS commands. Distinguish between a generic entry name and level entry name for the AMS LISTCAT command Describe the effect of coding entry types Describe the type catalog information listed by the AMS LISTCAT command. Name the three AMS commands required to define and build alternate indexes for KSDS. Explain what an upgrade set is for a base cluster Describe how it gets updated.

4 3 AMS commands Commands for the application programmer DEFINE CLUSTERLISTCATALTER DELETEPRINTREPRO DEFINE ALTERNATE INDEXDEFINE PATHBLDINDEX Commands for the systems programmer DEFINE MASTERCATALOG DEFINE USERCATALOG DEFINE ALIAS EXPORT IMPORT

5 4 Requirements The JCL requirements for an AMS job The AMS syntax requirements Examples An AMS job that runs a LISTCAT command An AMS job with comments running an ALTER command //MM01LC1 JOB (36512),'R MENENDEZ',NOTIFY=&SYSUID // EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * LISTCAT ENTRIES(MM01.CUSTOMER.MASTER) – VOLUME /* //MM01LC2 JOB (36512),'R MENENDEZ',NOTIFY=&SYSUID // EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * b/* THIS JOB CHANGES BOTH NAME AND FREESPACE ALLOCATION */ b ALTER MM01.CUSTOMER.MASTER – b NEWNAME(MM01.CUSTMAST) /* CHANGE NAME */ - b FREESPACE(10 10) /* CHANGE FREESPACE ALLOCATION / /*

6 © Mike Murach & Associates, HCC, IBM5 Syntax to Learn The syntax of the DEFINE CLUSTER command DEFINE CLUSTER (NAME(entry-name) [ OWNER(owner-id) ] [ FOR(days) | TO(date) ] [ INDEXED | NONINDEXED | NUMBERED | LINEAR] [ RECORDSIZE(avg max) ] [ KEYS(length offset) ] [ SPANNED | NONSPANNED ] [ CISZ(size) ] [ FREESPACE(ci ca) ] [ VOLUMES(vol-ser...) ] [ FILE(ddname) ] [ {CYLINDERS(primary [secondary])} {KILOBYTES(primary [secondary])} {MEGABYTES(primary [secondary])} {TRACKS(primary [secondary]) } {RECORDS(primary [secondary]) } ] [ REUSE | NOREUSE ] [ SHAREOPTIONS(a b) ] [ IMBED | NOIMBED ] ) [ STORAGECLASS(storage-class) ] [ DATACLASS(data-class) ] [ MANAGEMENTCLASS(management-class) ] ) [ DATA ( [ NAME(entry-name) ] [ VOLUMES(vol-ser...) ] [ FILE(ddname) ] [ CISZ(size) ] [ {CYLINDERS(primary [secondary])} {KILOBYTES(primary [secondary])} {MEGABYTES(primary [secondary])} {TRACKS(primary [secondary]) } {RECORDS(primary [secondary]) } ] ) ] [ INDEX ( [ NAME(entry-name) ] [ VOLUMES(vol-ser...) ] [ {CYLINDERS(primary [secondary])} {KILOBYTES(primary [secondary])} {MEGABYTES(primary [secondary])} {TRACKS(primary [secondary]) } {RECORDS(primary [secondary]) } ] ) ] [ CATALOG(name) ] [ DATA ( [ NAME(entry-name) ] [ VOLUMES(vol-ser...) ] [ FILE(ddname) ] [ CISZ(size) ] [ {CYLINDERS(primary [secondary])} {KILOBYTES(primary [secondary])} {MEGABYTES(primary [secondary])} {TRACKS(primary [secondary]) } {RECORDS(primary [secondary]) } ] ) ] [ INDEX ( [ NAME(entry-name) ] [ VOLUMES(vol-ser...) ] [ {CYLINDERS(primary [secondary])} {KILOBYTES(primary [secondary])} {MEGABYTES(primary [secondary])} {TRACKS(primary [secondary]) } {RECORDS(primary [secondary]) } ] ) ] [ CATALOG(name) ]

7 © Mike Murach & Associates, HCC, IBM6 Syntax to Learn More syntax notes of the DEFINE CLUSTER command (2) More syntax notes of the DEFINE CLUSTER command (2)

8 © Mike Murach & Associates, HCC, IBM7 Syntax to Learn More syntax notes of the DEFINE CLUSTER command (3) More syntax notes of the DEFINE CLUSTER command (3)

9 © Mike Murach & Associates, HCC, IBM8 Share Options Cross-region Share Options Cross-system Share Options

10 9 Syntax of Other Useful Commands The ALTER Command Can Change The Name Of A Data Set Can Adds And Remove Other Volumes Can Change The Share Options ALTER entry-name [ CATALOG(name) ] [ NEWNAME(entry-name) ] [ ADDVOLUMES(vol-ser...) ] [ REMOVEVOLUMES(vol-ser...) ]

11 © Mike Murach & Associates, HCC, IBM10 Syntax of Other Useful Commands (2) The DELETE Command Can Delete A Data Set Whether Or Not It Has Expired Can Delete Named Data Sets Can Delete All Alternate Indexes For Data Sets Matching A Generic Entry Name DELETE (entry-name...) [ CATALOG(name) ] [ entry-type... ] [ PURGE | NOPURGE ] [ ERASE | NOERASE ]

12 © Mike Murach & Associates, HCC, IBM11 Syntax of Other Useful Commands (3) The PRINT Command PRINT { INDATASET(entry-name) } { INFILE(ddname) } [ CHARACTER | HEX | DUMP ] [ OUTFILE ] [ {SKIP(count)} {FROMKEY(key)} {FROMNUMBER(number)} {FROMADDRESS(address)} ] [ {COUNT(count)} {TOKEY(key)} {TONUMBER(number)} {TOADDRESS(address)} ]

13 © Mike Murach & Associates, HCC, IBM12 Syntax of Other Useful Commands (4) The REPRO Command The REPRO Command REPRO { INDATASET(entry-name) } { INFILE(ddname) } { OUTDATASET(entry-name) } { OUTFILE(ddname) } [ {SKIP(count)} {FROMKEY(key)} {FROMNUMBER(number)} {FROMADDRESS(address)} ] [ {COUNT(count)} {TOKEY(key)} {TONUMBER(number)} {TOADDRESS(address)} ] [ REUSE | NOREUSE ] [ REPLACE | NOREPLACE ]

14 © Mike Murach & Associates, HCC, IBM13 Syntax of Other Useful Commands (5) The DEFINE ALTERNATEINDEX/DATA/INDEX and/or CATALOG Command The DEFINE ALTERNATEINDEX/DATA/INDEX and/or CATALOG Command DEFINE ALTERNATEINDEX ( NAME(entry-name) RELATE(cluster-name) [ OWNER(owner-id) ] [ FOR(days) | TO(date) ] [ KEYS(length offset) ] [ UNIQUEKEY | NONUNIQUEKEY ] [ UPGRADE | NOUPGRADE ] [ VOLUMES(vol-ser...) ] [ FILE(ddname) ] [ {CYLINDERS(primary [secondary])} {KILOBYTES(primary [secondary])} {MEGABYTES(primary [secondary])} {TRACKS(primary [secondary]) } {RECORDS(primary [secondary]) } ] [ REUSE | NOREUSE ] [ SHAREOPTIONS(a b) ] [ MODEL(entry-name [cat-name]) ] ) [ DATA ( [ NAME(entry-name) ] [ VOLUMES(vol-ser...) ] [ {CYLINDERS(primary [secondary])} {KILOBYTES(primary [secondary])} {MEGABYTES(primary [secondary])} {TRACKS(primary [secondary]) } {RECORDS(primary [secondary]) } ] ) ] [ INDEX ( [ NAME(entry-name) ] [ VOLUMES(vol-ser...) ] [ {CYLINDERS(primary [secondary])} {KILOBYTES(primary [secondary])} {MEGABYTES(primary [secondary])} {TRACKS(primary [secondary]) } {RECORDS(primary [secondary]) } ] ) ] [ CATALOG(name) ]

15 © Mike Murach & Associates, HCC, IBM14 Figure 16-16b Syntax of Other Useful Commands (6) The DEFINE PATH Command The DEFINE PATH Command DEFINE PATH ( NAME(entry-name) PATHENTRY(aix-name) [ UPDATE | NOUPDATE ] [ FOR(days) | TO(date) ] [ MODEL(entry-name [cat-name]) ] [ RECATALOG | NORECATALOG ] ) [ CATALOG(name) ]

16 © Mike Murach & Associates, HCC, IBM15 Figure 16-17a Syntax of Other Useful Commands (7) The BLDINDEX Command The BLDINDEX Command BLDINDEX { INDATASET(cluster-name) } { INFILE(ddname) } { OUTDATASET(aix-or-path-name) } { OUTFILE(ddname) } { OUTDATASET(aix-or-path-name) } { OUTFILE(ddname) } [ EXTERNALSORT | INTERNALSORT ] [ WORKFILES(ddname ddname) ] [ CATALOG(name) ] [ EXTERNALSORT | INTERNALSORT ] [ WORKFILES(ddname ddname) ] [ CATALOG(name) ]

17 © Mike Murach & Associates, HCC, IBM16 End Presentation


Download ppt "Stephen Linkin Houston Community College 5-Apr-07 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM 1 Using AMS (Access Method Services)"

Similar presentations


Ads by Google