Wednesday, May 27, 2009

8. VERIFY , PRINT, DELETE, ALTER Command

Verify - preserves data integrity (HURBA)
Format :
VERIFY FILE(ddname/passwd)
or
VERIFY DATASET(entryname/passwd)
VERIFY entryname/passwd (TSO)

VERIFY DATASET(DA0001T.LIB.KSDS.CLUSTER)

Example 8.1 VERIFY

Remark :

VERIFY can be issued from a TSO or within a JCL statement.
It is valid only for VSAM dataset except LDS.

DELETE

- logically deletes dataset
- catalog entry deleted

Format :
DELETE entryname/passwd -
optional parameters



DELETE DA0001T.LIB.KSDS.CLUSTER -
ERASE
Example 8.2 Deleting a Cluster



Optional parameters are :
• AIX
• CLUSTER
• NONVSAM
• PATH
• ERASE NOERASE
• FORCE NOFORCE
• PURGE NOPURGE
• SCRATCH NOSCRATCH





//DA0001TA JOB LA2179,PCS,MSGLEVEL=(1, 1) ,
// NOTIFY=DA0001T
//* Deletes VSAM Dataset
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT = *
//SYSIN DD *
DELETE DA0001T.TRAIN.ITMFOIV
/*
//



Example 8.3 Delete VSAM Dataset
PRINT

The default output destination for PRINT is SYSPRINT.
prints in CHAR/HEX/DUMP format
limiting

Format 1 :
PRINT INDATASET (entryname/passwd) -

Format 2 :
PRINT INFILE (ddname/passwd) -
parameters like REPRO are available


Options
• CHAR DUMP HEX
• COUNT (number)
• FROMADDRESS, [TOADDRESS]
• FROMKEY, [TOKEY]
• FROMNUMBER, [TONUMBER]
• OUTFILE (ddname)
• SKIP (number)






//DA0001TA JOB LA2179,PCS,MSGLEVEL=(1, 1) ,
// NOTIFY=DA0001T
//* Print VSAM Dataset
//PRG1 EXEC PGM=IDCAMS
//FILE1 DD DSN=DA0001T.LIB.KSDS.CLUSTER,
// DISP=SHR
//SYSPRINT DD SYSOUT = *
// SYSIN DD *
PRINT INFILE(FILE1) CHARACTER
/*
//

Example 8.4 Print VSAM Dataset

ALTER


Used to change certain attributes of a previously defined VSAM object
Following can be done with ALTER

change names
• Add volumes/Remove volumes
• Change Keys and uniqueness
• Change record size
• Change Upgrade option
• Change % of FREESPACE etc.

Format :
ALTER entryname/passwd parameters
Options :
• ADDVOLUMES (volumes)
• AUTHORIZATION(entry string)
• BUFFERSPACE (size)
• ERASE NOERASE
• FREESPACE(ci% ca%)
• MASTERPW(password)
• NEWNAME(newname)
• READPW (password)
• SCRATCH NOSCRATCH
• SHAREOPTIONS
• (cross region cross system)
• TO(date) FOR(days)
• UPDATE NOUPDATE
• UPDATEPW(password)
• UPGRADE NOUPGRADE


The ORDERED Parameter

The ORDERED Parameter tells VSAM to assign the KEYRANGES values to the volumes, one by one, in the order in which the KEYRANGES and VOLUMES are specified.

Format :
ORDERED UNORDERED

Example :
KEYRANGES( (0001 1000) -
(1001 2000) -
(2001 3000)) -
VOLUMES (BS3013 -
BS3014 -
BS3001)

Note : When you code ORDERED, you must code the same no. of VOLUMES as KEYRANGES.

The IMBED Parameter

The IMBED Parameter directs VSAM to place the sequence set on the first track of the Data Control Area and duplicate it as many times as it will fit.
Advantage : reduces rotational delay

Format :
IMBED NOIMBED

The REPLICATE Parameter

The REPLICATE Parameter directs VSAM to duplicate each index record as many times as it will fit on its assigned track. It applies to a KSDS index component only.
Format :
REPLICATE NOREPLICATE

Example :
INDEX(NAME(DA0001T.LIB.KSDS.INDEX) -
IMBED -
REPLICATE -
)
The Password Protection Parameter

VSAM provides a hierarchical list of parameters that you can specify for a non-DFSMS-managed VSAM dataset. However DFSMS-managed dataset you must use a security package like RACF.
Format :
MASTERPW(password)

Allows the highest level of access to all cluster components, including DELETE and ALTER authority
Format :
UPDATEPW(password)

Allows write authority to the cluster
Format :
READPW(password)

Allows read only access to the cluster

Note : Valid only for KSDS, ESDS, RRDS.
Passwords are initially specified in the DEFINE
CLUSTER
Example :
MASTERPW(TRGDEPT)

At the execution time, a password can be coded explicitly in the PASSWORD clause of a COBOL SELECT clause
The AUTHORIZATION Parameter

AUTHORIZATION provides additional security for a VSAM cluster by naming and assembler user verification routine (USVR).
Format :
AUTHORIZATION (entry-point password)

entry-point : the name of the entry point of a USVR
written in assembly language
password : the password the routine is to verify

Note : Valid only for KSDS, ESDS, RRDS.

Example :
AUTH(MYRTN ‘TRGDEPT’)


ALTER -
DA0001T.LIB.KSDS.CLUSTER -
NEWNAME(A2000.MY.CLUSTER)


Example 8.5 Altering name of a Dataset


ALTER -
DA0001T.LIB.KSDS.INDEX -
FREESPACE(30 30)


Example 8.6 Altering FREESPACE of a Dataset

The following attributes are alterable only for empty clusters
• KEYS(length offset)
• RECORDSIZE(avg max)
• UNIQUEKEY NONUNIQUEKEY


The following attributes are unalterable. You have to DELETE the cluster and redefine it with new attributes.

CISZ
Cluster type,
IMBED/REPLICATE
REUSE NOREUSE

Back to VSAM index

No comments: