How to declare the EMP Name, EMP No., DOB in VSAM KSDS
file? Please explain.....

Answers were Sorted based on User's Feedback



How to declare the EMP Name, EMP No., DOB in VSAM KSDS file? Please explain.......

Answer / gomathi

//PSTY0010 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE CLUSTER (NAME (SAMPLE.DATA) -
TRACKS(45 15) -
RECORDSIZE(80 80) -
FREESPACE(10 15) -
KEYS(6 0) -
INDEXED) -
DATA (NAME(SAMPLE.DATA.DAT) -
CISZ(8192)) -
INDEX (NAME(SAMPLE.DATA.IDX))
/*
//*

In Key (6,0) mention the start position and length of the
key

Is This Answer Correct ?    11 Yes 5 No

How to declare the EMP Name, EMP No., DOB in VSAM KSDS file? Please explain.......

Answer / prachi

//STEP010 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE CLUSTER (NAME (EMPLOYEE.INFO.FILE) -
VLOUMES(TSOP01) -
CYLINDERS(10,2) -
CONTROLINTERVALSIZE(4096) -
FREESPACE(10,20) -
KEYS(5,21) -
RECORDLENGHT(31,31) -
DATA -
(NAME(EMPLOYEE.INFO.FILE.DATA)) -
INDEX -
(NAME(EMPLOYEE.INFO.FILE.INDEX) -
CONTROLINTERVALSIZE(1024))
/*
//

ASSUMING FOLLOWING THINGS

EMP-NO AS KEY

EMP-NO PIC 9(5)
EMP-NAME PIC X(20)
DOB PIC X(6)

RECORD IS FIXED LENGHT

Is This Answer Correct ?    0 Yes 3 No

How to declare the EMP Name, EMP No., DOB in VSAM KSDS file? Please explain.......

Answer / shiva

Gomathi you are 100% correct..

Is This Answer Correct ?    1 Yes 5 No

Post New Answer

More VSAM Interview Questions

how do you define an altindx ? How do you use altindxs in batch, cics programs?

0 Answers   IBM,


What does a file status of 02 on a VSAM indicate?

1 Answers   IBM,


How vsam datasets are cataloged?

1 Answers   Ordain Solutions,


Hi, I want to create alternate index on VSAM file.my file structure is ex: RoomID pic x(7) R000001 Floor pic a((6) First RoomNo pic x(2) FA1 Occupied(yes/no) pic a(3) Yes Occupied Batch pic x(10). Maths i want to create alternate index on floor,roomno fields.can i create alternate index on both the fields.and tell me how to create.

1 Answers  


What does the keyranges parameter in define cluster commends do?

0 Answers  






What are the three levels of definition for the VSAM DEFINE?

2 Answers   IBM,


Would you specify FREESPACE for an ESDS?

1 Answers  


what is the concept of AIX in vsam ????

1 Answers   HCL,


is it slower if you access a record through alternative index as compared to primary index?

1 Answers   IBM,


Suppose a generation of GDG gets created in a particular step of a proc. How would you refer the current generation in a subsequent step? What would be the disposition of this generation now ?

4 Answers   Patni,


what is vsam catalog ?

2 Answers   Tech Mahindra,


What are all the ways we can create datasets?

7 Answers   IBM,


Categories