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
 

 

Incresaing record length of VB file in run JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Incresaing record length of VB file in run JCL
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: 2180
Location: @my desk

PostPosted: Wed Sep 03, 2008 12:50 pm    Post subject:
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    Post subject: Reply to: Incresaing record length of VB file in run JCL
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    Post subject:
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

Active Member


Joined: 08 May 2006
Posts: 991
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Wed Sep 03, 2008 1:46 pm    Post subject:
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: 2180
Location: @my desk

PostPosted: Wed Sep 03, 2008 7:56 pm    Post subject:
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    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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
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


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