Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search 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
Author Message
siddhartha biswas

New User


Joined: 04 May 2008
Posts: 11
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
References
arcvns

Senior Member


Joined: 17 Oct 2006
Posts: 756
Location: Chennai, India

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

New User


Joined: 04 May 2008
Posts: 11
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
Sambhaji
Warnings : 1

Active User


Joined: 16 Feb 2007
Posts: 267
Location: Pune, India

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 User


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

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
arcvns

Senior Member


Joined: 17 Oct 2006
Posts: 756
Location: Chennai, India

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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1