MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Record length for VB file when copied from VSAM file.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management
View previous topic :: View next topic  
Author Message
Meg
Beginner


Joined: 08 Jul 2003
Posts: 44
Topics: 16

PostPosted: Tue Apr 12, 2005 6:47 pm    Post subject: Record length for VB file when copied from VSAM file. Reply with quote

Hi,
I want to copy a KSDS file to a Variable length file. The maximum length of the VSAm file is 17679 and the average record length is 1087. I want to copy this VSAM file to the VB length file using IDCAMS REPRO. I am not sure what would be the record length to specify for VB file. If I assign 17679 as the record length, the space occupied will be huge. I am not sure if it is right to assign the average lecord length.
Please suggest.
Meg
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Apr 12, 2005 9:53 pm    Post subject: Reply with quote

Meg,

Your output file LRECL should always be the maximum length of the vsam file. I would suggest that you use SORT with VLTRIM parameter.The VLTRIM parameter defines a byte to be deleted from the end of a variable-length record. All prior occurrences of this byte will also be deleted until a byte that is not equal to the trim byte is found. The resulting records are decreased in record length.

I assuming that you have spaces at the end of every record. so we remove all the trailing spaces using VLTRIM

Code:

//STEP0100 EXEC PGM=SORT                           
//SYSOUT   DD  SYSOUT=*                           
//SORTIN   DD  DSN=YOUR INPUT VAR KSDS,
//             DISP=SHR                           
//SORTOUT  DD  DSN=YOUR OUTPUT VARIABLE FILE,               
//             DISP=(NEW,CATLG,DELETE),           
//             UNIT=SYSDA,                         
//             SPACE=(CYL,(X,Y),RLSE)           
//SYSIN    DD  *                                   
  SORT FIELDS=COPY                                 
  OUTFIL VLTRIM=C' ',OUTREC=(1,4,5)                 
/*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Meg
Beginner


Joined: 08 Jul 2003
Posts: 44
Topics: 16

PostPosted: Wed Apr 13, 2005 12:57 pm    Post subject: Thanks. But the space occupied is huge. Any help? Reply with quote

Thanks Kolusu. That helped. But I just have a concern on the space. Earlier we had the compressed form of the VSAM file in the flat file using ADRDSSU utility and the space occupied was very less. But now since we are using Sort to simply copy the contents, the space occupied is very huge and we are unable to address this issue. Can I get any help around this.
Thanks,
Meg
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group