Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
tuxama

New User


Joined: 25 Jan 2007
Posts: 32
Location: france

PostPosted: Mon Jun 17, 2013 4:47 pm    Post subject: VSAM file with variable record length from JCL (no idcams)
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: 8593
Location: Back in jolly old England

PostPosted: Mon Jun 17, 2013 4:55 pm    Post subject:
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    Post subject:
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    Post subject:
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: 32
Location: france

PostPosted: Mon Jun 17, 2013 5:48 pm    Post subject: Reply to: VSAM file with variable record length from JCL (no
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: 7904
Location: Bellevue, IA

PostPosted: Mon Jun 17, 2013 5:52 pm    Post subject:
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: 32
Location: france

PostPosted: Mon Jun 17, 2013 6:09 pm    Post subject: Reply to: VSAM file with variable record length from JCL (no
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: 7904
Location: Bellevue, IA

PostPosted: Mon Jun 17, 2013 6:18 pm    Post subject:
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: 32
Location: france

PostPosted: Mon Jun 17, 2013 6:34 pm    Post subject: Reply to: VSAM file with variable record length from JCL (no
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us