View previous topic :: View next topic
|
Author |
Message |
karthikuma
New User
Joined: 29 Mar 2005 Posts: 62
|
|
|
|
hi,
this questions faced on one interview.simply they asked how to open the vsam data set?i said in output mode.any one plz give me an sugestion.
regards,
kumar |
|
Back to top |
|
|
kkumarv
New User
Joined: 13 May 2005 Posts: 20 Location: Bangalore/India
|
|
|
|
VSAM are of four types: KSDS,RRDS,ESDS,LDS:Entry sequenced datasets (ESDS), key sequenced datasets (KSDS) and relative record dataset (RRDS).
All can be opened in input/output or I/O mode in Cobol by declaring the file in file control. read is possible only in input mode, write in output mode whereas rewrite in I/O.
only difference KSDS read by Key or by Start command to key whereas rest can be sequentially or in block( for RRDS). Incase of ESD rewrite is only possible, no delete is possible due to entry sequence format of ( such as record like writing on a queue). RRDS read by RBA,relative byte address,preformatted fixed-length slots.
Whereas CICS command would you use to read a VSAM KSDS sequentially in First issue a STARTBR(start browse), which will position the browse at the desired record. Retrieve records by
using subsequent READNEXT commands. Indicate the end of sequential processing with the ENDBR command. If
the generic key is specified in the STARTBR command positioning in the file will be before the first record
satisfying the generic key.For reading in descending order use the READPREV instead of READNEXT. |
|
Back to top |
|
|
vishal_a
New User
Joined: 24 May 2005 Posts: 45 Location: Noida
|
|
|
|
Hi
Well according to me Ditto from ISPF menu can also work for u to open the VSAM dataset.
or the IDCAMS utility print option also works
use print ids(/) ch in front of a VSAM KSDS , ESDS ,RRDS dataset
regards
Vishal |
|
Back to top |
|
|
sasi.palani
New User
Joined: 01 Jun 2005 Posts: 14
|
|
|
|
yaa , i agree all r right , but an empty vsam dataset is condidered to be non existing dataset . if u want to open that vsam dataset , open first in output mode and the in input mode . hope it is clear. |
|
Back to top |
|
|
karthik1680 Warnings : 2 New User
Joined: 14 May 2005 Posts: 64 Location: chennai
|
|
|
|
hi thanks for your answer
can u explain it clearly.
Well according to me Ditto from ISPF menu can also work for u to open the VSAM dataset.
or the IDCAMS utility print option also works
use print ids(/) ch in front of a VSAM KSDS , ESDS ,RRDS dataset
use print ids(/) -what does it mean
reply immedeately |
|
Back to top |
|
|
|