Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Spring 2011

HW 05 and VSAM Step 2

CS 3530

For the lab, you will allocate and create a sequential file, then convert it to a VSAM file. For the VSAM project, you already have a sequential file from your first COBOL program. The file needs to be converted to a VSAM file. More instructions will be given at the end of the program with regards to what you need to do. Start/MF Graphical Tools/Workbench/Run ProxMVS A Allocate a Data Set From the main screen of PROXMVS proceed as follows: 1. 2. 3. Choose option 3 Utilities and press Enter key From the next screen choose A(llocate), Tab and type the name of the data set (MVS format TEST.JCL.CNTL.HW05xxx) and press Enter key (xxx are your initials) On the next screen complete the following entries: DSORG S RECFM LSEQ LRECL record length in bytes TRTCH A Press Enter key. A message appears dataset allocated. Press E to edit the allocated data set. Create a line sequential file. Create the file with 5 records use the following fields. Use your own values. Notice that you are leaving some blank spaces in this record. Field Columns Type Account Number 1 4 AN Primary Key Purchases 6 - 11 N-2 Payments 12 - 17 N-2 Balance 19 - 24 N-2

B. 1.

2. Save the file (ALT + F4) and press Enter key. Now you have a sequential file and it is cataloged. If you look on c:\catalog\JCL\CNTL\ you should see a file names HW05xxx.dat where xxx are your initials. In order to convert the sequential file to a VSAM file, you need to define a cluster. C. Define a cluster 1. From the main menu of PROXMVS choose option A. (for AMS) 2. On the next screen (AMS menu) chose option 1 to Define a cluster. Press Enter key Complete the entries on the next screen Cluster Name TEST.JCL.CNTL.CSxx (where xx are your initials) Average Length 24 Max Length 24 Primary Key POS 0000 Length 4 Press Enter key and press Esc key Now that the cluster is defined, you can convert the sequential file to a VSAM file D. Convert the line sequential file to a VSAM. From the AMS menu chose option 6 Repro and press Enter key Complete the entries on the next screen IN DATASET NAME Name of the allocated data set TEST.JCL.CNTL.HW05xxx OUT DATA SET NAME TEST.JCL.CNTL.CSxxx (the name of the cluster) Press Enter key and press Esc key Go to c:\catalog\JCL\CNTL\ There will be 2 files: csxsx.dat and csxxx.idx To process a file as indexed sequential, you need both files.

Page 1

Spring 2011

HW 05 and VSAM Step 2

CS 3530

E.

To Print the data set. From the AMS menu choose option 5 Print and press Enter key Type name of the cluster List Format C (It will display data set on the screen) Please show me the printed data set as a way to check it worked correctly. Go to c:\catalog\TEST\JCL\CNTL\... Copy the three files (the original sequential file and the indexed sequential file and index) to the Dropbox for Homework 5.

F. G.

VSAM Step 2 This part work on with your group but each of you should make a copy of the files once they are converted or put them in your discussion area so all team members have access to them. To convert your sequential master file to an indexed sequential master file for the VSAM project, do the following: A. B. C. D. E. F. G. H. Copy the most updated version of your master file to the directory c:\catalog\test\jcl\cntl The name of the master file must be 8 or fewer characters. (Does not include the extension) In this case, the sequential file is already created so you need to simply catalog the file. Choose Utilities from the ProxMVS menu Choose C to catalog adataset Type in the name of the dataset fully qualified (test.jcl.cntl.name ) omit .dat Fill in the rest of the options as you did in part B above Define a new cluster (See Part C above) and convert your master file to a VSAM file.

When you are finished, copy the .dat and .idx files created in c:\catalog\jcl\cntl to your j drive. These files are necessary for the next parts of the VSAM project. Upload these 2 files to the dropbox for Step2 of VSAM project. One upload for each team. Project files should be updated to show that this step was completed. But they SHOULD NOT be submitted this time.

Page 2

You might also like