In this code from c++ programming guide the author uses DUMMY.DATA
and no word about what should be inside. Any ideas?
//REPRO EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
REPRO INDATASET(userid.DUMMY.DATA) -
OUTDATASET(userid.KSDS.CLUSTER)
/*

Is this code the same?
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
REPRO INDATASET(userid.my.test) -
OUTDATASET(userid.KSDS.CLUSTER)
But after this fopen works fine but creating of BLDIndex failed. Any ideas?

You know how long the records are for the base cluster, because you need that info to define the cluster.

In an external dataset, set up two records equal to the maximum record length of the file, and for each byte us '00'X HEX zeros - low values, and one record with 'FF'X - HEX FF - high values.

These populate the VSAM cluster, which in effect initialises it making it totally usable.

I'll try and post some REXX code tomorrow, I've posted something very similar on another forum, so will try and dig it up either from there or from my own library, if I kept a copy. It will initialise any VSAM KSDS just by knowing the cluster name.

Here's the JCL code to run the REXX. It executes an ISPF environment in batch. Because I trip from site to site where standards differ I use loads of symbolics so that the code executes immediately at any site after initial set up.

The REXX will populate the cluster with two records, one with a key value of HEX low values '00'X and one with HEX high values 'FF'X. Obviously the code can be changed if there are any specific requirements for header/trailer information to be inserted.

You can also change the length of the WORK DD dataset to accomodate records larger than the 2004 specified.

Sorry if I asked something wrong. I am new to this. may be you recommend some books about creating vsam. I have only DFSMS using data sets and c++ user's guide. And may be there is a way for more easier way to create this dummy data set?

unfortunately not available. I can't understand what should be inside.
000000
000000 and where
fffff
fffff
?
And can't find in documentation. no word about it. in all examples they use something like userid.dummy

To copy
?dummy? indexed-sequential records (with X'FF' in the first byte), specify the
DUMMY option in the ENVIRONMENT parameter.

Indexed-sequential is a completely different access method from VSAM, and as far as I am aware is no longer supported by IBM, being replaced by VSAM.

Quote:

unfortunately not available. I can't understand what should be inside.
000000
000000 and where

Once a VSAM file has been defined, it can not be immediately used by any program until it has been initialised. This can be done by the first program to access the file, but that is not how I usually do this.

You know the offset of the key within the record, so add 1 to the offset to get the real position of the record.

Let us assume it is 80 bytles long with the key at offset 0 (position 1), for a length of 12.

Create a dataset that is 80 bytes long, and edit it by creating a blank line. Then on the command line type HEX ON

So now you have built the data to initialise your KSDS. I for one also generate a 'FF'X as well. So create a new line in your dataset and this time with HEX ON, overtype the 4's in the top line with F, and also each 0 below the 4.