0% found this document useful (0 votes)
108 views3 pages

MF Workbench Vsam User Guide: Invoking VSAM Through JCL

This document provides steps for invoking VSAM through JCL: 1. Create a JCL member to define a KSDS VSAM cluster using IDCAMS. 2. Submit the JCL job to create the VSAM cluster. 3. Load data into the cluster from a sequential dataset using IDCAMS REPRO command. 4. Access and view the data through an application program. 5. Create an alternate index for the KSDS using IDCAMS DEFINE AIX command.

Uploaded by

api-3853979
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views3 pages

MF Workbench Vsam User Guide: Invoking VSAM Through JCL

This document provides steps for invoking VSAM through JCL: 1. Create a JCL member to define a KSDS VSAM cluster using IDCAMS. 2. Submit the JCL job to create the VSAM cluster. 3. Load data into the cluster from a sequential dataset using IDCAMS REPRO command. 4. Access and view the data through an application program. 5. Create an alternate index for the KSDS using IDCAMS DEFINE AIX command.

Uploaded by

api-3853979
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

MF WORKBENCH VSAM USER GUIDE

Invoking VSAM through Jcl.

Step 1 : Create a member in a JCL PDS and write the following code to
create a vsam cluster (KSDS).

//JOBNAME JOB
//DEFKSDS EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE CLUSTER -
(NAME(EMPLOYEE.KSDS.CLUSTER) -
VOLUMES(VSAM02) -
CYLINDERS(2,1) -
CONTROLINTERVALSIZE(4096) -
FREESPACE(10,20) -
KEYS(9,0) -
RECORDSIZE(50,50)) -
DATA -
(NAME(EMPLOYEE.KSDS.DATA)) -
INDEX -
(NAME(EMPLOYEE.KSDS.INDEX) -
CONTROLINTERVALSIZE(1024) -
CATALOG(VSAM.USERCAT.TWO))
/*
//

1
STEP 2 : save the file and submit the job by typing ‘sub’ at the
command line as an ordinary job.If the computers
encounters any errors it will give the error message in the job
log otherwise the message ‘job ended normally ‘ is
displayed on the screen. It means that a vsam cluster is
created.

STEP 3 : You can enter data into this cluster through your application
program or load data from a sequential data set using the
“REPRO” command. To load data write the
following jcl in a pds and submit it.

//JOBNAME JOB
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
REPRO -
INDATASET(EMP.DAT)
OUTDATASET(EMPLOYEE.KSDS.CLUSTER)
/*
//

STEP 4 : We can View the data through the application program ( as


if you are accessing an ordinary dataset)

2
STEP 5 : To Create An Alternate Index You Need To Write The
Following JCL

//JOBNAME JOB
//DEFAIX1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE AIX -
(NAME EMPLOYEE.KSDS.AX1.CLUSTER) -
RELATE (EMPLOYEE.KSDS.CLUSTER) -
VOLUMES(VOL1) -
CISZ(2048) -
KEYS(2,35) -
UNIQUEKEY -
UPGRADE -
RECORDSIZE(16,16) -
FREESPACE(20,20) -
SHAREOPTION(2,3) -
DATA -
(NAME(EMPLOYEE.KSDS.AIX1.DATA))
INDEX -
(NAME(EMPLOYEE.KSDS.AIX1.INDEX))
/*
//

Note : Record length of unique key alternate index = 5 + length of


alt key + length of prime key.

You might also like