View previous topic :: View next topic
|
Author |
Message |
tuxama
New User
Joined: 25 Jan 2007 Posts: 42 Location: france
|
|
|
|
Hello,
I have a VB file (QSAM) that contains 236,661 records with a smallest lrecl=557 and the largest lrecl=937.
I sort it and I define the output file like this :
Code: |
//SORTOUT DD DSN=I8C.QS2VS,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(200,2),RLSE),
// RECORG=KS,KEYLEN=19,KEYOFF=0,LRECL=937
|
The listcat give me this :
Code: |
ATTRIBUTES
KEYLEN----------------19 AVGLRECL-------------937 BUFSPACE-----------37376 CISIZE-------------18432
RKP--------------------0 MAXLRECL-------------937 EXCPEXIT----------(NULL) CI/CA-----------------45
SHROPTNS(1,3) RECOVERY UNIQUE NOERASE INDEXED NOWRITECHK UNORDERED NOREUSE
NONSPANNED
|
To me the VSAM is defined with fixed record length.
How to define it with variable record length ?
Thank's for your help and your attention. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Why not use IDCAMS, it will give you exactly what you want.
Suppose you could talk to your storage guys to set up a specific DATACLAS,
but the reply would probably be along the lines of "Close the door on your way out" |
|
Back to top |
|
|
Peter cobolskolan
Active User
Joined: 06 Feb 2012 Posts: 104 Location: Sweden
|
|
|
|
VSAM KSDS is variable record length! |
|
Back to top |
|
|
Gary McDowell
Active User
Joined: 15 Oct 2012 Posts: 139 Location: USA
|
|
|
|
I would use IDCAMS too...
RECSZ (557,937) -
KEYS (19 0) -
CISZ (18432) |
|
Back to top |
|
|
tuxama
New User
Joined: 25 Jan 2007 Posts: 42 Location: france
|
|
|
|
Yes, there are no problems with IDCAMS :
Code: |
//DELDEF EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
DELETE I8C.QS2VS PURGE
SET MAXCC = 00
DEFINE CLUSTER(NAME(I8C.QS2VS) -
CYL(200 2) -
KEYS(019 000) -
RECORDSIZE(557 937) -
SPEED -
)
/*
|
Code: |
ATTRIBUTES
KEYLEN----------------19 AVGLRECL-------------557 BUFSPACE-----------37376 CISIZE-------------18432
RKP--------------------0 MAXLRECL-------------937 EXCPEXIT----------(NULL) CI/CA-----------------45
SHROPTNS(1,3) SPEED UNIQUE NOERASE INDEXED NOWRITECHK UNORDERED NOREUSE
NONSPANNED
|
I try to allocate the VSAM dynamically in the JCL with the ALLOCATE. Despite several attempts I having trouble with the expected result, probably I do not quite understand the doc ; this is the raison of my post here. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Did you try adding RECFM to your JCL?
You might also want to talk to your site support group; they may already have a DATACLASS established that would give you what you want. |
|
Back to top |
|
|
tuxama
New User
Joined: 25 Jan 2007 Posts: 42 Location: france
|
|
|
|
Yes I try with RECFM but it's mutually exclusive with RECORG=KS |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
If there is no DATACLASS defined by your site support group for what you want, I suspect, based on reading the manual, that what you want to do can only be done through IDCAMS. There does not appear to be any mechanism in JCL to set s VSAM KSDS average record length to be different than the maximum record length. |
|
Back to top |
|
|
tuxama
New User
Joined: 25 Jan 2007 Posts: 42 Location: france
|
|
|
|
Thank's for your help.
Because, no DATACLASS defined for what I want I code del/def idcams first and in the SORTOUT I defined the file disp=mod
Code: |
//*********************************************************************
//* DELDEF IDCAMS *****************************************************
//*********************************************************************
//DELDEF EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
DELETE I8C.QS2VS PURGE
SET MAXCC = 00
DEFINE CLUSTER(NAME(I8C.QS2VS) -
CYL(200 2) -
KEYS(019 000) -
RECORDSIZE(557 937) -
SPEED -
)
/*
//SORT EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=I8C.QSAM
//SORTOUT DD DISP=MOD,DSN=I8C.QS2VS
//SYSIN DD *
SORT FIELDS=(5,19,CH,A)
/*
//*
|
|
|
Back to top |
|
|
|