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: 2276
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: 995
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: 2276
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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