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

Explain the meaning and syntax for the START command. ?

4 Answers   IBM,


What is the difference between CI( Control Interval)and CA (Control Area)?

3 Answers   Infosys, TCS,


if not using the 'commit' when closing VSAM file,what will happend

5 Answers   CSC,


What is a path?

1 Answers  


What is the purpose of relative record data set used in vsam?

0 Answers  






Why is it required to have a keyed directed retrieval?

0 Answers  


The first VSAM file V1 has 2 fields A and B . There is a DB2 file which has fields E and f. We need the fields A, B , E and F to another VSAM file called V2. Kindly mention the logic in procedure division in cobol..

2 Answers   Cap Gemini,


What is IDCAMS ?

2 Answers  


What is an alternate index and path ?

2 Answers   Infosys, TCS,


Under idcams, multiple functions can be executed, each of which returns a condition code. What will be the condition code returned to the operating system?

0 Answers  


Is it slower if you access a record through alt index as compared to primary index?

0 Answers  


what do you mean by gdg in vsam?

0 Answers   IBM,


Categories