09.07.2015 Views

z/OS V1R6.0 DFSMS Access Method Services for Catalogs

z/OS V1R6.0 DFSMS Access Method Services for Catalogs

z/OS V1R6.0 DFSMS Access Method Services for Catalogs

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

IMPORTmethod services then redefines BCN.EXAMPLE.KSDS1, using the catalogin<strong>for</strong>mation from the portable file, TAPE2.//IMPORT2 JOB ...//STEP1 EXEC PGM=IDCAMS//SOURCE DD DSNAME=TAPE2,UNIT=(TAPE,,DEFER),// VOL=SER=003030,DISP=OLD,// DCB=(BLKSIZE=6000,LRECL=479,DEN=3),LABEL=(1,SL)//SYSPRINT DD SYSOUT=A//SYSIN DD *IMPORT -INFILE(SOURCE) -OUTDATASET(BCN.EXAMPLE.KSDS1) -CATALOG(VCBUCAT1)/*Job control language statement:vSOURCE DD describes the portable data set, TAPE2, which resides on amagnetic tape file, that is not mounted by the operator until access methodservices opens TAPE2 <strong>for</strong> processing. The block size parameter is included (eventhough it need not be, because the tape has a standard label and the in<strong>for</strong>mationis contained in the data set header label) to illustrate the fact that thein<strong>for</strong>mation specified when the data set is imported is required to be the sameas was specified when the data set was exported. The LRECL parameter is notrequired, because the maximum record size is 475 bytes and the default (blocksize minus 4) is adequate. However, by specifying a record size, the default isoverridden and virtual storage is more efficiently used. To specify a record size,specify the size of the largest record + 4.The IMPORT command copies the portable data set, TAPE2, into the system andassigns it the name BCN.EXAMPLE.KSDS1. When TAPE2 is copied, access methodservices reorganizes the data records so that deleted records are removed andcontrol intervals and control areas contain the specified free space percentages. Theoriginal copy of the cluster is deleted and replaced with the data records from theTAPE2 portable file. The parameters are:vvvINFILE points to the SOURCE DD statement, which describes the portable file,TAPE2, to be imported.OUTDATASET gives the name of the data set being imported.CATALOG identifies the catalog, VCBUCAT1, in which the imported cluster isto be defined.Import an Entry-Sequenced Cluster in a Catalog: Example 4In this example, an entry-sequenced cluster, X98.EXAMPLE.ESDS1, is importedfrom a portable file, TAPE1. This example is associated with EXPORT example,“Export an Entry-Sequenced Cluster: Example 3” on page 255. The cluster isdefined in a different catalog than the one from which it was exported, assigned anew name, and imported to a different volume.//IMPORT3 JOB ...//STEP1 EXEC PGM=IDCAMS//SOURCE DD DSNAME=TAPE1,UNIT=(TAPE,,DEFER),DISP=OLD,// VOL=SER=001147,LABEL=(1,SL)//SYSPRINT DD SYSOUT=A//SYSIN DD *IMPORT -INFILE(SOURCE) -OUTDATASET(BCN.EXAMPLE.ESDS3) -OBJECTS -((X98.EXAMPLE.ESDS1 -Chapter 25. IMPORT 269

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!