IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

VSAM file with variable record length from JCL (no idcams)


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
tuxama

New User


Joined: 25 Jan 2007
Posts: 42
Location: france

PostPosted: Mon Jun 17, 2013 4:47 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Jun 17, 2013 4:55 pm
Reply with quote

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
View user's profile Send private message
Peter cobolskolan

Active User


Joined: 06 Feb 2012
Posts: 104
Location: Sweden

PostPosted: Mon Jun 17, 2013 5:07 pm
Reply with quote

VSAM KSDS is variable record length!
Back to top
View user's profile Send private message
Gary McDowell

Active User


Joined: 15 Oct 2012
Posts: 139
Location: USA

PostPosted: Mon Jun 17, 2013 5:11 pm
Reply with quote

I would use IDCAMS too...
RECSZ (557,937) -
KEYS (19 0) -
CISZ (18432)
Back to top
View user's profile Send private message
tuxama

New User


Joined: 25 Jan 2007
Posts: 42
Location: france

PostPosted: Mon Jun 17, 2013 5:48 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Jun 17, 2013 5:52 pm
Reply with quote

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
View user's profile Send private message
tuxama

New User


Joined: 25 Jan 2007
Posts: 42
Location: france

PostPosted: Mon Jun 17, 2013 6:09 pm
Reply with quote

Yes I try with RECFM but it's mutually exclusive with RECORG=KS
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Jun 17, 2013 6:18 pm
Reply with quote

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
View user's profile Send private message
tuxama

New User


Joined: 25 Jan 2007
Posts: 42
Location: france

PostPosted: Mon Jun 17, 2013 6:34 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top