Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Create the VSAM Master file (KSDS) using IDCAMS utility

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Lavanya_Dhushetty
Warnings : 2

New User


Joined: 30 Aug 2007
Posts: 24
Location: Chennai

PostPosted: Fri Sep 07, 2007 11:24 am    Post subject: Create the VSAM Master file (KSDS) using IDCAMS utility
Reply with quote

1) Create the VSAM Master file for Employee Information

a) Create the VSAM Master file (KSDS) using IDCAMS utility. Use the following attributes for the
creation of the VSAM file.

Record format FB Primary Extents 2 Cylinders
Record Length 200 Secondary Extents 5 Cylinders
Key First 6 bytes of the file

Follow the naming conventions as given below:-

<userid>.UNCD.EMP.CLUSTER
<userid>.UNCD.EMP.DATA
<userid>.UNCD.EMP.INDEX

b) The VSAM File will have the following layout:-

Se. No. Field Name Length Description/Comments
1 Emp-ID X(6) Key Field – Starting from 100001 – Increment by 1
2 Emp-Type-Code X(2) Valid Values : PA/A/SA/PM
3 License-Valid X Values – ‘Y’ and ‘N’
4
First Name X(20)
5 Middle Name X
6 Last Name X(20)
7 Date-of-birth MM-DD-YY
8 Marital Status X Valid Values: ‘S’,’D’,’M’ (Single/Divorced/Married)
9 Sex-Code X Valid Values: ‘M’ and ‘F’
10 SSN X(11) Data Format: 999-99-9999
11 Policy-No X(6)


2) Create the VSAM Master file for Policy’s Information

a) Create the VSAM Master file (KSDS) using IDCAMS utility. Use the following attributes for the
creation of the VSAM file.

Record format FB Primary Extents 2 Cylinders
Record Length 200 Secondary Extents 5 Cylinders
Key First 6 bytes of the file

Follow the naming conventions as given below:-

<userid>.UNCD.POLICY.CLUSTER
<userid>.UNCD.POLICY.DATA
<userid>.UNCD.POLICY.INDEX


b) The VSAM File will have the following layout:-



Se. No. Field Name Length Description/Comments
1 Policy-Id X(6) Key Field – Starting from A00001 – Increment by 1
2 Policy-Eff-Date MM-DD-YY
3 Policy-End-Date MM-DD-YY
4 Policy-Status X A- Active;I –Inactive
5 Policy-Owner-Name X(30)


b) Load the VSAM File with at least 10 records. This set of records should contain/satisfy the following conditions:

1) Valid records should contain valid values wherever applicable.
The list of valid values have been provided in the Description/comments column.
Date validation (Effective/End date are valid and current date fall between these)

2) Atleast one record should have Emp-Type-Code other than specified in the description columns so that it is errored out.

3) Create a sequential Error Report File.

4) Create a Header /Trailer will contain the statistics

This file is for storing erratic records (To report fields that have invalid values)

Record format FB Primary Extents 10 Tracks
Record Length 80 Secondary Extents 10 Tracks

The file should have the following layout:-

Se. No. Field Name Length Description/Comments
1 Emp-Id X(6) First 6 bytes of the VSAM Master file
2 Error-Code X(3) E01 – Invalid Emp-Type
E02 – Inactive – Other

3 Error-Field-Name X(30) Name of the field that has invalid value
4 Error-field-value X(20) The invalid field value
5 Error-Comments X(21) Description/reason for invalidity


5) Create Output File with the following structure:-

Record format FB Primary Extents 2 Cylinders
Record Length 200 Secondary Extents 5 Cylinders



Se. No. Field Name Length Description/Comments
1 Reference ID (PK) Unique Key – Auto Generated (Start with 900005) – Increment by 1
2 First Name X(20)
3 Middle Name X
4 Last Name X(20)
5 DOB MM-DD-YY
6 Sex Code X
7 Marital Status X
8 SSN X(11)
9 Policy-Id X(6)
10
Policy-Eff-Date MM-DD-YY
11 Policy-End-Date MM-DD-YY
12 Policy-Status X
13 Policy-Owner-Name X(30)

6) Guidelines for COBOL Program:-

&#61656; The Program should read the VSAM file, do the processing and write into the OUTPUT file or error file accordingly.

&#61656; You can populate the input VSAM files through FileAid options.

&#61656; All error conditions must be handled in your program. File Status should be checked for every Open, Read and Write operations.

&#61656; Do not use ‘Go to’ statements in the programs

&#61656; The program should follow top-to-bottom approach.

&#61656; Use scope terminators appropriately.


This is my Program .I am reading the emp file sequentially and sending the policy id of employee file to policy id of policy file.But when reading the policy file it is showing error as file status 23(record not found).Pls Cold someone help on this?????
Back to top
View user's profile Send private message

agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 686
Location: Earth

PostPosted: Fri Sep 07, 2007 11:40 am    Post subject:
Reply with quote

[quote]file status 23(record not found).quote].
well, it also indicates FILE NOT FOUND...
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Fri Sep 07, 2007 11:52 am    Post subject:
Reply with quote

Abhijit,

Quote:
well, it also indicates FILE NOT FOUND...


True for OPTIONAL files.
Back to top
View user's profile Send private message
rajaherein

New User


Joined: 11 Jan 2007
Posts: 23
Location: chennai

PostPosted: Fri Sep 07, 2007 12:00 pm    Post subject:
Reply with quote

Please post your COBOL code involving the matching logic. May be the Policy ID of Policy File and Policy No of Employee File are wrongly loaded. Check the Policy ID of Policy file and Policy No of Employee File.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us