View previous topic :: View next topic |
Author |
Message |
logesht Beginner
Joined: 18 Apr 2011 Posts: 3 Topics: 1 Location: Chennai
|
Posted: Tue Apr 26, 2011 2:06 am Post subject: Can we create VSAM KSDS file using SORT utility |
|
|
Is it possible to create a VSAM KSDS file using SORT utility.If so pls let me know |
|
Back to top |
|
|
Anuj Dhawan Intermediate
Joined: 19 Jul 2007 Posts: 298 Topics: 7 Location: Mumbai,India
|
Posted: Tue Apr 26, 2011 6:17 am Post subject: |
|
|
It's not possible, AFAIK. _________________ Regards,
Anuj |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Tue Apr 26, 2011 10:28 am Post subject: |
|
|
to create a VSAM you need IDCAMS Define.
sort can load a VSAM file, probably faster than IDCAMS Repro _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Tue Apr 26, 2011 10:40 am Post subject: |
|
|
logesht,
The following DFSORT JCL will give you the desired results. The output is a KSDS file which has the key at offset 0 for a length of 10 bytes and an lrecl of 216. It also adds 10 records to the KSDS cluster with the seqnum as key. You can change/add any additional parameters you want.
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
A
//SORTOUT DD DSN=Your Output VSAM file,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(1,1),RLSE),
// RECORG=KS,LRECL=216,KEYLEN=10
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL REPEAT=10,BUILD=(SEQNUM,10,ZD,216:X)
//* |
Run this step to check the attributes of the vsam file created above
Code: |
//STEP0150 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT ENT('Your Output VSAM file') ALL
//* |
_________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Tue Apr 26, 2011 4:08 pm Post subject: |
|
|
I knew that if i commented in this post, i would end up eating my lunch.
Kolusu,
I was going to ask how long have we been able to define a vsam with dcb parms,
but, maybe forever is the answer? _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Tue Apr 26, 2011 5:51 pm Post subject: |
|
|
dbzTHEdinosauer wrote: | Kolusu,
I was going to ask how long have we been able to define a vsam with dcb parms, but, maybe forever is the answer? |
dbzTHEdinosauer,
AFAIK VSAM datasets can defined in JCL from OS/390 days itself. Using JCL for VSAM is documented in detail in "DFSMS Using Data Sets". May be that is the reason it didn't get much attention, even though all the parameters that can be used with VSAM datasets are explained individually in JCL reference manual.
Here is the link for using JCL for VSAM from the book DFSMS Using Data Sets.
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT2D490/2.13 _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Anuj Dhawan Intermediate
Joined: 19 Jul 2007 Posts: 298 Topics: 7 Location: Mumbai,India
|
Posted: Wed Apr 27, 2011 5:30 am Post subject: |
|
|
Thanks Kolusu. IDCAMS had been my choice since so long. Did not think about RECORG=KS.
But this sounds if this is to do with DCB parameters - may be, as original question asks for, not only SORT any suitable program will do it then. e.g.: IEFBR14 -- of course, it would be any empty VSAM, though.
Thanks again for the links. _________________ Regards,
Anuj |
|
Back to top |
|
|
logesht Beginner
Joined: 18 Apr 2011 Posts: 3 Topics: 1 Location: Chennai
|
Posted: Wed Apr 27, 2011 10:14 am Post subject: |
|
|
Thank you very much! |
|
Back to top |
|
|
logesht Beginner
Joined: 18 Apr 2011 Posts: 3 Topics: 1 Location: Chennai
|
Posted: Thu Apr 28, 2011 1:07 am Post subject: |
|
|
Hi,
Can you pls tell me how we can define the offset here?
Thanks,
Logesh |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Thu Apr 28, 2011 6:18 am Post subject: |
|
|
in the link that Kolusu gave you,
that you decided not to read,
look for:
2.13.2 Creating VSAM Data Sets with JCL,
and
keyoff _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
|
|