GeekInterview.com
Series: Subject: Topic:

VSAM Interview Questions

Showing Questions 1 - 20 of 44 Questions
First | Prev | | Next | Last Page
Sort by: 
 | 

What is average record length in ksds?

Asked By: javid | Asked On: Apr 13th, 2006

Answered by: Rishu on: Aug 2nd, 2014

There is no specific rule about average record length. It should be less than the maximum records length. VSAM uses this figure for efficiency purpose only.

Answered by: venkat.palla on: Aug 7th, 2007

Average record length is the sub parameter of record size, which need to be defined while defining the vsamfile.  This sub parameter has a value which is less than or equal to another sub paramet...

What is the difference between vsam & data base tables?What is flat file ? Difference between flat files,vsam,ps files?What is the difference between esds,ksds?What is rrds in vasm ? Difference between...

Asked By: latha | Asked On: Aug 22nd, 2007

Answered by: Rishu on: Aug 1st, 2014

VSAM is a Non-Relational database system while DB2 is a relational Database System(RDBS).

Answered by: nlarsensmith on: Dec 1st, 2010

Ans1) DB tables are preferred when we want to maintain relationship amoung data. If no relationship is required then we can choose any. Remeber DB2 tables are always stored in VSAM files.Ans2)Flat fil...

What do you mean by rdw in vsam?

Asked By: Interview Candidate | Asked On: Aug 31st, 2005

Answered by: Rishu on: Jul 30th, 2014

In addition to above, out of 4 byte of RDW, 2 bytes are for system control information and rest 2 byte for length of the record.

Answered by: Venkat on: May 21st, 2006

Guys,As you are aware, RDW stands for Record Descriptor Award.This is the first 4 bytes in a VSAM - Variable Record Length file that stores the actual length of the record. This is hidden if you brows...

Copy records without duplicates

Asked By: varun | Asked On: Jul 18th, 2011

How to copy records from 2 files with duplicates? Without duplicates?

Answered by: Rishu on: Jul 30th, 2014

With Duplicates:- simply merge two files. Without Duplicates:- SUM FIELDS=NONE

Answered by: sekhar on: Jan 8th, 2012

UNION..........WITH OUT DUPLICATES
UNION ALL.........WITH DUPLICATES

How do you split a file data into multiple files?

Asked By: Manjula Pathakamuri | Asked On: Apr 9th, 2011

Explain with example?

Star Read Best Answer

Editorial / Best Answer

Answered by: jjtharappel

View all answers by jjtharappel

Member Since Nov-2011 | Answered On : Nov 24th, 2011

Run a JCL with the below sort step

Code
  1. //STEP1    EXEC PGM=SORT                            
  2. //SORTIN   DD DSN=input-file-name,DISP=SHR          
  3. //SORTOF01 DD DSN=output-file-name-1,          
  4. //            DISP=(NEW,CATLG,DELETE),              
  5. //            SPACE=...
  6. //            LRECL=...,RECFM=FB    
  7. //SORTOF02 DD DSN=output-file-name-2,          
  8. //            DISP=(NEW,CATLG,DELETE),              
  9. //            SPACE=...
  10. //            LRECL=...,RECFM=FB                    
  11. //SORTOF03 DD DSN=output-file-name-3,          
  12. //            DISP=(NEW,CATLG,DELETE),              
  13. //            SPACE=...
  14. //            LRECL=...,RECFM=FB                        
  15. //SYSOUT   DD SYSOUT=*                              
  16. //SYSIN    DD *                                      
  17.   SORT FIELDS=COPY                                        
  18.   OUTFIL FNAMES=SORTOF01,                                
  19.    INCLUDE=(cond for file 1)  
  20.   OUTFIL FNAMES=SORTOF02,                                
  21.    INCLUDE=(cond for file 2)  
  22.   OUTFIL FNAMES=SORTOF03,                                
  23.    INCLUDE=(cond for file 3)
  24. /*
  25. //*
  26.  

Answered by: Rishu on: Jul 30th, 2014

In addition to the above solution, we can use SPLIT BY in SORT. But it will depend on condition of split.

Answered by: jjtharappel on: Nov 24th, 2011

Run a JCL with the below sort step "jcl //STEP1 EXEC PGM=SORT //SORTIN DD DSN=input-file-name,DISP=SHR //SORTOF01 DD DSN=output-file-na...

Splitting and merging of file using sort

Asked By: Mohamedaadhil | Asked On: Oct 19th, 2011

Hi,i have a file which contains 3 types of transactions with account number,transaction type and transaction creation date.The transaction types are 35,39 and 41.The file has duplicate records for all transactions(ie 2 records for each account number for each transaction).Now I need to remove the duplicate...

Answered by: Rishu on: Jul 30th, 2014

It is not possible to do it in single SORT step. 2 steps are required. First, extract all 39 type transaction record using EXCLUDE statement. Second, remove duplicate from step 1 file with SUM FIELDS=NONE. Third, merge output from step1 and 2.

Answered by: ramu on: Jun 27th, 2012

Use ksds files it will wont allow duplicates in this keys are used to eliminates the duplicates

What is the default size of the record

Asked By: bvenkat002 | Asked On: Jul 23rd, 2008

Star Read Best Answer

Editorial / Best Answer

Answered by: nlarsensmith

View all answers by nlarsensmith

Member Since May-2009 | Answered On : Dec 1st, 2010

If the record size parameter is not specified when the cluster is created, then the size is determined by the size of the Control Interval.

Answered by: kumar on: Jul 3rd, 2014

For non spanned--(4089,4089)
for spanned---(4086,32600)

Answered by: nlarsensmith on: Dec 1st, 2010

If the record size parameter is not specified when the cluster is created, then the size is determined by the size of the Control Interval.

What do you mean by dirty read

Asked By: Interview Candidate | Asked On: Aug 5th, 2005

Answered by: Srivi on: May 19th, 2013

Quite often in database processing, we come across the situation wherein one transaction can change a value, and a second transaction can read this value before the original change has been committed ...

Answered by: vijay jessy on: Nov 6th, 2012

Pls anybody explain clearly. we dont need the definition from ibms manual.

How to read last record in vsam using cics ?

Asked By: deepa | Asked On: Aug 23rd, 2011

Answered by: K.Abhilash Kumar on: Nov 26th, 2012

We can read last record in CICS using Read Prev command by moving High-Values to the key. Move High-Values to Ws-Key ExEC CICS STARTBR FILE(LOGICAL FILE NAME) RIDFLD(WS...

Answered by: chandra on: Oct 20th, 2011

First of all we have to do

MOVE HIGH-VALUES TO KEY-NAME
AFTER

READ NEXT RECORD
DISPLAY 'RECORD'

Reading ksds file

Asked By: rpg0247 | Asked On: Jun 29th, 2011

How do you read a ksds file in reverse order?

Answered by: hemanth.pesce on: Sep 29th, 2011

- Use STARTBR Command to point it to last record with by moving Keys to HIGH values .
-Then use READPREV to read records ...

Vsam file with null data

Asked By: srihari | Asked On: Jul 17th, 2011

How do you create a new vsam file with null record as header with jcl please provide me with coding

Vsam data sets

Asked By: gpandu007 | Asked On: Mar 24th, 2010

How will you access the vsam data sets?

Answered by: rpg0247 on: Jul 13th, 2011

After getting list of files just type below code before the vsam file

print ch ids(/)

Answered by: siva9531 on: Jun 17th, 2010

Print ch ids(/)

Vsam ksds cluster declaration

Asked By: rpg0247 | Asked On: Jul 1st, 2011

Write a program the following scenarios, declare vsam ksds cluster by jcl by the following record layout?Customer info(7) comp3,customer no x(6),customer name x(20),customer address x(35),customer mail-id x(25),and load the above layout thru jcl?

How vsam datasets are cataloged?

Asked By: dsrcbalaji | Asked On: Apr 6th, 2006

Answered by: Jaypreeth on: May 1st, 2011

All VSAM datasets are SMS managed. SMS managed datasets are cataloged. So while creating a vsam dataset using the IDCAMS utility the dataset is  cataloged.

Answered by: Jaypreeth on: May 1st, 2011

All VSAM datasets are SMS managed. So by the IDCAMS utility VSAM dataset is created which is cataloged..

While designing vsam files,what's the best way to choose control interval size for the data and the index?

Asked By: vinay | Asked On: Feb 14th, 2006

Answered by: nlarsensmith on: Dec 1st, 2010

Best way is to choose small CI size for random access and large CI size for direct access. Without specifying CISZ the defaults will be 4096 for data and 1024 for index. Remember these sizes are obtai...

Answered by: dhs01 on: Apr 15th, 2009

1024 and 4096 are powers of 2. You could specify 1000 and 4000 but VSAM would actually use 1024 and 4096 although I'm not sure if the full 1024 would actually be available to you. Short answer is that since that is the number VSAM will use, 1000 or 4000 will not save you anything.  

How to retrieve record from a flat file?

Asked By: jamirahmad mulla | Asked On: Mar 27th, 2007

Answered by: nlarsensmith on: Dec 1st, 2010

We can directly read a record from a flat file using Cobol READ command!If you want to load the flat file into a PS file use REPRO command in IDCAMS Util.If you want to load a flat file which was obta...

Answered by: Shashank Gite on: Jan 3rd, 2009

To retrieve record from flat file you can use IDCAMS utility with REPRO command and can copy the data into either a VSAM data set or another flat file

Explain the concept behind spanned records & shareopts ?

Asked By: kanchhana | Asked On: Apr 30th, 2007

Answered by: nlarsensmith on: Dec 1st, 2010

These options are not corrolated!Spanned record : If a CI has not enough freespace to fit in a new record, then the record  is spanned to the next CI. If the next CI does not have enought freespa...

Answered by: ambadiramesh on: Feb 15th, 2010

It seems fine regarding CI split. CA split also occurs in the same as CI split. But remember these two concepts comes into the picture in case of KSDS only.Please let me know if you have any doubts.Regards,Ramesh.Ambadi.

What is the procedure for running the batch job in mainframe?

Asked By: chinni | Asked On: Apr 5th, 2006

Answered by: nsk_sasi on: Oct 19th, 2010

Friends, let me explain with an example:--EG:-Adding two numbersStep-1:- We need to compile that program and that compiled program(i.e Error free code) we need to keep in one Load Library (EG:-AB...

Answered by: sunil on: May 21st, 2006

Prepare a RUNJCL and submit it.

What is the record size for alternate index if alternate key is unique

Asked By: kanchhana | Asked On: Apr 30th, 2007

- whether record size is (5+alternate key length+n*pmy key length ) or (5+pmy key length + n*alternate key length) where 'n' is the no. Of duplicate alternate keys.

Answered by: sagyant on: Oct 3rd, 2010

what i have come across,it is always 5 + alternate key length + n*primary Key lengththe key for alternate index is the alternate key and in the data part we have all the related primary keys populated.But i still do not understand how this data part get populated...:)

Define ksds

Asked By: ravtej556 | Asked On: Jun 27th, 2010

How will you define a ksds of avg length-100 and max length-150 and key length 10

Star Read Best Answer

Editorial / Best Answer

Answered by: Yaswanth kodali

View all answers by Yaswanth kodali

Member Since Jul-2010 | Answered On : Jul 12th, 2010

We can define the KSDS cluster by two ways by using the file-aid or by using the IDCAMS Utlity..

By using the IDCAMS utility we can define the record with average length 100 and maximum length 150 with keylength 10 starting at 0 as follows

//step01 EXEC pgm=IDCAMS
//SYSIN DD *

   DEFINE CLUSTER(NAME(userid.name.sample) -
                               VOLUMES(MVS801)              -
                               RECORDSIZE(100 150)        -
                               TRACKS(10 20)
                               KEYS(10 0)                          -
                               INDEXED  )                          -
                    DATA ( NAME(userid.name.sample.data))  -
                    INDEX( NAME(userid.name.sample.index)) -     
/*
// 

Answered by: Yaswanth kodali on: Jul 12th, 2010

We can define the KSDS cluster by two ways by using the file-aid or by using the IDCAMS Utlity..By using the IDCAMS utility we can define the record with average length 100 and maximum length 150 with...

First | Prev | | Next | Last Page

 

 

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.