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 

To create a variable length record seq file ..

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


Joined: 23 May 2003
Posts: 77
Topics: 26

PostPosted: Thu Jul 28, 2005 9:28 am    Post subject: To create a variable length record seq file .. Reply with quote

Which utility will be used to create a variable length record sequential file ? Please provide the JCL here.

Nancy
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Jul 28, 2005 9:36 am    Post subject: Reply with quote

Nancy,

You can use IDCAMS REPRO,IEBGENER, IEFBR14, Or utilities like SORT,FileAid, or Easitrieve.

IDCAMS Example:

Code:

//STEP0100 EXEC PGM=IDCAMS                                 
//SYSPRINT DD  SYSOUT=*                                     
//IN       DD  *   
//OUT      DD  DSN=YOUR VB OUTPUT FILE,                         
//             DISP=(NEW,CATLG,DELETE),                     
//             UNIT=SYSDA,                                   
//             SPACE=(CYL,(X,Y),RLSE),
//             LRECL=ZZZ,RECFM=VB
//SYSIN    DD  *                                           
 REPRO IFILE(IN) OFILE(OUT)                             
/*           



IEBGENER example:

Code:
 

//STEP0100 EXEC PGM=IEBGENER                               
//SYSPRINT DD  SYSOUT=*                                     
//SYSUT1   DD  *
//SYSUT2   DD  DSN=YOUR OUTPUT VB FILE,                         
//             DISP=(NEW,CATLG,DELETE),                     
//             UNIT=SYSDA,                                   
//             SPACE=(CYL,(X,Y),RLSE),
//             LRECL=ZZZ,RECFM=VB
//SYSIN    DD  DUMMY                                       
/*


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
Nancy
Beginner


Joined: 23 May 2003
Posts: 77
Topics: 26

PostPosted: Thu Jul 28, 2005 9:48 am    Post subject: Reply with quote

Thanks Kolusu for your quick response. Please clarify one thing, what has to be supplied in LRECL when it wil be the variable length record and we really don't know the length at the time of creating the sequential file.

Nancy
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Jul 28, 2005 10:11 am    Post subject: Reply with quote

Quote:

Please clarify one thing, what has to be supplied in LRECL when it wil be the variable length record and we really don't know the length at the time of creating the sequential file.


Nancy,

Even though a file is defined as variable the actual LRECL is fixed. It is the records inside the file that have the variable length.

ex: let us say I want to create a file as variable block file. So I need to consider the maximum length of each record that I want to store in that file , let us assume 4500 and minimum length would be 1 bytes.So you define/create the file with max record possible.. By doing so , you can store the max lrecl record as well as min lrecl record.

Remember that VB files have an extra 4 bytes for the RDW. So when you create a VB file you need to create it with (max lrecl+ 4) as LRECL on the DCB parameter.

so you would create the dataset as follows

Code:

//STEP0100 EXEC PGM=IEBGENER                               
//SYSPRINT DD  SYSOUT=*                                     
//SYSUT1   DD  *
//SYSUT2   DD  DSN=YOUR VB FILE,                         
//             DISP=(NEW,CATLG,DELETE),                     
//             UNIT=SYSDA,                                   
//             SPACE=(CYL,(X,Y),RLSE),
//             LRECL=4504,RECFM=VB
//SYSIN    DD  DUMMY                                       
/*


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
Nancy
Beginner


Joined: 23 May 2003
Posts: 77
Topics: 26

PostPosted: Fri Jul 29, 2005 6:27 am    Post subject: Reply with quote

Now it is clear to me. Thanks Kolusu.
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 -> Utilities 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