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

Incresaing record length of VB file in run JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
siddhartha biswas
Currently Banned

New User


Joined: 04 May 2008
Posts: 15
Location: india

PostPosted: Wed Sep 03, 2008 12:41 pm
Reply with quote

Hi all,

I need to merge three variable block files with different record lengths (header, trailer and content files) into one file. But for that I should increase the record length of the header and trailer files to make it equal to the length of the content file. Do any one has a solution for this?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Sep 03, 2008 12:50 pm
Reply with quote

siddhartha,

For VB files, RDW field will hold lengths of individual records.
Could you please post a few sample records with file-attributes of input/output files.

Thanks,
Arun
Back to top
View user's profile Send private message
siddhartha biswas
Currently Banned

New User


Joined: 04 May 2008
Posts: 15
Location: india

PostPosted: Wed Sep 03, 2008 1:00 pm
Reply with quote

Header record (vb) lrecl: 50
Content record(vb) lrecl: 150
Trailer record (vb) lrecl: 50

I need to increse the length of header and trailer records to 150 so that I can merge all three files in the same sequence as given above.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed Sep 03, 2008 1:01 pm
Reply with quote

Simplest way is to use VTOF and make all files to fixed length(max of all)
then you can easily merge it to one...
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Wed Sep 03, 2008 1:46 pm
Reply with quote

Quote:
Simplest way is to use VTOF and make all files to fixed length(max of all)
then you can easily merge it to one...


Even simpler would be to have the output file DCB set to the longest (i.e. 150). A VB file, by definition, can contain records that are shorter than the LRECL.

Garry.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Sep 03, 2008 7:56 pm
Reply with quote

siddhartha,

As pointed out by Garry, you can achieve this by setting the Output LRECL to the maximum of all the 3 files.

You might want to give this a try.
Code:
//STEP1    EXEC PGM=SORT                                         
//SYSOUT   DD SYSOUT=*                                           
//SORTIN   DD DISP=SHR,DSN=..Header-file  --------> VB,LRECL=50 
//         DD DISP=SHR,DSN=..Data-file    --------> VB,LRECL=150
//         DD DISP=SHR,DSN=..Trailer-file --------> VB,LRECL=50 
//SORTOUT  DD DISP=MOD,DSN=..Output-file  --------> VB,LRECL=150
//SYSIN    DD *                                                 
 SORT FIELDS=COPY   


Thanks,
Arun
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top