Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8165
Location: East Dubuque, Illinois, USA

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: 8165
Location: East Dubuque, Illinois, USA

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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us